xref: /wlan-driver/fw-api/fw/wmi_unified.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
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 
wmi_packed_arr_get_bits(A_UINT32 * arr,A_UINT32 entry_index,A_UINT32 bits_per_entry)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 
wmi_packed_arr_set_bits(A_UINT32 * arr,A_UINT32 entry_index,A_UINT32 bits_per_entry,A_UINT32 val)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      * WMI command to inform the target of the AP's operating bandwidth
692      * (only applicable for STA vdev)
693      */
694     WMI_VDEV_REPORT_AP_OPER_BW_CMDID,
695 
696 
697     /* peer specific commands */
698 
699     /** create a peer */
700     WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER),
701     /** delete a peer */
702     WMI_PEER_DELETE_CMDID,
703     /** flush specific  tid queues of a peer */
704     WMI_PEER_FLUSH_TIDS_CMDID,
705     /** set a parameter of a peer */
706     WMI_PEER_SET_PARAM_CMDID,
707     /** set peer to associated state. will cary all parameters determined during assocication time */
708     WMI_PEER_ASSOC_CMDID,
709     /**add a wds  (4 address) entry. used only for testing WDS feature on AP products */
710     WMI_PEER_ADD_WDS_ENTRY_CMDID,
711     /**remove wds  (4 address) entry. used only for testing WDS feature on AP products */
712     WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
713     /** set up mcast group info for multicast to unicast conversion */
714     WMI_PEER_MCAST_GROUP_CMDID,
715     /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */
716     WMI_PEER_INFO_REQ_CMDID,
717     /** request the estimated link speed for the peer. FW shall respond with
718      *  WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
719      */
720     WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
721     /** Set the conditions to report peer justified rate to driver
722      * The justified rate means the user-rate is justified by PER.
723      */
724     WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
725 
726     /** update a wds (4 address) entry */
727     WMI_PEER_UPDATE_WDS_ENTRY_CMDID,
728     /** add a proxy sta entry */
729     WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID,
730     /** Set Smart Antenna TX antenna */
731     WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
732     /** Set Smart Antenna TX train info */
733     WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
734     /** Set SA node config options */
735     WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
736     /** ATF PEER REQUEST commands */
737     WMI_PEER_ATF_REQUEST_CMDID,
738     /** bandwidth fairness (BWF) peer configuration request command */
739     WMI_PEER_BWF_REQUEST_CMDID,
740     /** rx reorder queue setup for peer/tid */
741     WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
742     /** rx reorder queue remove for peer/tid */
743     WMI_PEER_REORDER_QUEUE_REMOVE_CMDID,
744     /** specify a limit for rx A-MPDU block size */
745     WMI_PEER_SET_RX_BLOCKSIZE_CMDID,
746     /** request peer antdiv info from FW. FW shall respond with PEER_ANTDIV_INFO_EVENTID */
747     WMI_PEER_ANTDIV_INFO_REQ_CMDID,
748     /*
749      * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def was originally mistakenly
750      * placed here, amongst the CMDID defs.
751      * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def has been moved to the
752      * EVENTID section, but to preserve backwards compatibility, the value
753      * here that had been used for WMI_PEER_OPER_MODE_CHANGE_EVENTID
754      * is kept reserved/deprecated.
755      *
756      * This WMI_PEER_RESERVED0_CMDID value can be replaced with an actual
757      * WMI peer event message ID, though it will be simpler to instead add
758      * new WMI_PEER CMDID defs at the end of the WMI_GRP_PEER WMI_CMD_GRP.
759      */
760     WMI_PEER_RESERVED0_CMDID,
761     /** Peer/Tid/Msduq threshold update */
762     WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID,
763     /** TID specific configurations per peer of type
764      * wmi_peer_tid_configurations_cmd_fixed_param
765      */
766     WMI_PEER_TID_CONFIGURATIONS_CMDID,
767 
768     /** Peer configuration for Channel Frequency Response (CFR) capture
769      * of type wmi_peer_cfr_capture_cmd.
770      *
771      * On targets that do not use the direct DMA framework,
772      * completion of the CFR capture is communicated through
773      * HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND.
774      * Such targets will set WMI_SERVICE_CFR_CAPTURE_IND_MSG_TYPE_1
775      * in WMI Service Ready.
776      *
777      * On targets that use direct DMA, completion of CFR capture is
778      * communicated through WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID
779      * using module ID WMI_DMA_RING_CONFIG_MODULE_RTT.
780      * Such targets will set WMI_SERVICE_CFR_CAPTURE_IND_EVT_TYPE_1
781      * in WMI Service Ready and enumerate WMI_DMA_RING_CONFIG_MODULE_RTT
782      * in the dma_ring_caps entry of WMI_SERVICE_READY_EXT_EVENTID.
783      * Additional MAC metadata is provided in WMI_PEER_CFR_CAPTURE_EVENTID.
784      */
785     WMI_PEER_CFR_CAPTURE_CMDID,
786 
787     /** WMI command related to AP channel width switching */
788     WMI_PEER_CHAN_WIDTH_SWITCH_CMDID,
789 
790     /** WMI command to fetch current tx PN for the peer */
791     WMI_PEER_TX_PN_REQUEST_CMDID,
792 
793     /** unmap response with peer ids */
794     WMI_PEER_UNMAP_RESPONSE_CMDID,
795 
796     /** WMI command for per-peer configuration of VLAN header operations
797      * during TX and RX
798      */
799     WMI_PEER_CONFIG_VLAN_CMDID,
800 
801     /** WMI command for per-peer configuration of PPE DS */
802     WMI_PEER_CONFIG_PPE_DS_CMDID,
803 
804     /** Enable/Disable Intra Bss for the peer */
805     WMI_PEER_ENABLE_DISABLE_INTRA_BSS_CMDID,
806 
807     WMI_PEER_RX_PN_REQUEST_CMDID,
808 
809     /* Mac addr based filtering*/
810     WMI_PEER_TX_FILTER_CMDID,
811 
812     /** flush specific tid queues of a peer */
813     WMI_PEER_FLUSH_POLICY_CMDID,
814 
815     /* Set disabled scheduler modes for one or more peers */
816     WMI_PEER_SCHED_MODE_DISABLE_CMDID,
817 
818     /* Group SET cmd for PEERS */
819     WMI_PEER_BULK_SET_CMDID,
820 
821     /* WMI command to setup reorder queue for multiple TIDs */
822     WMI_PEER_MULTIPLE_REORDER_QUEUE_SETUP_CMDID,
823 
824     /* beacon/management specific commands */
825 
826     /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
827     WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT),
828     /** transmit beacon by value */
829     WMI_PDEV_SEND_BCN_CMDID,
830     /** set the beacon template. used in beacon offload mode to setup the
831      *  the common beacon template with the FW to be used by FW to generate beacons */
832     WMI_BCN_TMPL_CMDID,
833     /** set beacon filter with FW */
834     WMI_BCN_FILTER_RX_CMDID,
835     /* enable/disable filtering of probe requests in the firmware */
836     WMI_PRB_REQ_FILTER_RX_CMDID,
837     /** transmit management frame by value. will be deprecated */
838     WMI_MGMT_TX_CMDID,
839     /** set the probe response template. used in beacon offload mode to setup the
840      *  the common probe response template with the FW to be used by FW to generate
841      *  probe responses */
842     WMI_PRB_TMPL_CMDID,
843     /** Transmit Mgmt frame by reference */
844     WMI_MGMT_TX_SEND_CMDID,
845     /** Transmit data frame by reference */
846     WMI_OFFCHAN_DATA_TX_SEND_CMDID,
847     /** transmit FILS Discovery frame by value */
848     WMI_PDEV_SEND_FD_CMDID,
849     /** Cmd to enable/disable offloaded beacons */
850     WMI_BCN_OFFLOAD_CTRL_CMDID,
851     /** Cmd to enable FW handling BSS color change notification from AP. */
852     WMI_BSS_COLOR_CHANGE_ENABLE_CMDID,
853     /** To configure Beacon offload quiet-ie params */
854     WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID,
855     /** set FILS Discovery frame template for FW to generate FD frames */
856     WMI_FD_TMPL_CMDID,
857     /** Transmit QoS null Frame over wmi interface */
858     WMI_QOS_NULL_FRAME_TX_SEND_CMDID,
859     /** WMI CMD to receive the management filter criteria from the host for RX REO */
860     WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMDID,
861 
862     /** commands to directly control ba negotiation directly from host. only used in test mode */
863 
864     /** turn off FW Auto addba mode and let host control addba */
865     WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG),
866     /** send add ba request */
867     WMI_ADDBA_SEND_CMDID,
868     WMI_ADDBA_STATUS_CMDID,
869     /** send del ba */
870     WMI_DELBA_SEND_CMDID,
871     /** set add ba response will be used by FW to generate addba response*/
872     WMI_ADDBA_SET_RESP_CMDID,
873     /** send single VHT MPDU with AMSDU */
874     WMI_SEND_SINGLEAMSDU_CMDID,
875 
876     /** Station power save specific config */
877     /** enable/disable station powersave */
878     WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS),
879     /** set station power save specific parameter */
880     WMI_STA_POWERSAVE_PARAM_CMDID,
881     /** set station mimo powersave mode */
882     WMI_STA_MIMO_PS_MODE_CMDID,
883     /** config station TX cycle percentage in a beacon interval */
884     WMI_STA_TDCC_CONFIG_CMDID,
885 
886 
887     /** DFS-specific commands */
888     /** enable DFS (radar detection)*/
889     WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS),
890     /** disable DFS (radar detection)*/
891     WMI_PDEV_DFS_DISABLE_CMDID,
892     /** enable DFS phyerr/parse filter offload */
893     WMI_DFS_PHYERR_FILTER_ENA_CMDID,
894     /** enable DFS phyerr/parse filter offload */
895     WMI_DFS_PHYERR_FILTER_DIS_CMDID,
896     /** enable DFS phyerr processing offload */
897     WMI_PDEV_DFS_PHYERR_OFFLOAD_ENABLE_CMDID,
898     /** disable DFS phyerr processing offload */
899     WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID,
900     /** set ADFS channel config */
901     WMI_VDEV_ADFS_CH_CFG_CMDID,
902     /** abort ADFS off-channel-availability-check currently in progress */
903     WMI_VDEV_ADFS_OCAC_ABORT_CMDID,
904 
905     /* Roaming specific commands */
906     /** set roam scan mode */
907     WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM),
908     /** set roam scan RSSI threshold below which roam scan is enabled  */
909     WMI_ROAM_SCAN_RSSI_THRESHOLD,
910     /** set roam scan period for periodic roam scan mode  */
911     WMI_ROAM_SCAN_PERIOD,
912     /** set roam scan trigger RSSI change threshold   */
913     WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
914     /** set roam AP profile   */
915     WMI_ROAM_AP_PROFILE,
916     /** set channel list for roam scans */
917     WMI_ROAM_CHAN_LIST,
918     /** Stop scan command */
919     WMI_ROAM_SCAN_CMD,
920     /** roaming sme offload sync complete */
921     WMI_ROAM_SYNCH_COMPLETE,
922     /** set ric request element for 11r roaming */
923     WMI_ROAM_SET_RIC_REQUEST_CMDID,
924     /** Invoke roaming forcefully */
925     WMI_ROAM_INVOKE_CMDID,
926     /** roaming filter cmd to allow further filtering of roaming candidate */
927     WMI_ROAM_FILTER_CMDID,
928     /** set gateway ip, mac and retries for subnet change detection */
929     WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
930     /** configure thresholds for MAWC */
931     WMI_ROAM_CONFIGURE_MAWC_CMDID,
932     /** configure MultiBand Operation(refer WFA MBO spec) parameter */
933     WMI_ROAM_SET_MBO_PARAM_CMDID, /* DEPRECATED */
934     /** configure packet error rate threshold for triggering roaming */
935     WMI_ROAM_PER_CONFIG_CMDID,
936     /** configure BSS Transition Management (BTM) offload for roaming */
937     WMI_ROAM_BTM_CONFIG_CMDID,
938     /** Enable or Disable Fast Initial Link Setup (FILS) feature */
939     WMI_ENABLE_FILS_CMDID,
940     /** Request for roam scan stats */
941     WMI_REQUEST_ROAM_SCAN_STATS_CMDID,
942     /** Configure BSS load parameters for roam trigger */
943     WMI_ROAM_BSS_LOAD_CONFIG_CMDID,
944     /** Configure deauth roam trigger parameters */
945     WMI_ROAM_DEAUTH_CONFIG_CMDID,
946     /** Configure idle roam trigger parameters */
947     WMI_ROAM_IDLE_CONFIG_CMDID,
948     /**
949      * WMI_ROAM_DSM_FILTER_CMDID is deprecated and should be unused,
950      * but leave it reserved just to be safe.
951      */
952     DEPRECATED__WMI_ROAM_DSM_FILTER_CMDID,
953     /** Enable or disable roaming triggers */
954     WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID,
955     /** Pre-Authentication completion status command */
956     WMI_ROAM_PREAUTH_STATUS_CMDID,
957     /** Command to get roam scan channels list */
958     WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID,
959     /** configure MLO parameters for roaming */
960     WMI_ROAM_MLO_CONFIG_CMDID,
961     /** set roam params **/
962     WMI_ROAM_SET_PARAM_CMDID,
963     /** Enable or Disable roam vendor control */
964     WMI_ROAM_ENABLE_VENDOR_CONTROL_CMDID,
965     /** Get firmware ini value */
966     WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID,
967 
968     /** offload scan specific commands */
969     /** set offload scan AP profile   */
970     WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN),
971     /** remove offload scan AP profile   */
972     WMI_OFL_SCAN_REMOVE_AP_PROFILE,
973     /** set offload scan period   */
974     WMI_OFL_SCAN_PERIOD,
975 
976     /* P2P specific commands */
977     /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response
978      * generated during p2p listen and for p2p discoverability  */
979     WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P),
980     /** enable/disable p2p discoverability on STA/AP VDEVs  */
981     WMI_P2P_DEV_SET_DISCOVERABILITY,
982     /** set p2p ie to be carried in beacons generated by FW for GO  */
983     WMI_P2P_GO_SET_BEACON_IE,
984     /** set p2p ie to be carried in probe response frames generated by FW for GO  */
985     WMI_P2P_GO_SET_PROBE_RESP_IE,
986     /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA
987      *  attribute in the beacons/probe responses received.
988      *  Note: This command is currently used only for Apple P2P implementation.
989      */
990     WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
991     /** set the configure of p2p find offload */
992     WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID,
993     /** set the vendor specific p2p ie data for p2p find offload using */
994     WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
995     /** set the BSSID/device name pattern of p2p find offload */
996     WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
997     /** set OppPS related parameters **/
998     WMI_P2P_SET_OPPPS_PARAM_CMDID,
999     /** set listen offload start related parameters */
1000     WMI_P2P_LISTEN_OFFLOAD_START_CMDID,
1001     /** set listen offload stop related parameters */
1002     WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID,
1003     /** set DFS master AP configuration */
1004     WMI_P2P_GO_DFS_AP_CONFIG_CMDID,
1005 
1006     /** AP power save specific config */
1007     /** set AP power save specific param */
1008     WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS),
1009     /** set AP UAPSD coex specific param */
1010     WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
1011     /** set Enhanced Green AP param */
1012     WMI_AP_PS_EGAP_PARAM_CMDID,
1013 
1014     /** Rate-control specific commands */
1015     WMI_PEER_RATE_RETRY_SCHED_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL),
1016 
1017     /** WLAN Profiling commands. */
1018     WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
1019     WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
1020     WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
1021     WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
1022     WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
1023 
1024     /** Suspend resume command Ids */
1025     WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND),
1026     WMI_PDEV_RESUME_CMDID,
1027 
1028     /* Beacon filter commands */
1029     /** add a beacon filter */
1030     WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER),
1031     /** remove a  beacon filter */
1032     WMI_RMV_BCN_FILTER_CMDID,
1033 
1034     /* WOW Specific WMI commands*/
1035     /** add pattern for awake */
1036     WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WOW),
1037     /** deleta a wake pattern */
1038     WMI_WOW_DEL_WAKE_PATTERN_CMDID,
1039     /** enable/deisable wake event  */
1040     WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
1041     /** enable WOW  */
1042     WMI_WOW_ENABLE_CMDID,
1043     /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */
1044     WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
1045     /* IOAC add keep alive cmd. */
1046     WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID,
1047     /* IOAC del keep alive cmd. */
1048     WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID,
1049     /* IOAC add pattern for awake */
1050     WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID,
1051     /* IOAC deleta a wake pattern */
1052     WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID,
1053     /* D0-WOW enable or disable cmd */
1054     WMI_D0_WOW_ENABLE_DISABLE_CMDID,
1055     /* enable extend WoW */
1056     WMI_EXTWOW_ENABLE_CMDID,
1057     /* Extend WoW command to configure app type1 parameter */
1058     WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
1059     /* Extend WoW command to configure app type2 parameter */
1060     WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
1061     /* enable ICMPv6 Network advertisement filtering */
1062     WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID,
1063     /*
1064      * Set a pattern to match UDP packet in WOW mode.
1065      * If match, construct a tx frame in a local buffer
1066      * to send through the peer AP to the entity in the
1067      * IP network that sent the UDP packet to this STA.
1068      */
1069     WMI_WOW_UDP_SVC_OFLD_CMDID,
1070     /* configure WOW host wakeup PIN pattern */
1071     WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID,
1072 
1073     /* Set which action category should wake the host from suspend */
1074     WMI_WOW_SET_ACTION_WAKE_UP_CMDID,
1075 
1076     /*
1077      * Set a pattern to match broadcast CoAP packet in WoW mode.
1078      * If match and verify pass, cache the packet and then reply
1079      * a unicast response in local with pre-configured packet.
1080      */
1081     WMI_WOW_COAP_ADD_PATTERN_CMDID,
1082 
1083     /* Delete a pattern match broadcast CoAP packet */
1084     WMI_WOW_COAP_DEL_PATTERN_CMDID,
1085 
1086     /*
1087      * Add a CoAP keepalive pattern to send a CoAP broadcast packet
1088      * when configured timeout occurred.
1089      */
1090     WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMDID,
1091 
1092     /* Delete a CoAP keepalive pattern */
1093     WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMDID,
1094 
1095     /* Host read the cached CoAP packets after resume */
1096     WMI_WOW_COAP_GET_BUF_INFO_CMDID,
1097 
1098 
1099     /* RTT measurement related cmd */
1100     /** request to make an RTT measurement */
1101     WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
1102     /** request to report a tsf measurement */
1103     WMI_RTT_TSF_CMDID,
1104     /** RTT 11az PASN authentication status */
1105     WMI_RTT_PASN_AUTH_STATUS_CMD,
1106     /** RTT 11az PASN deauthentication cmd */
1107     WMI_RTT_PASN_DEAUTH_CMD,
1108 
1109     /** spectral scan command */
1110     /** configure spectral scan */
1111     WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL),
1112     /** enable/disable spectral scan and trigger */
1113     WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
1114 
1115     /* F/W stats */
1116     /** one time request for stats */
1117     WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS),
1118     /** Push MCC Adaptive Scheduler Stats to Firmware */
1119     WMI_MCC_SCHED_TRAFFIC_STATS_CMDID,
1120     /** one time request for txrx stats */
1121     WMI_REQUEST_STATS_EXT_CMDID,
1122     /* Link Layer stats */
1123     /** Request for link layer stats */
1124     WMI_REQUEST_LINK_STATS_CMDID,
1125     /** Request for setting params to link layer stats */
1126     WMI_START_LINK_STATS_CMDID,
1127     /** Request to clear stats*/
1128     WMI_CLEAR_LINK_STATS_CMDID,
1129 
1130     /** Request for getting the Firmware Memory Dump */
1131     WMI_GET_FW_MEM_DUMP_CMDID,
1132 
1133     /** Request to flush of the buffered debug messages */
1134     WMI_DEBUG_MESG_FLUSH_CMDID,
1135 
1136     /** Cmd to configure the verbose level */
1137     WMI_DIAG_EVENT_LOG_CONFIG_CMDID,
1138 
1139     /** One time request for wlan stats */
1140     WMI_REQUEST_WLAN_STATS_CMDID,
1141 
1142     /** Request for getting RCPI of peer */
1143     WMI_REQUEST_RCPI_CMDID,
1144 
1145     /** One time request for peer stats info */
1146     WMI_REQUEST_PEER_STATS_INFO_CMDID,
1147 
1148     /** One time request for radio channel stats */
1149     WMI_REQUEST_RADIO_CHAN_STATS_CMDID,
1150 
1151     /** request for WLM (wlan latency manager) stats */
1152     WMI_REQUEST_WLM_STATS_CMDID,
1153 
1154     /** request for control path stats */
1155     WMI_REQUEST_CTRL_PATH_STATS_CMDID,
1156 
1157     /** unified request for LL stats and get station cmds */
1158     WMI_REQUEST_UNIFIED_LL_GET_STA_CMDID,
1159 
1160     /** request for thermal stats */
1161     WMI_REQUEST_THERMAL_STATS_CMDID,
1162 
1163     /** request for HALPHY stats through ctrl path */
1164     WMI_REQUEST_HALPHY_CTRL_PATH_STATS_CMDID,
1165 
1166 
1167     /** ARP OFFLOAD REQUEST*/
1168     WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
1169 
1170     /** Proactive ARP Response Add Pattern Command*/
1171     WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID,
1172 
1173     /** Proactive ARP Response Del Pattern Command*/
1174     WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID,
1175 
1176     /** NS offload confid*/
1177     WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL),
1178 
1179     /** APFIND Config */
1180     WMI_APFIND_CMDID,
1181 
1182     /** Passpoint list config  */
1183     WMI_PASSPOINT_LIST_CONFIG_CMDID,
1184 
1185     /** configure suppressing parameters for MAWC */
1186     WMI_NLO_CONFIGURE_MAWC_CMDID,
1187 
1188     /* GTK offload Specific WMI commands*/
1189     WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL),
1190 
1191     /* CSA offload Specific WMI commands*/
1192     /** csa offload enable */
1193     WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL),
1194     /** chan switch command */
1195     WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
1196 
1197     /* Chatter commands*/
1198     /* Change chatter mode of operation */
1199     WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER),
1200     /** chatter add coalescing filter command */
1201     WMI_CHATTER_ADD_COALESCING_FILTER_CMDID,
1202     /** chatter delete coalescing filter command */
1203     WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID,
1204     /** chatter coalecing query command */
1205     WMI_CHATTER_COALESCING_QUERY_CMDID,
1206 
1207     /**addba specific commands */
1208     /** start the aggregation on this TID */
1209     WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA),
1210     /** stop the aggregation on this TID */
1211     WMI_PEER_TID_DELBA_CMDID,
1212 
1213     /** set station mimo powersave method */
1214     WMI_STA_DTIM_PS_METHOD_CMDID,
1215     /** Configure the Station UAPSD AC Auto Trigger Parameters */
1216     WMI_STA_UAPSD_AUTO_TRIG_CMDID,
1217     /** Configure the Keep Alive Parameters */
1218     WMI_STA_KEEPALIVE_CMDID,
1219 
1220     /* Request ssn from target for a sta/tid pair */
1221     WMI_BA_REQ_SSN_CMDID,
1222 
1223 
1224     /* misc command group */
1225     /** echo command mainly used for testing */
1226     WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
1227 
1228     /* !!IMPORTANT!!
1229      * If you need to add a new WMI command to the WMI_GRP_MISC sub-group,
1230      * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID,
1231      * as we MUST have a fixed value here to maintain compatibility between
1232      * UTF and the ART2 driver
1233      */
1234     /** UTF WMI commands */
1235     WMI_PDEV_UTF_CMDID,
1236 
1237     /** set debug log config */
1238     WMI_DBGLOG_CFG_CMDID,
1239     /* QVIT specific command id */
1240     WMI_PDEV_QVIT_CMDID,
1241     /* Factory Testing Mode request command
1242      * used for integrated chipsets */
1243     WMI_PDEV_FTM_INTG_CMDID,
1244     /* set and get keepalive parameters command */
1245     WMI_VDEV_SET_KEEPALIVE_CMDID,
1246     WMI_VDEV_GET_KEEPALIVE_CMDID,
1247     /* For fw recovery test command */
1248     WMI_FORCE_FW_HANG_CMDID,
1249     /* Set Mcast/Bdcast filter */
1250     WMI_SET_MCASTBCAST_FILTER_CMDID,
1251     /** set thermal management params **/
1252     WMI_THERMAL_MGMT_CMDID,
1253     /** set host auto shutdown params **/
1254     WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID,
1255     /** set tpc chainmask config command */
1256     WMI_TPC_CHAINMASK_CONFIG_CMDID,
1257     /** set Antenna diversity command */
1258     WMI_SET_ANTENNA_DIVERSITY_CMDID,
1259     /** Set OCB Sched Request, deprecated */
1260     WMI_OCB_SET_SCHED_CMDID,
1261     /** Set RSSI monitoring config command */
1262     WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
1263     /** Enable/disable Large Receive Offload processing; provide cfg params */
1264     WMI_LRO_CONFIG_CMDID,
1265     /** transfer data from host to firmware to write flash */
1266     WMI_TRANSFER_DATA_TO_FLASH_CMDID,
1267     /** Command to enable/disable filtering of multicast IP with unicast mac */
1268     WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID,
1269     /** Command to control WISA mode */
1270     WMI_VDEV_WISA_CMDID,
1271     /** set debug log time stamp sync up with host */
1272     WMI_DBGLOG_TIME_STAMP_SYNC_CMDID,
1273     /** Command for host to set/delete multiple mcast filters */
1274     WMI_SET_MULTIPLE_MCAST_FILTER_CMDID,
1275     /** upload a requested section of data from firmware flash to host */
1276     WMI_READ_DATA_FROM_FLASH_CMDID,
1277     /* Thermal Throttling SET CONF commands */
1278     WMI_THERM_THROT_SET_CONF_CMDID,
1279     /* set runtime dpd recalibration params */
1280     WMI_RUNTIME_DPD_RECAL_CMDID,
1281     /* get TX power for input HALPHY parameters */
1282     WMI_GET_TPC_POWER_CMDID,
1283     /* Specify when to start monitoring for idle state */
1284     WMI_IDLE_TRIGGER_MONITOR_CMDID,
1285     /** set ELNA BYPASS status */
1286     WMI_SET_ELNA_BYPASS_CMDID,
1287     /** get ELNA BYPASS status */
1288     WMI_GET_ELNA_BYPASS_CMDID,
1289     /** get ANI level of the channels */
1290     WMI_GET_CHANNEL_ANI_CMDID,
1291     /** set OCL (One Chain Listen) mode */
1292     WMI_SET_OCL_CMDID,
1293     /** Consolidated params for pdev/vdev:
1294      * Set multiple parameters at once for one pdev or vdev.
1295      */
1296     WMI_SET_MULTIPLE_PDEV_VDEV_PARAM_CMDID,
1297 
1298     /* WMI cmd used to allocate HW scratch registers */
1299     WMI_PMM_SCRATCH_REG_ALLOCATION_CMDID,
1300 
1301     /* WMI cmd used to start/stop XGAP (XPAN Green AP) */
1302     WMI_XGAP_ENABLE_CMDID,
1303 
1304     /* H2T HPA message */
1305     WMI_HPA_CMDID,
1306 
1307     /* WMI comamnd for standalone sounding */
1308     WMI_VDEV_STANDALONE_SOUND_CMDID,
1309 
1310     /* WMI cmd used by host to send the switch response status to FW */
1311     WMI_AUDIO_TRANSPORT_SWITCH_RESP_STATUS_CMDID,
1312 
1313     /** WMI command to set active traffic type bitmap for a peer */
1314     WMI_PEER_ACTIVE_TRAFFIC_MAP_CMDID,
1315 
1316     /** WMI command to Request Opportunistic Power Mgmt (OPM) stats */
1317     WMI_REQUEST_OPM_STATS_CMDID,
1318 
1319     /** WMI command to Request SAP suspend/resume */
1320     WMI_SET_AP_SUSPEND_RESUME_CMDID,
1321 
1322 
1323     /*  Offload 11k related requests */
1324     WMI_11K_OFFLOAD_REPORT_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_11K_OFFLOAD),
1325     /* invoke neighbor report from FW */
1326     WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID,
1327 
1328     /* GPIO Configuration */
1329     WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
1330     WMI_GPIO_OUTPUT_CMDID,
1331 
1332     /* Txbf configuration command */
1333     WMI_TXBF_CMDID,
1334 
1335     /* Antenna Controller, connected to wlan debug uart/GPIO. */
1336     WMI_ANT_CONTROLLER_CMDID,
1337 
1338     WMI_GPIO_STATE_REQ_CMDID,
1339 
1340     /* FWTEST Commands */
1341     WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
1342     /** set NoA descs **/
1343     WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
1344     /* UNIT Tests  */
1345     WMI_UNIT_TEST_CMDID,
1346     /* set debug and tuning parameters */
1347     WMI_FWTEST_CMDID,
1348     /* Q-Boost configuration test commands */
1349     WMI_QBOOST_CFG_CMDID,
1350     /* Simulation Test command  */
1351     WMI_SIMULATION_TEST_CMDID,
1352     /* WFA test config command */
1353     WMI_WFA_CONFIG_CMDID,
1354 
1355     /** TDLS Configuration */
1356     /** enable/disable TDLS */
1357     WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
1358     /** set tdls peer state */
1359     WMI_TDLS_PEER_UPDATE_CMDID,
1360     /** TDLS Offchannel control */
1361     WMI_TDLS_SET_OFFCHAN_MODE_CMDID,
1362 
1363     /** Resmgr Configuration */
1364     /** Adaptive OCS is enabled by default in the FW. This command is used to
1365      * disable FW based adaptive OCS.
1366      */
1367     WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
1368     /** set the requested channel time quota for the home channels */
1369     WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
1370     /** set the requested latency for the home channels */
1371     WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
1372 
1373     /** STA SMPS Configuration */
1374     /** force SMPS mode */
1375     WMI_STA_SMPS_FORCE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
1376     /** set SMPS parameters */
1377     WMI_STA_SMPS_PARAM_CMDID,
1378 
1379     /* Wlan HB commands*/
1380     /* enable/disable wlan HB */
1381     WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB),
1382     /* set tcp parameters for wlan HB */
1383     WMI_HB_SET_TCP_PARAMS_CMDID,
1384     /* set tcp pkt filter for wlan HB */
1385     WMI_HB_SET_TCP_PKT_FILTER_CMDID,
1386     /* set udp parameters for wlan HB */
1387     WMI_HB_SET_UDP_PARAMS_CMDID,
1388     /* set udp pkt filter for wlan HB */
1389     WMI_HB_SET_UDP_PKT_FILTER_CMDID,
1390 
1391     /* OIC ping keep alive */
1392     WMI_HB_OIC_PING_OFFLOAD_PARAM_CMDID,
1393     WMI_HB_OIC_PING_OFFLOAD_SET_ENABLE_CMDID,
1394 
1395     /* WMI commands related to DHCP Lease Renew Offload **/
1396     WMI_HB_DHCP_LEASE_RENEW_OFFLOAD_CMDID,
1397 
1398     /** Wlan RMC commands*/
1399     /** enable/disable RMC */
1400     WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC),
1401     /** configure action frame period */
1402     WMI_RMC_SET_ACTION_PERIOD_CMDID,
1403     /** For debug/future enhancement purposes only,
1404      *  configures/finetunes RMC algorithms */
1405     WMI_RMC_CONFIG_CMDID,
1406     /** select manual leader */
1407     WMI_RMC_SET_MANUAL_LEADER_CMDID,
1408 
1409     /** WLAN MHF offload commands */
1410     /** enable/disable MHF offload */
1411     WMI_MHF_OFFLOAD_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL),
1412     /** Plumb routing table for MHF offload */
1413     WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID,
1414 
1415     /*location scan commands*/
1416     /*start batch scan*/
1417     WMI_BATCH_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
1418     /*stop batch scan*/
1419     WMI_BATCH_SCAN_DISABLE_CMDID,
1420     /*get batch scan result*/
1421     WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
1422 
1423 
1424     /* OEM related cmd */
1425     WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM),
1426     WMI_OEM_REQUEST_CMDID, /* UNUSED */
1427     /* OEM related cmd used for Low Power ranging */
1428     WMI_LPI_OEM_REQ_CMDID,
1429     WMI_OEM_DMA_RING_CFG_REQ_CMDID,
1430     /** Command to handle OEM's opaque data */
1431     WMI_OEM_DATA_CMDID,
1432 
1433 
1434     /** Nan Request */
1435     WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN),
1436     /** Command to handle OEM's NAN specific opaque data */
1437     WMI_NAN_OEM_DATA_CMDID,
1438 
1439     /** Modem power state command */
1440     WMI_MODEM_POWER_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_COEX),
1441     WMI_CHAN_AVOID_UPDATE_CMDID,
1442     WMI_COEX_CONFIG_CMDID,
1443     WMI_CHAN_AVOID_RPT_ALLOW_CMDID,
1444     WMI_COEX_GET_ANTENNA_ISOLATION_CMDID,
1445     WMI_SAR_LIMITS_CMDID,
1446     WMI_SAR_GET_LIMITS_CMDID,
1447     /** Dedicated BT Antenna Mode (DBAM) command */
1448     WMI_COEX_DBAM_CMDID,
1449     WMI_TAS_POWER_HISTORY_CMDID,
1450     WMI_ESL_EGID_CMDID,
1451     WMI_COEX_MULTIPLE_CONFIG_CMDID,
1452 
1453     /**
1454      *  OBSS scan offload enable/disable commands
1455      *  OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true:
1456      *  1.  WMI_SERVICE_OBSS_SCAN is reported by FW in service ready,
1457      *  2.  STA connect to a 2.4 GHz ht20/ht40 AP,
1458      *  3.  AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response)
1459      *  If OBSS parameters from beacon changed, also use enable CMD to update parameters.
1460      *  OBSS scan disable CMD will send to FW if have enabled when tearing down connection.
1461      */
1462     WMI_OBSS_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL),
1463     WMI_OBSS_SCAN_DISABLE_CMDID,
1464     WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID,
1465 
1466     /** LPI commands */
1467     /** LPI mgmt snooping config command */
1468     WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LPI),
1469     /** LPI scan start command */
1470     WMI_LPI_START_SCAN_CMDID,
1471     /** LPI scan stop command */
1472     WMI_LPI_STOP_SCAN_CMDID,
1473 
1474     /** ExtScan commands */
1475     WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN),
1476     WMI_EXTSCAN_STOP_CMDID,
1477     WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID,
1478     WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID,
1479     WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID,
1480     WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID,
1481     WMI_EXTSCAN_SET_CAPABILITIES_CMDID,
1482     WMI_EXTSCAN_GET_CAPABILITIES_CMDID,
1483     WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID,
1484     WMI_EXTSCAN_CONFIGURE_MAWC_CMDID,
1485 
1486     /** DHCP server offload commands */
1487     WMI_SET_DHCP_SERVER_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL),
1488 
1489     /** IPA Offload features related commands */
1490     WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_IPA),
1491 
1492     /** mDNS responder offload commands */
1493     WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL),
1494     WMI_MDNS_SET_FQDN_CMDID,
1495     WMI_MDNS_SET_RESPONSE_CMDID,
1496     WMI_MDNS_GET_STATS_CMDID,
1497     WMI_MDNS_SET_STAIP_CMDID,
1498 
1499     /* enable/disable AP Authentication offload */
1500     WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL),
1501     WMI_SAP_SET_BLACKLIST_PARAM_CMDID,
1502     WMI_SAP_OBSS_DETECTION_CFG_CMDID,
1503 
1504     /** Out-of-context-of-BSS (OCB) commands */
1505     WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB),
1506     WMI_OCB_SET_UTC_TIME_CMDID,
1507     WMI_OCB_START_TIMING_ADVERT_CMDID,
1508     WMI_OCB_STOP_TIMING_ADVERT_CMDID,
1509     WMI_OCB_GET_TSF_TIMER_CMDID,
1510     WMI_DCC_GET_STATS_CMDID,
1511     WMI_DCC_CLEAR_STATS_CMDID,
1512     WMI_DCC_UPDATE_NDL_CMDID,
1513 
1514     /* System-On-Chip commands */
1515     WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
1516     WMI_SOC_SET_HW_MODE_CMDID,
1517     WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
1518     WMI_SOC_SET_ANTENNA_MODE_CMDID,
1519     /** enable/disable TQM reset (SOC level) feature */
1520     WMI_SOC_TQM_RESET_ENABLE_DISABLE_CMDID,
1521     /*
1522      * WMI Command to enable custom classification of packets in Tx path
1523      * and specifiy packets of interest for classification.
1524      */
1525     WMI_SOC_TX_PACKET_CUSTOM_CLASSIFY_CMDID,
1526 
1527     /* packet filter commands */
1528     WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
1529     WMI_PACKET_FILTER_ENABLE_CMDID,
1530 
1531     /** Motion Aided WiFi Connectivity (MAWC) commands */
1532     WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC),
1533 
1534     /** WMI commands related to PMF 11w Offload */
1535     WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD),
1536 
1537     /** WMI commands related to pkt filter (BPF) offload */
1538     WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
1539     WMI_BPF_GET_VDEV_STATS_CMDID,
1540     WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
1541     WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
1542     WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID,
1543     WMI_BPF_SET_VDEV_ENABLE_CMDID,
1544     WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID,
1545     WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID,
1546 
1547     /** WMI commands related to monitor mode. */
1548     WMI_MNT_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MONITOR),
1549 
1550     /** WMI commands related to regulatory offload */
1551     WMI_SET_CURRENT_COUNTRY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_REGULATORY),
1552     WMI_11D_SCAN_START_CMDID,
1553     WMI_11D_SCAN_STOP_CMDID,
1554     WMI_SET_INIT_COUNTRY_CMDID,
1555     WMI_AFC_CMDID,
1556 
1557     /**
1558      * Nan Data commands
1559      * NDI - NAN Data Interface
1560      * NDP - NAN Data Path
1561      */
1562     /* Commands in prototyping phase */
1563     WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROTOTYPE),
1564     WMI_NDP_INITIATOR_REQ_CMDID,
1565     WMI_NDP_RESPONDER_REQ_CMDID,
1566     WMI_NDP_END_REQ_CMDID,
1567     WMI_NDP_CMDID,
1568 
1569     /** WMI commands related to HW data filtering **/
1570     WMI_HW_DATA_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HW_DATA_FILTER),
1571 
1572     /** WMI commands related to WLAN latency module **/
1573     WMI_WLM_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLM),
1574 
1575     /** WMI commands related to STA & AP TWT module **/
1576     WMI_TWT_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TWT),
1577     WMI_TWT_DISABLE_CMDID,
1578     WMI_TWT_ADD_DIALOG_CMDID,
1579     WMI_TWT_DEL_DIALOG_CMDID,
1580     WMI_TWT_PAUSE_DIALOG_CMDID,
1581     WMI_TWT_RESUME_DIALOG_CMDID,
1582     WMI_TWT_BTWT_INVITE_STA_CMDID,
1583     WMI_TWT_BTWT_REMOVE_STA_CMDID,
1584     WMI_TWT_NUDGE_DIALOG_CMDID,
1585     WMI_VDEV_SET_TWT_EDCA_PARAMS_CMDID, /* XPAN TWT */
1586     WMI_VDEV_GET_TWT_SESSION_STATS_INFO_CMDID,
1587     WMI_TWT_VDEV_CONFIG_CMDID,
1588 
1589     /** WMI commands related to motion detection **/
1590     WMI_MOTION_DET_CONFIG_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MOTION_DET),
1591     WMI_MOTION_DET_BASE_LINE_CONFIG_PARAM_CMDID,
1592     WMI_MOTION_DET_START_STOP_CMDID,
1593     WMI_MOTION_DET_BASE_LINE_START_STOP_CMDID,
1594 
1595     /** WMI commands related to OBSS PD Spatial Reuse **/
1596     WMI_PDEV_OBSS_PD_SPATIAL_REUSE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPATIAL_REUSE),
1597     WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID,
1598 
1599     /** WMI commands related to High Precision Clock Synchronization feature **/
1600     WMI_HPCS_PULSE_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HPCS_PULSE),
1601 
1602     /** WMI commands related to Audio Frame aggregation feature **/
1603     WMI_AUDIO_AGGR_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AUDIO),
1604     WMI_AUDIO_AGGR_ADD_GROUP_CMDID,
1605     WMI_AUDIO_AGGR_DEL_GROUP_CMDID,
1606     WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID,
1607     WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID,
1608     WMI_AUDIO_AGGR_SET_GROUP_AUTO_RATE_CMDID,
1609     WMI_AUDIO_AGGR_SET_GROUP_PROBE_CMDID,
1610     WMI_AUDIO_AGGR_UPDATE_STA_GROUP_INFO_CMDID,
1611     WMI_AUDIO_AGGR_GET_STATISTICS_CMDID,
1612     WMI_AUDIO_AGGR_RESET_STATISTICS_CMDID,
1613     WMI_AUDIO_AGGR_SET_RTSCTS_CONFIG_CMDID,
1614     WMI_AUDIO_AGGR_SET_SCHED_METHOD_CMDID,
1615     WMI_AUDIO_AGGR_GET_SCHED_METHOD_CMDID,
1616 
1617     /** WMI commands related to Channel Frequency Response Capture **/
1618     WMI_CFR_CAPTURE_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CFR_CAPTURE),
1619 
1620     /** WMI commands related to Air Time Management feature **/
1621     /** ATF SSID GROUPING REQUEST command */
1622     WMI_ATF_SSID_GROUPING_REQUEST_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ATM),
1623     /** WMM ATF Configuration for groups */
1624     WMI_ATF_GROUP_WMM_AC_CONFIG_REQUEST_CMDID,
1625     /** ATF Peer Extended Request command */
1626     WMI_PEER_ATF_EXT_REQUEST_CMDID,
1627 
1628     /** Vendor Defined WMI commands **/
1629     WMI_VENDOR_PDEV_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VENDOR),
1630     WMI_VENDOR_VDEV_CMDID,
1631     WMI_VENDOR_PEER_CMDID,
1632     /** Further vendor cmd IDs can be added below **/
1633 
1634     /** WMI commands specific to Tid level Latency config **/
1635     /** VDEV Latency Config command */
1636     WMI_VDEV_TID_LATENCY_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LATENCY),
1637     /** TID Latency Request command */
1638     WMI_PEER_TID_LATENCY_CONFIG_CMDID,
1639 
1640     /** WMI commands specific to MLO **/
1641     /** MLO link active / inactive Request command */
1642     WMI_MLO_LINK_SET_ACTIVE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MLO),
1643     /** WMI cmd used to indicate hw_links part of MLO */
1644     WMI_MLO_SETUP_CMDID,
1645     /** WMI cmd used for init synchronization of hw_links part of MLO */
1646     WMI_MLO_READY_CMDID,
1647     /** WMI cmd used for tearing down a hw_link part of MLO */
1648     WMI_MLO_TEARDOWN_CMDID,
1649     /** WMI cmd used to setup Tid to Link Mapping for a MLO Peer */
1650     WMI_MLO_PEER_TID_TO_LINK_MAP_CMDID,
1651     /** WMI cmd for dynamically deleting a link from a MLD VAP */
1652     WMI_MLO_LINK_REMOVAL_CMDID,
1653     /** WMI cmd used to setup Tid to Link Mapping for a MLO VAP */
1654     WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_CMDID,
1655     /** WMI cmd used to get mlo link information */
1656     WMI_MLO_VDEV_GET_LINK_INFO_CMDID,
1657     /** WMI cmd used to set link BSS parameters */
1658     WMI_MLO_LINK_SET_BSS_PARAMS_CMDID,
1659     /** WMI cmd to confirm the status of link switch request handling */
1660     WMI_MLO_LINK_SWITCH_CONF_CMDID,
1661     /** WMI cmd to migrate the primary link peer */
1662     WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID,
1663     /** WMI cmd to recommand preferred link */
1664     WMI_MLO_LINK_RECOMMENDATION_CMDID,
1665 
1666     /** WMI commands specific to Service Aware WiFi (SAWF) */
1667     /** configure or reconfigure the parameters for a service class */
1668     WMI_SAWF_SVC_CLASS_CFG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAWF),
1669     /** disable a service class */
1670     WMI_SAWF_SVC_CLASS_DISABLE_CMDID,
1671 
1672     /* WMI commands specific to ODD */
1673     WMI_ODD_LIVEDUMP_REQUEST_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ODD),
1674 
1675     /* WMI commands specific to TDMA */
1676     WMI_TDMA_SCHEDULE_REQUEST_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDMA),
1677 
1678     /* WMI commands specific to manually-triggered UL */
1679     /** WMI Command to set Manual SU UL OFDMA trigger parameters */
1680     WMI_VDEV_SET_ULOFDMA_MANUAL_SU_TRIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MANUAL_UL_TRIG),
1681 
1682     /** WMI Command to set Manual MU UL OFDMA trigger parameters */
1683     WMI_VDEV_SET_ULOFDMA_MANUAL_MU_TRIG_CMDID,
1684 } WMI_CMD_ID;
1685 
1686 typedef enum {
1687     /** WMI service is ready; after this event WMI messages can be sent/received  */
1688     WMI_SERVICE_READY_EVENTID = 0x1,
1689     /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */
1690     WMI_READY_EVENTID,
1691 
1692     /** Specify what WMI services the target supports (for services beyond
1693      * what fits in the WMI_SERVICE_READY_EVENT message's wmi_service_bitmap)
1694      */
1695     WMI_SERVICE_AVAILABLE_EVENTID,
1696 
1697     /** Specify what numbers and kinds of interfaces (a.k.a. vdevs)
1698      * the target supports
1699      */
1700     WMI_IFACE_COMBINATION_IND_EVENTID,
1701 
1702     /** Scan specific events */
1703     WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
1704 
1705     /** Spectral scan FW params to host */
1706     WMI_PDEV_SSCAN_FW_PARAM_EVENTID,
1707 
1708     /** Spectral scan related event start/stop trigger to host  */
1709     WMI_SSCAN_EVT_MESSAGE_EVENTID,
1710 
1711     /** Spectral scan capabilities advertisement */
1712     WMI_SPECTRAL_CAPABILITIES_EVENTID,
1713 
1714 
1715     /* PDEV specific events */
1716     /** TPC config for the current operating channel */
1717     WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
1718     /** Channel stats event    */
1719     WMI_CHAN_INFO_EVENTID,
1720 
1721     /** PHY Error specific WMI event */
1722     WMI_PHYERR_EVENTID,
1723 
1724     /** eeprom dump event  */
1725     WMI_PDEV_DUMP_EVENTID,
1726 
1727     /** traffic pause event */
1728     WMI_TX_PAUSE_EVENTID,
1729 
1730     /** DFS radar event  */
1731     WMI_DFS_RADAR_EVENTID,
1732 
1733     /** track L1SS entry and residency event */
1734     WMI_PDEV_L1SS_TRACK_EVENTID,
1735 
1736     /** Report current temperature of the chip in Celcius degree */
1737     WMI_PDEV_TEMPERATURE_EVENTID,
1738 
1739     /** Extension of WMI_SERVICE_READY msg with extra target capability info */
1740     WMI_SERVICE_READY_EXT_EVENTID,
1741 
1742     /** FIPS test mode event */
1743     WMI_PDEV_FIPS_EVENTID,
1744 
1745     /** Channel hopping avoidance */
1746     WMI_PDEV_CHANNEL_HOPPING_EVENTID,
1747 
1748     /** CCK ANI level event */
1749     WMI_PDEV_ANI_CCK_LEVEL_EVENTID,
1750 
1751     /** OFDM ANI level event */
1752     WMI_PDEV_ANI_OFDM_LEVEL_EVENTID,
1753 
1754     /** Tx PPDU params */
1755     WMI_PDEV_TPC_EVENTID,
1756 
1757     /** NF Cal Power in DBR/DBM for all channels */
1758     WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
1759 
1760     /** SOC/PDEV events */
1761     WMI_PDEV_SET_HW_MODE_RESP_EVENTID,
1762     WMI_PDEV_HW_MODE_TRANSITION_EVENTID,
1763     WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID,
1764     /** Report ANT DIV feature's status */
1765     WMI_PDEV_ANTDIV_STATUS_EVENTID,
1766     /** Chip level Power stats */
1767     WMI_PDEV_CHIP_POWER_STATS_EVENTID,
1768     /** Power Save Failure Detected */
1769     WMI_PDEV_CHIP_POWER_SAVE_FAILURE_DETECTED_EVENTID,
1770 
1771     /* Event to report the switch count in csa of one or more VDEVs */
1772     WMI_PDEV_CSA_SWITCH_COUNT_STATUS_EVENTID,
1773 
1774     /** Report the caldata version to host */
1775     WMI_PDEV_CHECK_CAL_VERSION_EVENTID,
1776 
1777     /** Report chain RSSI and antenna index to host */
1778     WMI_PDEV_DIV_RSSI_ANTID_EVENTID,
1779 
1780     /** provide noise floor and cycle counts for a channel */
1781     WMI_PDEV_BSS_CHAN_INFO_EVENTID,
1782 
1783     /** Response received the ctl table to host */
1784     WMI_PDEV_UPDATE_CTLTABLE_EVENTID,
1785 
1786     WMI_PDEV_DMA_RING_CFG_RSP_EVENTID,
1787 
1788     WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID,
1789 
1790     /** WMI Event to deliver CTL Failsafe application */
1791     WMI_PDEV_CTL_FAILSAFE_CHECK_EVENTID,
1792 
1793     /* Event to report the switch count in BSS color of one or more VDEVs */
1794     WMI_PDEV_CSC_SWITCH_COUNT_STATUS_EVENTID,
1795 
1796     /* Event to send cold boot calibration data */
1797     WMI_PDEV_COLD_BOOT_CAL_DATA_EVENTID,
1798 
1799     /* Event to report a rogue ap info that is detected in fw */
1800     WMI_PDEV_RAP_INFO_EVENTID,
1801 
1802     WMI_CHAN_RF_CHARACTERIZATION_INFO_EVENTID,
1803 
1804     /** 2nd extension of SERVICE_READY msg with extra target capability info */
1805     WMI_SERVICE_READY_EXT2_EVENTID,
1806 
1807     /**
1808      * vdev restart response for multiple vdevs in response to
1809      * MULTIPLE_VDEV_RESTART_REQUEST
1810      */
1811     WMI_PDEV_MULTIPLE_VDEV_RESTART_RESP_EVENTID,
1812 
1813     /** WMI event in response to TPC STATS command */
1814     WMI_PDEV_GET_TPC_STATS_EVENTID,
1815 
1816     /* Event to get DPD status from HALPHY */
1817     WMI_PDEV_GET_DPD_STATUS_EVENTID,
1818 
1819     /* Event to get Calibration status from HALPHY */
1820     WMI_PDEV_GET_HALPHY_CAL_STATUS_EVENTID,
1821 
1822     /* Event to set halphy cal bitmap */
1823     WMI_PDEV_SET_HALPHY_CAL_BMAP_EVENTID,
1824 
1825     /* Event to get AOA phasedelta values from HALPHY */
1826     WMI_PDEV_AOA_PHASEDELTA_EVENTID,
1827 
1828     WMI_PDEV_FIPS_EXTEND_EVENTID,
1829 
1830     /* Event to send packet log decode information */
1831     WMI_PDEV_PKTLOG_DECODE_INFO_EVENTID,
1832 
1833     /**
1834      * RSSI dB to dBm conversion params info event
1835      * sent to host after channel/bw/chainmask change per pdev.
1836      */
1837     WMI_PDEV_RSSI_DBM_CONVERSION_PARAMS_INFO_EVENTID,
1838 
1839     /* Event to indicate Schedule tid queue suspended info */
1840     WMI_PDEV_SCHED_TIDQ_SUSP_INFO_EVENTID,
1841 
1842     /* Event to send target rate to power table update status */
1843     WMI_PDEV_SET_TGTR2P_TABLE_EVENTID,
1844 
1845     /* Event to indicate completion on RF path */
1846     WMI_PDEV_SET_RF_PATH_RESP_EVENTID,
1847 
1848     /* Event to get AOA phasedelta values for all gain tables from HALPHY */
1849     WMI_PDEV_ENHANCED_AOA_PHASEDELTA_EVENTID,
1850 
1851     /* Event to indicate the status of WiFi Radar calibration */
1852     WMI_PDEV_WIFI_RADAR_CAL_COMPLETION_STATUS_EVENTID,
1853 
1854     /* Event to indicate xLNA is enabled */
1855     WMI_PDEV_ENABLE_XLNA_EVENTID,
1856 
1857     /* VDEV specific events */
1858     /** VDEV started event in response to VDEV_START request */
1859     WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
1860     /** vdev stopped event , generated in response to VDEV_STOP request */
1861     WMI_VDEV_STOPPED_EVENTID,
1862     /* Indicate the set key (used for setting per
1863      * peer unicast and per vdev multicast)
1864      * operation has completed */
1865     WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
1866     /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
1867      don't use this for any new implementations */
1868     /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
1869      This request is valid only for vdevs operating in soft AP or P2P GO mode */
1870     WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
1871 
1872     /* Return the TSF timestamp of specified vdev */
1873     WMI_VDEV_TSF_REPORT_EVENTID,
1874 
1875     /* FW response to Host for vdev delete cmdid */
1876     WMI_VDEV_DELETE_RESP_EVENTID,
1877 
1878     /* DISA feature: FW response to Host with encrypted/decrypted 802.11 DISA frame */
1879     WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID,
1880 
1881     /** event to report mac randomization success **/
1882     WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_STATUS_EVENTID,
1883 
1884     /* event for ARP stats collection */
1885     WMI_VDEV_GET_ARP_STAT_EVENTID,
1886 
1887     /** get tx power event in response to VDEV_GET_TX_POWER request */
1888     WMI_VDEV_GET_TX_POWER_EVENTID,
1889 
1890     WMI_VDEV_BCN_RECEPTION_STATS_EVENTID,
1891 
1892     /* provide LTE-Coex state */
1893     WMI_VDEV_GET_MWS_COEX_STATE_EVENTID,
1894 
1895     /* provide LTE-Coex Dynamic Power Back-off info */
1896     WMI_VDEV_GET_MWS_COEX_DPWB_STATE_EVENTID,
1897 
1898     /* provide LTE-Coex TDM info */
1899     WMI_VDEV_GET_MWS_COEX_TDM_STATE_EVENTID,
1900 
1901     /* provide LTE-Coex IDRx info */
1902     WMI_VDEV_GET_MWS_COEX_IDRX_STATE_EVENTID,
1903 
1904     /* provide LTE-Coex antenna sharing info */
1905     WMI_VDEV_GET_MWS_COEX_ANTENNA_SHARING_STATE_EVENTID,
1906 
1907     /* Event to handle FW offloaded mgmt packets */
1908     WMI_VDEV_MGMT_OFFLOAD_EVENTID,
1909 
1910     /* FW response to Host for delete all peer cmdid */
1911     WMI_VDEV_DELETE_ALL_PEER_RESP_EVENTID,
1912 
1913     /** Indicates host to start/stop strobing for QTIMER periodically */
1914     WMI_VDEV_AUDIO_SYNC_START_STOP_EVENTID,
1915     /** Sends the final offset in the QTIMERs of both master and slave */
1916     WMI_VDEV_AUDIO_SYNC_Q_MASTER_SLAVE_OFFSET_EVENTID,
1917     /** VDEV_SEND_BIG_DATA_EVENT IS DEPRECATED - DO NOT USE */
1918     WMI_VDEV_SEND_BIG_DATA_EVENTID,
1919     /** send BIG DATA stats to host phase 2 */
1920     WMI_VDEV_SEND_BIG_DATA_P2_EVENTID,
1921     /** Latency related information received from beacon IE */
1922     WMI_VDEV_BCN_LATENCY_EVENTID,
1923     /** Disconnect request from FW */
1924     WMI_VDEV_DISCONNECT_EVENTID,
1925     /** Send Smart Monitor related params to host */
1926     WMI_VDEV_SMART_MONITOR_EVENTID,
1927     /** Send status of vdev mac address update request to host */
1928     WMI_VDEV_UPDATE_MAC_ADDR_CONF_EVENTID,
1929     /** event to report latency level honored by FW */
1930     WMI_VDEV_LATENCY_LEVEL_EVENTID,
1931     /** Result from firmware about completed scheduler probing */
1932     WMI_VDEV_SCHED_MODE_PROBE_RESP_EVENTID,
1933     /** Connect response */
1934     WMI_VDEV_OOB_CONNECTION_RESP_EVENTID,
1935 
1936     /* peer specific events */
1937     /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
1938     WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
1939 
1940     /** Peer Info Event with data_rate, RSSI, tx_fail_cnt etc */
1941     WMI_PEER_INFO_EVENTID,
1942 
1943     /** Event indicating that TX fail count reaching threshold */
1944     WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
1945 
1946     /* Return the estimate link speed for the Peer specified in the
1947      * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command.
1948      */
1949     WMI_PEER_ESTIMATED_LINKSPEED_EVENTID,
1950     /* Return the peer state
1951      * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE
1952      */
1953     WMI_PEER_STATE_EVENTID,
1954 
1955     /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD.
1956      * After that, host will send Mx message.
1957      * Otherwise, host will pause any Mx(STA:M2/M4) message
1958      */
1959     WMI_PEER_ASSOC_CONF_EVENTID,
1960 
1961     /* FW response to Host for peer delete cmdid */
1962     WMI_PEER_DELETE_RESP_EVENTID,
1963 
1964     /** Valid rate code list for peer  */
1965     WMI_PEER_RATECODE_LIST_EVENTID,
1966     WMI_WDS_PEER_EVENTID,
1967     WMI_PEER_STA_PS_STATECHG_EVENTID,
1968     /** Peer Ant Div Info Event with RSSI per chain, etc */
1969     WMI_PEER_ANTDIV_INFO_EVENTID,
1970 
1971     /*
1972      * WMI_PEER_RESERVED_EVENTID
1973      * These values are used for placeholders, to allow the subsequent
1974      * WMI_PEER_OPER_MODE_CHANGE_EVENTID constant to have the same value
1975      * as it had in its original location, when it was mistakenly placed
1976      * amongst the WMI_PEER CMDID defs.
1977      *
1978      * These WMI_PEER_RESERVED values can be replaced with actual WMI peer
1979      * event message IDs, though it will be simpler to instead add new
1980      * WMI_PEER EVENTID defs at the end of the WMI_GRP_PEER WMI_EVT_GRP.
1981      */
1982     WMI_PEER_RESERVED0_EVENTID,
1983     WMI_PEER_RESERVED1_EVENTID,
1984     WMI_PEER_RESERVED2_EVENTID,
1985     WMI_PEER_RESERVED3_EVENTID,
1986     WMI_PEER_RESERVED4_EVENTID,
1987     WMI_PEER_RESERVED5_EVENTID,
1988     WMI_PEER_RESERVED6_EVENTID,
1989     WMI_PEER_RESERVED7_EVENTID,
1990     WMI_PEER_RESERVED8_EVENTID,
1991     WMI_PEER_RESERVED9_EVENTID,
1992     WMI_PEER_RESERVED10_EVENTID,
1993     /** Peer operating mode change indication sent to host to update stats */
1994     WMI_PEER_OPER_MODE_CHANGE_EVENTID,
1995 
1996     /** report the current tx PN for the peer */
1997     WMI_PEER_TX_PN_RESPONSE_EVENTID,
1998 
1999     WMI_PEER_CFR_CAPTURE_EVENTID,
2000 
2001     /* Peer Create Conf event to confirm fw had received WMI_PEER_CREATE_CMDID
2002      * and status of WMI_PEER_CREATE_CMDID.
2003      */
2004     WMI_PEER_CREATE_CONF_EVENTID,
2005 
2006     WMI_PEER_RX_PN_RESPONSE_EVENTID,
2007 
2008 
2009     /* beacon/mgmt specific events */
2010     /** RX management frame. the entire frame is carried along with the event.  */
2011     WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
2012     /** software beacon alert event to Host requesting host to Queue a beacon for transmission
2013      use only in host beacon mode */
2014     WMI_HOST_SWBA_EVENTID,
2015     /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theoretical value.
2016      tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in
2017      staggered beacon transmission mode */
2018     WMI_TBTTOFFSET_UPDATE_EVENTID,
2019 
2020     /** event after the first beacon is transmitted following
2021              a change in the template.*/
2022     WMI_OFFLOAD_BCN_TX_STATUS_EVENTID,
2023     /** event after the first probe response is transmitted following
2024              a change in the template.*/
2025     WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID,
2026     /** Event for Mgmt TX completion event */
2027     WMI_MGMT_TX_COMPLETION_EVENTID,
2028     /** Event for Mgmt TX bundle completion event */
2029     WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID,
2030     /** vdev_map used in WMI_TBTTOFFSET_UPDATE_EVENTID supports max 32 vdevs.
2031      *   Use this event if number of vdevs > 32.
2032      */
2033     WMI_TBTTOFFSET_EXT_UPDATE_EVENTID,
2034     /** Event for offchan data TX completion event */
2035     WMI_OFFCHAN_DATA_TX_COMPLETION_EVENTID,
2036 
2037     /** software FILS Discovery Frame alert event to Host, requesting host to Queue an FD frame for transmission */
2038     WMI_HOST_SWFDA_EVENTID,
2039 
2040     /** software beacon alert event to Host requesting host to Queue a beacon for transmission.
2041      *   Used only in host beacon mode. */
2042     WMI_HOST_SWBA_V2_EVENTID,
2043 
2044     /** Event for QoS null frame TX completion  */
2045     WMI_QOS_NULL_FRAME_TX_COMPLETION_EVENTID,
2046 
2047     /** WMI event for Firmware Consumed/Dropped Rx management frames indication */
2048     WMI_MGMT_RX_FW_CONSUMED_EVENTID,
2049 
2050     /** WMI event for indication to Host to reap the MGMT SRNG */
2051     WMI_MGMT_SRNG_REAP_EVENTID,
2052 
2053 
2054     /* ADDBA Related WMI Events*/
2055     /** Indication the completion of the prior
2056      WMI_PEER_TID_DELBA_CMDID(initiator) */
2057     WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
2058     /** Indication the completion of the prior
2059      *WMI_PEER_TID_ADDBA_CMDID(initiator) */
2060     WMI_TX_ADDBA_COMPLETE_EVENTID,
2061 
2062     /* Seq num returned from hw for a sta/tid pair */
2063     WMI_BA_RSP_SSN_EVENTID,
2064 
2065     /* Aggregation state requested by BTC */
2066     WMI_AGGR_STATE_TRIG_EVENTID,
2067 
2068     /** Roam event to trigger roaming on host */
2069     WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
2070 
2071     /** matching AP found from list of profiles */
2072     WMI_PROFILE_MATCH,
2073     /** roam synch event */
2074     WMI_ROAM_SYNCH_EVENTID,
2075     /** roam synch frame event */
2076     WMI_ROAM_SYNCH_FRAME_EVENTID,
2077     /** various roam scan stats */
2078     WMI_ROAM_SCAN_STATS_EVENTID,
2079     /** Blacklisted AP information event */
2080     WMI_ROAM_BLACKLIST_EVENTID,
2081     /** Roam Pre-Authentication start event */
2082     WMI_ROAM_PREAUTH_START_EVENTID,
2083     /** Roaming PMKID request event */
2084     WMI_ROAM_PMKID_REQUEST_EVENTID,
2085     /** roam stats */
2086     WMI_ROAM_STATS_EVENTID,
2087     /** Roam scan channels list */
2088     WMI_ROAM_SCAN_CHANNEL_LIST_EVENTID,
2089     /** Firmware roam capability information */
2090     WMI_ROAM_CAPABILITY_REPORT_EVENTID,
2091     /** Send AP frame content like beacon/probe resp etc.. */
2092     WMI_ROAM_FRAME_EVENTID,
2093     /** Send firmware ini value corresponding to param_id */
2094     WMI_ROAM_GET_VENDOR_CONTROL_PARAM_EVENTID,
2095     /** roam synch key event */
2096     WMI_ROAM_SYNCH_KEY_EVENTID,
2097 
2098     /** P2P disc found */
2099     WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
2100     /** send noa info to host when noa is changed for beacon tx offload enable */
2101     WMI_P2P_NOA_EVENTID,
2102     /** send p2p listen offload stopped event with different reason */
2103     WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID,
2104 
2105     /** send event to AP assisted P2P GO to change current DFS channel */
2106     WMI_P2P_CLI_DFS_AP_BMISS_DETECTED_EVENTID,
2107 
2108     /** Send EGAP Info to host */
2109     WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS),
2110 
2111     /* send pdev resume event to host after pdev resume. */
2112     WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND),
2113 
2114     /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID.
2115      will cary wake reason */
2116     WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
2117     WMI_D0_WOW_DISABLE_ACK_EVENTID,
2118     WMI_WOW_INITIAL_WAKEUP_EVENTID,
2119     WMI_WOW_COAP_BUF_INFO_EVENTID,
2120 
2121     /* RTT related event ID */
2122     /** RTT measurement report */
2123     WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
2124     /** TSF measurement report */
2125     WMI_TSF_MEASUREMENT_REPORT_EVENTID,
2126     /** RTT error report */
2127     WMI_RTT_ERROR_REPORT_EVENTID,
2128     /** RTT 11az PASN peer create request */
2129     WMI_RTT_PASN_PEER_CREATE_REQ_EVENTID,
2130     /** RTT 11az PASN peer delete event */
2131     WMI_RTT_PASN_PEER_DELETE_EVENTID,
2132 
2133     /*STATS specific events*/
2134     /** txrx stats event requested by host */
2135     WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS),
2136     /** FW iface link stats Event  */
2137     WMI_IFACE_LINK_STATS_EVENTID,
2138     /** FW iface peer link stats Event  */
2139     WMI_PEER_LINK_STATS_EVENTID,
2140     /** FW Update radio stats Event  */
2141     WMI_RADIO_LINK_STATS_EVENTID,
2142 
2143     /**  Firmware memory dump Complete event*/
2144     WMI_UPDATE_FW_MEM_DUMP_EVENTID,
2145 
2146     /** Event indicating the DIAG logs/events supported by FW */
2147     WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID,
2148 
2149     /** Instantaneous RSSI event */
2150     WMI_INST_RSSI_STATS_EVENTID,
2151 
2152     /** FW update tx power levels event */
2153     WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID,
2154 
2155     /** This event is used to report wlan stats to host.
2156      * It is triggered under 3 conditions:
2157      * (a) Periodic timer timed out, based on the period specified
2158      *     by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
2159      * (b) Whenever any of the (enabled) stats thresholds specified
2160      *     in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
2161      *     within the current stats period.
2162      * (c) In response to the one-time wlan stats request of
2163      *     WMI_REQUEST_WLAN_STATS_CMDID from host.
2164      *
2165      *  If this event is triggered by condition a or b,
2166      *  the stats counters are cleared at the start of each period.
2167      *  But if it is triggered by condition c, stats counters won't be cleared.
2168      */
2169     WMI_REPORT_STATS_EVENTID,
2170 
2171     /** Event indicating RCPI of the peer requested by host in the WMI_REQUEST_RCPI_CMDID */
2172     WMI_UPDATE_RCPI_EVENTID,
2173 
2174     /** This event is used to respond to WMI_REQUEST_PEER_STATS_INFO_CMDID
2175      *  and report peer stats info to host */
2176     WMI_PEER_STATS_INFO_EVENTID,
2177 
2178     /** This event is used to respond to WMI_REQUEST_RADIO_CHAN_STATS_CMDID
2179      *  and report radio channel stats to host */
2180     WMI_RADIO_CHAN_STATS_EVENTID,
2181 
2182     /** This event is used to respond to WMI_REQUEST_WLM_STATS_CMDID
2183      *  and report WLM (WLAN latency manager) stats info to host */
2184     WMI_WLM_STATS_EVENTID,
2185 
2186     /** This event is used to respond to WMI_REQUEST_CTRL_PATH_STATS_CMDID
2187      *  and report stats info to host */
2188     WMI_CTRL_PATH_STATS_EVENTID,
2189 
2190     /** This event is used to respond to
2191      * WMI_REQUEST_HALPHY_CTRL_PATH_STATS_CMDID and report stats info to host
2192      */
2193     WMI_HALPHY_CTRL_PATH_STATS_EVENTID,
2194 
2195     /** FW IPA link stats Event */
2196     WMI_IPA_LINK_STATS_EVENTID,
2197 
2198 
2199     /* NLO specific events */
2200     /** NLO match event after the first match */
2201     WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
2202 
2203     /** NLO scan complete event */
2204     WMI_NLO_SCAN_COMPLETE_EVENTID,
2205 
2206     /** APFIND specific events */
2207     WMI_APFIND_EVENTID,
2208 
2209     /** passpoint network match event */
2210     WMI_PASSPOINT_MATCH_EVENTID,
2211 
2212     /** GTK offload stautus event requested by host */
2213     WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
2214 
2215     /** GTK offload failed to rekey event */
2216     WMI_GTK_REKEY_FAIL_EVENTID,
2217 
2218     /* CSA handling event */
2219     WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
2220     /* CSA IE received event */
2221     WMI_CSA_IE_RECEIVED_EVENTID,
2222 
2223     /*chatter query reply event*/
2224     WMI_CHATTER_PC_QUERY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER),
2225 
2226     /** DFS related events */
2227     WMI_PDEV_DFS_RADAR_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_DFS),
2228     /** Indicate channel-availability-check completion event to host */
2229     WMI_VDEV_DFS_CAC_COMPLETE_EVENTID,
2230     /** Indicate off-channel-availability-check completion event to host */
2231     WMI_VDEV_ADFS_OCAC_COMPLETE_EVENTID,
2232 
2233     /** echo event in response to echo command */
2234     WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
2235 
2236     /* !!IMPORTANT!!
2237      * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group,
2238      * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID,
2239      * as we MUST have a fixed value here to maintain compatibility between
2240      * UTF and the ART2 driver
2241      */
2242     /** UTF specific WMI event */
2243     WMI_PDEV_UTF_EVENTID,
2244 
2245     /** event carries buffered debug messages  */
2246     WMI_DEBUG_MESG_EVENTID,
2247     /** FW stats(periodic or on shot)  */
2248     WMI_UPDATE_STATS_EVENTID,
2249     /** debug print message used for tracing FW code while debugging  */
2250     WMI_DEBUG_PRINT_EVENTID,
2251     /** DCS wlan or non-wlan interference event
2252      */
2253     WMI_DCS_INTERFERENCE_EVENTID,
2254     /** VI spoecific event  */
2255     WMI_PDEV_QVIT_EVENTID,
2256     /** FW code profile data in response to profile request  */
2257     WMI_WLAN_PROFILE_DATA_EVENTID,
2258     /* Factory Testing Mode request event
2259      * used for integrated chipsets */
2260     WMI_PDEV_FTM_INTG_EVENTID,
2261     /* avoid list of frequencies .
2262      */
2263     WMI_WLAN_FREQ_AVOID_EVENTID,
2264     /* Indicate the keepalive parameters */
2265     WMI_VDEV_GET_KEEPALIVE_EVENTID,
2266     /*Thermal Management event*/
2267     WMI_THERMAL_MGMT_EVENTID,
2268 
2269     /* Container for DIAG event and log data */
2270     WMI_DIAG_DATA_CONTAINER_EVENTID,
2271 
2272     /* host auto shutdown event */
2273     WMI_HOST_AUTO_SHUTDOWN_EVENTID,
2274 
2275     /*update mib counters together with WMI_UPDATE_STATS_EVENTID*/
2276     WMI_UPDATE_WHAL_MIB_STATS_EVENTID,
2277 
2278     /*update ht/vht info based on vdev (rx and tx NSS and preamble)*/
2279     WMI_UPDATE_VDEV_RATE_STATS_EVENTID,
2280 
2281     WMI_DIAG_EVENTID,
2282 
2283     /** Set OCB Sched Response, deprecated */
2284     WMI_OCB_SET_SCHED_EVENTID,
2285 
2286     /** event to indicate the flush of the buffered debug messages is complete*/
2287     WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
2288 
2289     /** event to report mix/max RSSI breach events */
2290     WMI_RSSI_BREACH_EVENTID,
2291 
2292     /** event to report completion of data storage into flash memory */
2293     WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID,
2294 
2295     /** event to report SCPC calibrated data to host */
2296     WMI_PDEV_UTF_SCPC_EVENTID,
2297 
2298     /** event to provide requested data from the target's flash memory */
2299     WMI_READ_DATA_FROM_FLASH_EVENTID,
2300 
2301     /** event to report rx aggregation failure frame information */
2302     WMI_REPORT_RX_AGGR_FAILURE_EVENTID,
2303 
2304     /** event to upload a PKGID to host to identify chip for various products */
2305     WMI_PKGID_EVENTID,
2306 
2307     /* Thermal Throttling stats event id for every pdev and zones, etc */
2308     WMI_THERM_THROT_STATS_EVENTID,
2309 
2310     /* WMI UNIT TEST event */
2311     WMI_UNIT_TEST_EVENTID,
2312 
2313     /** event to report result of host configure SAR2 */
2314     WMI_SAR2_RESULT_EVENTID,
2315 
2316     /** event to get TX power per input HALPHY parameters */
2317     WMI_GET_TPC_POWER_EVENTID,
2318 
2319     /** event to provide MU-EDCA Parameters (to update host's beacon config) */
2320     WMI_MUEDCA_PARAMS_CONFIG_EVENTID,
2321 
2322     /** event to get ELNA BYPASS status */
2323     WMI_GET_ELNA_BYPASS_EVENTID,
2324 
2325     /** event to report ANI level of the channels */
2326     WMI_GET_CHANNEL_ANI_EVENTID,
2327 
2328     /* WMI event to available scratch registers */
2329     WMI_PMM_AVAILABLE_SCRATCH_REG_EVENTID,
2330 
2331     /* WMI event to scratch registers allocation */
2332     WMI_PMM_SCRATCH_REG_ALLOCATION_COMPLETE_EVENTID,
2333 
2334     /* WMI event to indicate Helath Monitor Infra init done */
2335     WMI_HEALTH_MON_INIT_DONE_EVENTID,
2336 
2337     /* WMI XGAP enable command response event ID */
2338     WMI_XGAP_ENABLE_COMPLETE_EVENTID,
2339 
2340     /* T2H HPA message */
2341     WMI_HPA_EVENTID,
2342 
2343     /* WMI standalone command complete Event */
2344     WMI_VDEV_STANDALONE_SOUND_COMPLETE_EVENTID,
2345 
2346     /* WMI evt to indicate switch type either to WLAN(XPAN) or non_WLAN(BLE) */
2347     WMI_AUDIO_TRANSPORT_SWITCH_TYPE_EVENTID,
2348 
2349 
2350     /* GPIO Event */
2351     WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
2352     /** upload H_CV info WMI event
2353      * to indicate uploaded H_CV info to host
2354      */
2355     WMI_UPLOADH_EVENTID,
2356 
2357     /** capture H info WMI event
2358      * to indicate captured H info to host
2359      */
2360     WMI_CAPTUREH_EVENTID,
2361     /* hw RFkill */
2362     WMI_RFKILL_STATE_CHANGE_EVENTID,
2363 
2364     /* Smart Antenna Controller status */
2365     WMI_SMARTANT_STATE_CHANGE_EVENTID,
2366 
2367     WMI_GPIO_STATE_RES_EVENTID,
2368 
2369     /* TDLS Event */
2370     WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
2371 
2372     /* Resmgr Event */
2373     /* deliver the new channel time quota for home channels */
2374     WMI_RESMGR_CHAN_TIME_QUOTA_CHANGED_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RESMGR),
2375 
2376     /** STA SMPS Event */
2377     /** force SMPS mode */
2378     WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
2379 
2380     /*location scan event*/
2381     /*report the firmware's capability of batch scan*/
2382     WMI_BATCH_SCAN_ENABLED_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
2383     /*batch scan result*/
2384     WMI_BATCH_SCAN_RESULT_EVENTID,
2385     /* OEM Event */
2386     WMI_OEM_CAPABILITY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OEM), /*DEPRECATED*/
2387     WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
2388     WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
2389     WMI_OEM_RESPONSE_EVENTID,
2390     WMI_OEM_DMA_RING_CFG_RSP_EVENTID,
2391     WMI_OEM_DMA_BUF_RELEASE_EVENTID,
2392     WMI_OEM_DATA_EVENTID,
2393 
2394     /* NAN Event */
2395     WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
2396     WMI_NAN_DISC_IFACE_CREATED_EVENTID,
2397     WMI_NAN_DISC_IFACE_DELETED_EVENTID,
2398     WMI_NAN_STARTED_CLUSTER_EVENTID,
2399     WMI_NAN_JOINED_CLUSTER_EVENTID,
2400     WMI_NAN_DMESG_EVENTID,
2401     /** Event to deliver OEM's NAN specific opaque data */
2402     WMI_NAN_OEM_DATA_EVENTID,
2403 
2404     /* Coex Event */
2405     WMI_COEX_REPORT_ANTENNA_ISOLATION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_COEX),
2406     WMI_SAR_GET_LIMITS_EVENTID,
2407     /** Dedicated BT Antenna Mode (DBAM) complete event */
2408     WMI_COEX_DBAM_COMPLETE_EVENTID,
2409     WMI_TAS_POWER_HISTORY_EVENTID,
2410 
2411     /* LPI Event */
2412     WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
2413     WMI_LPI_STATUS_EVENTID,
2414     WMI_LPI_HANDOFF_EVENTID,
2415 
2416     /* ExtScan events */
2417     WMI_EXTSCAN_START_STOP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
2418     WMI_EXTSCAN_OPERATION_EVENTID,
2419     WMI_EXTSCAN_TABLE_USAGE_EVENTID,
2420     WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
2421     WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
2422     WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
2423     WMI_EXTSCAN_CAPABILITIES_EVENTID,
2424     WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
2425 
2426     /* mDNS offload events */
2427     WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
2428 
2429     /* SAP Authentication offload events */
2430     WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
2431     WMI_SAP_OFL_DEL_STA_EVENTID,
2432     WMI_SAP_OBSS_DETECTION_REPORT_EVENTID,
2433 
2434     /* OBSS Offloads events */
2435     WMI_OBSS_COLOR_COLLISION_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OBSS_OFL),
2436 
2437     /** Out-of-context-of-bss (OCB) events */
2438     WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
2439     WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
2440     WMI_DCC_GET_STATS_RESP_EVENTID,
2441     WMI_DCC_UPDATE_NDL_RESP_EVENTID,
2442     WMI_DCC_STATS_EVENTID,
2443 
2444     /* System-On-Chip events */
2445     WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
2446     WMI_SOC_HW_MODE_TRANSITION_EVENTID,
2447     WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
2448 
2449     /** Motion Aided WiFi Connectivity (MAWC) events */
2450     WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
2451 
2452     /** pkt filter (BPF) offload relevant events */
2453     WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
2454     WMI_BPF_VDEV_STATS_INFO_EVENTID,
2455     WMI_BPF_GET_VDEV_WORK_MEMORY_RESP_EVENTID,
2456 
2457     /* RMC specific event */
2458     /* RMC manual leader selected event */
2459     WMI_RMC_NEW_LEADER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RMC),
2460 
2461     /** WMI events related to regulatory offload */
2462     WMI_REG_CHAN_LIST_CC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_REGULATORY),
2463     WMI_11D_NEW_COUNTRY_EVENTID,
2464     WMI_REG_CHAN_LIST_CC_EXT_EVENTID,
2465     WMI_AFC_EVENTID,
2466     WMI_REG_CHAN_LIST_CC_EXT2_EVENTID, /* DEPRECATED */
2467 
2468     /** Events for TWT(Target Wake Time) of STA and AP  */
2469     WMI_TWT_ENABLE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TWT),
2470     WMI_TWT_DISABLE_COMPLETE_EVENTID,
2471     WMI_TWT_ADD_DIALOG_COMPLETE_EVENTID,
2472     WMI_TWT_DEL_DIALOG_COMPLETE_EVENTID,
2473     WMI_TWT_PAUSE_DIALOG_COMPLETE_EVENTID,
2474     WMI_TWT_RESUME_DIALOG_COMPLETE_EVENTID,
2475     WMI_TWT_BTWT_INVITE_STA_COMPLETE_EVENTID,
2476     WMI_TWT_BTWT_REMOVE_STA_COMPLETE_EVENTID,
2477     WMI_TWT_SESSION_STATS_EVENTID,
2478     WMI_TWT_NUDGE_DIALOG_COMPLETE_EVENTID,
2479     WMI_TWT_NOTIFY_EVENTID,
2480     WMI_TWT_ACK_EVENTID,
2481 
2482     /** Events in Prototyping phase */
2483     WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE),
2484     WMI_NDP_INITIATOR_RSP_EVENTID,
2485     WMI_NDP_RESPONDER_RSP_EVENTID,
2486     WMI_NDP_END_RSP_EVENTID,
2487     WMI_NDP_INDICATION_EVENTID,
2488     WMI_NDP_CONFIRM_EVENTID,
2489     WMI_NDP_END_INDICATION_EVENTID,
2490     WMI_WLAN_COEX_BT_ACTIVITY_EVENTID,
2491     WMI_NDL_SCHEDULE_UPDATE_EVENTID,
2492     WMI_NDP_EVENTID,
2493 
2494     /** WMI events related to motion detection */
2495     WMI_MOTION_DET_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MOTION_DET),
2496     WMI_MOTION_DET_BASE_LINE_HOST_EVENTID,
2497 
2498     /** WMI events related to Estimation of Service Parameters (802.11mc) */
2499     WMI_ESP_ESTIMATE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ESP),
2500 
2501     /** WMI events related to Audio Frame aggregation feature **/
2502     WMI_AUDIO_AGGR_REPORT_STATISTICS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AUDIO),
2503     WMI_AUDIO_AGGR_SCHED_METHOD_EVENTID,
2504 
2505     /** Vendor defined WMI events **/
2506     WMI_VENDOR_PDEV_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VENDOR),
2507     WMI_VENDOR_VDEV_EVENTID,
2508     WMI_VENDOR_PEER_EVENTID,
2509     /** Further vendor event IDs can be added below **/
2510 
2511     /** WMI event specific to MLO **/
2512     /** MLO link active / inactive response event */
2513     WMI_MLO_LINK_SET_ACTIVE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MLO),
2514     /* Response event for MLO setup cmd */
2515     WMI_MLO_SETUP_COMPLETE_EVENTID,
2516     /* Response event for MLO teardown cmd */
2517     WMI_MLO_TEARDOWN_COMPLETE_EVENTID,
2518     /* Response event for Link Removal Cmd */
2519     WMI_MLO_LINK_REMOVAL_EVENTID,
2520     /* Response event for WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_CMDID */
2521     WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_EVENTID,
2522     /* Response event for WMI_MLO_VDEV_GET_LINK_INFO_CMDID */
2523     WMI_MLO_VDEV_LINK_INFO_EVENTID,
2524     /** request host to do T2LM neg to the un-disabled link */
2525     WMI_MLO_LINK_DISABLE_REQUEST_EVENTID,
2526     /** request host to switch to new link for specified vdev */
2527     WMI_MLO_LINK_SWITCH_REQUEST_EVENTID,
2528     /** Response event for WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID */
2529     WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_EVENTID,
2530     /** WMI Event to spcify reason for link state switch */
2531     WMI_MLO_LINK_STATE_SWITCH_EVENTID,
2532     /** WMI Event to sync link info to host */
2533     WMI_MLO_LINK_INFO_SYNC_EVENTID,
2534     /** WMI Event to announce host about the TLT update for TID */
2535     WMI_MLO_TLT_SELECTION_FOR_TID_SPRAY_EVENTID,
2536 
2537     /* WMI event specific to Quiet handling */
2538     WMI_QUIET_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_QUIET_OFL),
2539 
2540     /* ODD events */
2541     WMI_ODD_LIVEDUMP_RESPONSE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ODD),
2542 
2543     /** WMI events specific to manually-triggered UL */
2544     /**
2545      * WMI Event to send Manual UL OFDMA Trigger frame status feedback to Host
2546      */
2547     WMI_MANUAL_UL_OFDMA_TRIG_FEEDBACK_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MANUAL_UL_TRIG),
2548     /**
2549      * WMI Event to send Manual UL OFDMA Trigger frame RX PPDU info to Host
2550      */
2551     WMI_MANUAL_UL_OFDMA_TRIG_RX_PEER_USERINFO_EVENTID,
2552 } WMI_EVT_ID;
2553 
2554 /* defines for OEM message sub-types */
2555 #define WMI_OEM_CAPABILITY_REQ     0x01
2556 #define WMI_OEM_CAPABILITY_RSP     0x02
2557 #define WMI_OEM_MEASUREMENT_REQ    0x03
2558 #define WMI_OEM_MEASUREMENT_RSP    0x04
2559 #define WMI_OEM_ERROR_REPORT_RSP   0x05
2560 #define WMI_OEM_NAN_MEAS_REQ       0x06
2561 #define WMI_OEM_NAN_MEAS_RSP       0x07
2562 #define WMI_OEM_NAN_PEER_INFO      0x08
2563 #define WMI_OEM_CONFIGURE_LCR      0x09
2564 #define WMI_OEM_CONFIGURE_LCI      0x0A
2565 
2566 
2567 #define WMI_CHAN_LIST_TAG                0x1
2568 #define WMI_SSID_LIST_TAG                0x2
2569 #define WMI_BSSID_LIST_TAG               0x3
2570 #define WMI_IE_TAG                       0x4
2571 #define WMI_SCAN_START_OFFSET_TAG        0x5
2572 
2573 typedef struct {
2574     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
2575     /** primary 20 MHz channel frequency in mhz */
2576     A_UINT32 mhz;
2577     /** Center frequency 1 in MHz*/
2578     A_UINT32 band_center_freq1;
2579     /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
2580     A_UINT32 band_center_freq2;
2581     /** channel info described below */
2582     A_UINT32 info;
2583     /** contains min power, max power, reg power and reg class id.  */
2584     A_UINT32 reg_info_1;
2585     /** contains antennamax, max bandwidth */
2586     A_UINT32 reg_info_2;
2587 } wmi_channel;
2588 
2589 typedef enum {
2590     WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
2591     WMI_CHANNEL_CHANGE_CAUSE_CSA,
2592 } wmi_channel_change_cause;
2593 
2594 /** channel info consists of 6 bits of channel mode */
2595 
2596 #define WMI_SET_CHANNEL_MODE(pwmi_channel,val) do { \
2597      (pwmi_channel)->info &= 0xffffffc0;            \
2598      (pwmi_channel)->info |= (val);                 \
2599      } while (0)
2600 
2601 #define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
2602 
2603 #define WMI_CHAN_FLAG_HT40_PLUS   6
2604 #define WMI_CHAN_FLAG_PASSIVE     7
2605 #define WMI_CHAN_ADHOC_ALLOWED    8
2606 #define WMI_CHAN_AP_DISABLED      9
2607 #define WMI_CHAN_FLAG_DFS         10
2608 #define WMI_CHAN_FLAG_ALLOW_HT    11  /* HT is allowed on this channel */
2609 #define WMI_CHAN_FLAG_ALLOW_VHT   12  /* VHT is allowed on this channel */
2610 #define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
2611 #define WMI_CHAN_FLAG_HALF_RATE     14  /* Indicates half rate channel */
2612 #define WMI_CHAN_FLAG_QUARTER_RATE  15  /* Indicates quarter rate channel */
2613 #define WMI_CHAN_FLAG_DFS_CFREQ2  16 /* Enable radar event reporting for sec80 in VHT80p80 */
2614 #define WMI_CHAN_FLAG_ALLOW_HE    17 /* HE (11ax) is allowed on this channel */
2615 #define WMI_CHAN_FLAG_PSC         18 /* Indicate it is a PSC (preferred scanning channel) */
2616 #define WMI_CHAN_FLAG_NAN_DISABLED 19 /* Indicates that NAN operations are disabled on this channel */
2617 #define WMI_CHAN_FLAG_STA_DFS     20 /* Indicates if STA should process radar signals */
2618 #define WMI_CHAN_FLAG_ALLOW_EHT   21 /* EHT (11be) is allowed on this channel */
2619 
2620 #define WMI_SET_CHANNEL_FLAG(pwmi_channel,flag) do { \
2621         (pwmi_channel)->info |=  ((A_UINT32) 1 << flag);      \
2622      } while (0)
2623 
2624 #define WMI_GET_CHANNEL_FLAG(pwmi_channel,flag)   \
2625         (((pwmi_channel)->info & ((A_UINT32) 1 << flag)) >> flag)
2626 
2627 #define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel,val) do { \
2628      (pwmi_channel)->reg_info_1 &= 0xffffff00;           \
2629      (pwmi_channel)->reg_info_1 |= (val & 0xff);         \
2630      } while (0)
2631 #define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
2632 
2633 #define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel,val) do { \
2634      (pwmi_channel)->reg_info_1 &= 0xffff00ff;           \
2635      (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 8);  \
2636      } while (0)
2637 #define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
2638 
2639 #define WMI_SET_CHANNEL_REG_POWER(pwmi_channel,val) do { \
2640      (pwmi_channel)->reg_info_1 &= 0xff00ffff;           \
2641      (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 16); \
2642      } while (0)
2643 #define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
2644 #define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel,val) do { \
2645      (pwmi_channel)->reg_info_1 &= 0x00ffffff;             \
2646      (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 24);   \
2647      } while (0)
2648 #define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
2649 
2650 #define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel,val) do { \
2651      (pwmi_channel)->reg_info_2 &= 0xffffff00;             \
2652      (pwmi_channel)->reg_info_2 |= (val & 0xff);           \
2653      } while (0)
2654 #define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
2655 
2656 /* max tx power is in 1 dBm units */
2657 #define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel,val) do { \
2658      (pwmi_channel)->reg_info_2 &= 0xffff00ff;              \
2659      (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 8);     \
2660      } while (0)
2661 #define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
2662 
2663 /* max bw supported for each channel, enum wmi_channel_width as value */
2664 #define WMI_SET_CHANNEL_MAX_BANDWIDTH(pwmi_channel,val) do { \
2665      (pwmi_channel)->reg_info_2 &= 0xff00ffff;              \
2666      (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 16);     \
2667      } while (0)
2668 #define WMI_GET_CHANNEL_MAX_BANDWIDTH(pwmi_channel) ((((pwmi_channel)->reg_info_2) >> 16) & 0xff)
2669 
2670 /** HT Capabilities*/
2671 #define WMI_HT_CAP_ENABLED                0x0001   /* HT Enabled/ disabled */
2672 #define WMI_HT_CAP_HT20_SGI               0x0002   /* Short Guard Interval with HT20 */
2673 #define WMI_HT_CAP_DYNAMIC_SMPS           0x0004   /* Dynamic MIMO powersave */
2674 #define WMI_HT_CAP_TX_STBC                0x0008   /* B3 TX STBC */
2675 #define WMI_HT_CAP_TX_STBC_MASK_SHIFT     3
2676 #define WMI_HT_CAP_RX_STBC                0x0030   /* B4-B5 RX STBC */
2677 #define WMI_HT_CAP_RX_STBC_MASK_SHIFT     4
2678 #define WMI_HT_CAP_LDPC                   0x0040   /* LDPC supported */
2679 #define WMI_HT_CAP_L_SIG_TXOP_PROT        0x0080   /* L-SIG TXOP Protection */
2680 #define WMI_HT_CAP_MPDU_DENSITY           0x0700   /* MPDU Density */
2681 #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
2682 #define WMI_HT_CAP_HT40_SGI               0x0800
2683 #define WMI_HT_CAP_RX_LDPC                0x1000   /* LDPC RX support */
2684 #define WMI_HT_CAP_TX_LDPC                0x2000   /* LDPC TX support */
2685 
2686 
2687 /* These macros should be used when we wish to advertise STBC support for
2688  * only 1SS or 2SS or 3SS. */
2689 #define WMI_HT_CAP_RX_STBC_1SS            0x0010   /* B4-B5 RX STBC */
2690 #define WMI_HT_CAP_RX_STBC_2SS            0x0020   /* B4-B5 RX STBC */
2691 #define WMI_HT_CAP_RX_STBC_3SS            0x0030   /* B4-B5 RX STBC */
2692 
2693 
2694 #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED       | \
2695                                 WMI_HT_CAP_HT20_SGI      | \
2696                                 WMI_HT_CAP_HT40_SGI      | \
2697                                 WMI_HT_CAP_TX_STBC       | \
2698                                 WMI_HT_CAP_RX_STBC       | \
2699                                 WMI_HT_CAP_LDPC          | \
2700                                 WMI_HT_CAP_TX_LDPC       | \
2701                                 WMI_HT_CAP_RX_LDPC)
2702 
2703 /* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
2704  field. The fields not defined here are not supported, or reserved.
2705  Do not change these masks and if you have to add new one follow the
2706  bitmask as specified by 802.11ac draft.
2707  */
2708 
2709 
2710 #define WMI_VHT_CAP_MAX_MPDU_LEN_7935            0x00000001
2711 #define WMI_VHT_CAP_MAX_MPDU_LEN_11454           0x00000002
2712 #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK            0x00000003
2713 #define WMI_VHT_CAP_CH_WIDTH_160MHZ              0x00000004
2714 #define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ        0x00000008
2715 #define WMI_VHT_CAP_RX_LDPC                      0x00000010
2716 #define WMI_VHT_CAP_SGI_80MHZ                    0x00000020
2717 #define WMI_VHT_CAP_SGI_160MHZ                   0x00000040
2718 #define WMI_VHT_CAP_TX_STBC                      0x00000080
2719 #define WMI_VHT_CAP_RX_STBC_MASK                 0x00000300
2720 #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT           8
2721 #define WMI_VHT_CAP_SU_BFORMER                   0x00000800
2722 #define WMI_VHT_CAP_SU_BFORMEE                   0x00001000
2723 #define WMI_VHT_CAP_MAX_CS_ANT_MASK              0x0000E000
2724 #define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT        13
2725 #define WMI_VHT_CAP_MAX_SND_DIM_MASK             0x00070000
2726 #define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT       16
2727 #define WMI_VHT_CAP_MU_BFORMER                   0x00080000
2728 #define WMI_VHT_CAP_MU_BFORMEE                   0x00100000
2729 #define WMI_VHT_CAP_TXOP_PS                      0x00200000
2730 #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP            0x03800000
2731 #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT      23
2732 #define WMI_VHT_CAP_RX_FIXED_ANT                 0x10000000
2733 #define WMI_VHT_CAP_TX_FIXED_ANT                 0x20000000
2734 #define WMI_VHT_EXTENDED_NSS_BW_MASK             0xC0000000
2735 #define WMI_VHT_EXTENDED_NSS_BW_MASK_SHIFT       30
2736 
2737 /* TEMPORARY:
2738  * Preserve the incorrect old name as an alias for the correct new name
2739  * until all references to the old name have been removed from all hosts
2740  * and targets.
2741  */
2742 #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
2743 
2744 
2745 /* These macros should be used when we wish to advertise STBC support for
2746  * only 1SS or 2SS or 3SS. */
2747 #define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
2748 #define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
2749 #define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
2750 
2751 /* TEMPORARY:
2752  * Preserve the incorrect old name as an alias for the correct new name
2753  * until all references to the old name have been removed from all hosts
2754  * and targets.
2755  */
2756 #define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
2757 
2758 /* TEMPORARY:
2759  * Spec does not have VHT TX LDPC capability bit. To Maintain backward
2760  * compatibility due to previous incorrect definition, the value is moved
2761  * from 0x4 to 0x0. No new use of WMI_VHT_CAP_TX_LDPC should be added.
2762  */
2763 #define WMI_VHT_CAP_TX_LDPC 0x0
2764 
2765 
2766 #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454  |      \
2767                                  WMI_VHT_CAP_SGI_80MHZ           |      \
2768                                  WMI_VHT_CAP_TX_STBC             |      \
2769                                  WMI_VHT_CAP_RX_STBC_MASK        |      \
2770                                  WMI_VHT_CAP_RX_LDPC             |      \
2771                                  WMI_VHT_CAP_TX_LDPC             |      \
2772                                  WMI_VHT_CAP_MAX_AMPDU_LEN_EXP   |      \
2773                                  WMI_VHT_CAP_RX_FIXED_ANT        |      \
2774                                  WMI_VHT_CAP_TX_FIXED_ANT)
2775 
2776 /* Interested readers refer to Rx/Tx MCS Map definition as defined in
2777  802.11ac
2778  */
2779 #define WMI_VHT_MAX_MCS_EXT_SS_GET(vht_mcs_map, index) WMI_GET_BITS(vht_mcs_map, 16 + index, 1)
2780 #define WMI_VHT_MAX_MCS_EXT_SS_SET(vht_mcs_map, index, value) WMI_SET_BITS(vht_mcs_map, 16 + index, 1, value)
2781 
2782 /* Notification bit for Ext MCS 10/11 support */
2783 #define WMI_VHT_MCS_NOTIFY_EXT_SS_GET(vht_mcs_map) WMI_GET_BITS(vht_mcs_map, 24, 1)
2784 #define WMI_VHT_MCS_NOTIFY_EXT_SS_SET(vht_mcs_map, value) WMI_SET_BITS(vht_mcs_map, 24, 1, value)
2785 
2786 #define WMI_VHT_MAX_MCS_4_SS_MASK(r,ss)      ((3 & (r)) << (((ss) - 1) << 1))
2787 #define WMI_VHT_MAX_SUPP_RATE_MASK           0x1fff0000
2788 #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT     16
2789 
2790 /** 11ax capabilities */
2791 #define WMI_HE_CAP_PPE_PRESENT            0x00000001
2792 #define WMI_HE_CAP_TWT_RESPONDER_SUPPORT  0x00000002
2793 #define WMI_HE_CAP_TWT_REQUESTER_SUPPORT  0x00000004
2794 #define WMI_HE_FRAG_SUPPORT_MASK          0x00000018
2795 #define WMI_HE_FRAG_SUPPORT_SHIFT         3
2796 
2797 #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT      0x00000001
2798 #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT      0x00000002
2799 #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT     0x00000004
2800 #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT          0x00000018
2801 #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT         0x00000030
2802 
2803 #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT_GET(he_cap_info_dword1) \
2804     WMI_GET_BITS(he_cap_info_dword1, 0, 1)
2805 #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT_SET(he_cap_info_dword1, value) \
2806     WMI_SET_BITS(he_cap_info_dword1, 0, 1, value)
2807 
2808 #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT_GET(he_cap_info_dword1) \
2809     WMI_GET_BITS(he_cap_info_dword1, 1, 1)
2810 #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT_SET(he_cap_info_dword1, value) \
2811     WMI_SET_BITS(he_cap_info_dword1, 1, 1, value)
2812 
2813 #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT_GET(he_cap_info_dword1) \
2814     WMI_GET_BITS(he_cap_info_dword1, 2, 1)
2815 #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT_SET(he_cap_info_dword1, value) \
2816     WMI_SET_BITS(he_cap_info_dword1, 2, 1, value)
2817 
2818 #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT_GET(he_cap_info_dword1) \
2819     WMI_GET_BITS(he_cap_info_dword1, 3, 2)
2820 #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT_SET(he_cap_info_dword1, value) \
2821     WMI_SET_BITS(he_cap_info_dword1, 3, 2, value)
2822 
2823 #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT_GET(he_cap_info_dword1) \
2824     WMI_GET_BITS(he_cap_info_dword1, 5, 2)
2825 #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT_SET(he_cap_info_dword1, value) \
2826     WMI_SET_BITS(he_cap_info_dword1, 5, 2, value)
2827 
2828 /* Interested readers refer to Rx/Tx MCS Map definition as defined in 802.11ax
2829  */
2830 #define WMI_HE_MAX_MCS_4_SS_MASK(r,ss)      ((3 & (r)) << (((ss) - 1) << 1))
2831 
2832 /*
2833  * index ranges from 0 to 15, and is used for checking if MCS 12/13 is enabled
2834  * for a particular NSS.
2835  * The lower 8 bits (indices 0-7) within the 16 bits indicate MCS 12/13
2836  * enablement for BW <= 80MHz; the upper 8 bits (indices 8-15) within
2837  * the 16 bits indicate MCS 12/13 enablement for BW > 80MHz.
2838  * The 16 bits for the index values are within the upper bits (bits 31:16)
2839  * of a 32-bit word.
2840  */
2841 #define WMI_HE_EXTRA_MCS_SS_GET(he_mcs_map_ext, index) \
2842     WMI_GET_BITS(he_mcs_map_ext, 16 + index, 1)
2843 #define WMI_HE_EXTRA_MCS_SS_SET(he_mcs_map_ext, index, value) \
2844     WMI_SET_BITS(he_mcs_map_ext, 16 + index, 1, value)
2845 
2846 /* fragmentation support field value */
2847 enum {
2848     WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */
2849     WMI_HE_FRAG_SUPPORT_LEVEL1, /* support for fragments within a VHT single MPDU, no support for fragments within AMPDU */
2850     WMI_HE_FRAG_SUPPORT_LEVEL2, /* support for up to 1 fragment per MSDU within a single A-MPDU */
2851     WMI_HE_FRAG_SUPPORT_LEVEL3, /* support for multiple fragments per MSDU within an A-MPDU */
2852 };
2853 
2854 enum {
2855     WMI_HE_RX_DL_OFDMA_SUPPORT_DEFAULT, /* Default */
2856     WMI_HE_RX_DL_OFDMA_SUPPORT_DISABLE, /* RX DL OFDMA Support Disabled */
2857     WMI_HE_RX_DL_OFDMA_SUPPORT_ENABLE,  /* RX DL OFDMA Support Enabled */
2858     WMI_HE_RX_DL_OFDMA_SUPPORT_INVALID, /* INVALID  */
2859 };
2860 
2861 enum {
2862     WMI_HE_RX_DL_MUMIMO_SUPPORT_DEFAULT, /* Default */
2863     WMI_HE_RX_DL_MUMIMO_SUPPORT_DISABLE, /* RX DL MU-MIMO Support Disabled */
2864     WMI_HE_RX_DL_MUMIMO_SUPPORT_ENABLE,  /* RX DL MU-MIMO Support Enabled */
2865     WMI_HE_RX_DL_MUMIMO_SUPPORT_INVALID, /* INVALID  */
2866 };
2867 
2868 /** NOTE: This defs cannot be changed in the future without breaking WMI compatibility */
2869 #define WMI_MAX_NUM_SS                    MAX_HE_NSS
2870 #define WMI_MAX_NUM_RU                    MAX_HE_RU
2871 
2872 /*
2873  * Figure 8 554ae: -PPE Threshold Info field format
2874  * we pack PPET16 and PPT8 for four RU's in one element of array.
2875  *
2876  * ppet16_ppet8_ru3_ru0 array element 0 holds:
2877  *     |  PPET8 | PPET16 | PPET8  | PPET16 | PPET8  | PPET16 | PPET8  | PPET16 |
2878  *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1|
2879  *31:23|  22:20 |  19:17 |  17:15 |  14:12 |  11:9  |   8:6  |   5:3  |   2:0  |
2880  *
2881  * ppet16_ppet8_ru3_ru0 array element 1 holds:
2882  *     | PPET8  | PPET16 | PPET8  | PPET16 | PPET8  | PPET16 | PPET8  | PPET16 |
2883  *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1|
2884  *31:23|  22:20 |  19:17 |  17:15 |  14:12 |  11:9  |   8:6  |   5:3  |   2:0  |
2885  *
2886  * etc.
2887  */
2888 
2889 /*
2890  * Note that in these macros, "ru" is one-based, not zero-based, while
2891  * nssm1 is zero-based.
2892  */
2893 #define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
2894     do { \
2895         ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6)); \
2896         ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet & 7) << (((ru-1) & 3) * 6)); \
2897     } while (0)
2898 
2899 #define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \
2900     ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6)) & 7)
2901 
2902 #define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
2903     do { \
2904         ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6 + 3)); \
2905         ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1) & 3) * 6 + 3)); \
2906     } while (0)
2907 
2908 #define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \
2909     ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6 + 3)) & 7)
2910 
2911 typedef struct _wmi_ppe_threshold {
2912     A_UINT32 numss_m1; /** NSS - 1*/
2913     union {
2914         A_UINT32 ru_count; /** RU COUNT OBSOLETE to be removed after few versions */
2915         A_UINT32 ru_mask; /** RU index mask */
2916     };
2917     A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS]; /** ppet8 and ppet16 for max num ss */
2918     /**************************************************
2919      * As this struct is embedded inside other structs,
2920      * it cannot be expanded without breaking backwards
2921      * compatibility.  Do not add new fields here.
2922      **************************************************/
2923 } wmi_ppe_threshold;
2924 
2925 #define WMI_MAX_EHTCAP_MAC_SIZE  2
2926 #define WMI_MAX_EHTCAP_PHY_SIZE  3
2927 
2928 /*
2929  * 0 – index indicated EHT-MCS map for 20Mhz only sta (4 bytes valid)
2930  * 1 – index for <= 80MHz bw  (only 3 bytes are valid and other is reserved)
2931  * 2 – index for == 160Mhz bw (only 3 bytes are valid and other is reserved)
2932  * 3 – index for == 320Mhz bw (only 3 bytes are valid and other is reserved)
2933  */
2934 enum {
2935     WMI_EHT_SUPP_MCS_20MHZ_ONLY,
2936     WMI_EHT_SUPP_MCS_LE_80MHZ,
2937     WMI_EHT_SUPP_MCS_160MHZ,
2938     WMI_EHT_SUPP_MCS_320MHZ,
2939 };
2940 #define WMI_MAX_EHT_SUPP_MCS_2G_SIZE  2
2941 #define WMI_MAX_EHT_SUPP_MCS_5G_SIZE  4
2942 
2943 /* WMI_SYS_CAPS_* refer to the capabilities that system support
2944  */
2945 #define WMI_SYS_CAP_ENABLE                       0x00000001
2946 #define WMI_SYS_CAP_TXPOWER                      0x00000002
2947 
2948 /*
2949  * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
2950  * Bits 5:0 are reserved
2951  */
2952 #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS  (28)
2953 #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS  (24)
2954 #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS  (20)
2955 #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS  (16)
2956 #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS   (12)
2957 #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS   (8)
2958 #define WMI_DBS_HW_MODE_DBS_MODE_BITPOS         (7)
2959 #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS   (6)
2960 
2961 #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK    (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
2962 #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK    (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
2963 #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK    (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
2964 #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK    (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
2965 #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK     (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
2966 #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK     (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
2967 #define WMI_DBS_HW_MODE_DBS_MODE_MASK           (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
2968 #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK     (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
2969 
2970 #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
2971     WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
2972 #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
2973     WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
2974 #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
2975     WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
2976 #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
2977     WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
2978 #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value)  \
2979     WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
2980 #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value)  \
2981     WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
2982 #define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value)        \
2983     WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
2984 #define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value)       \
2985     WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
2986 
2987 #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode)    \
2988     ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
2989 #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode)    \
2990     ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
2991 #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode)    \
2992     ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
2993 #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode)    \
2994     ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
2995 #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode)     \
2996     ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
2997 #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode)     \
2998     ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
2999 #define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode)           \
3000     ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
3001 #define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode)          \
3002     ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
3003 
3004 #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS        (31)
3005 #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS      (30)
3006 #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS  (29)
3007 #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS  (28)
3008 #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS   (27)
3009 
3010 #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK         ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
3011 #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK       ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
3012 #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK   ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
3013 #define WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK    ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
3014 #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK    ((A_UINT32) 0x1 << WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
3015 
3016 #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
3017     WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
3018 #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
3019     WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
3020 #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
3021     WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
3022 #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_SET(scan_cfg, value) \
3023     WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS, 1, value)
3024 #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_SET(scan_cfg, value) \
3025     WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS, 1, value)
3026 
3027 #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg)    \
3028     ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
3029 #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg)    \
3030     ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
3031 #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg)    \
3032     ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
3033 #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_GET(scan_cfg)    \
3034     ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
3035 #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_GET(scan_cfg)    \
3036     ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
3037 
3038 #define WMI_DBS_FW_MODE_CFG_DBS_BITPOS                  (31)
3039 #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS            (30)
3040 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS          (29)
3041 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS (28)
3042 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS (27)
3043 #define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS            (26)
3044 
3045 #define WMI_DBS_FW_MODE_CFG_DBS_MASK                    ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
3046 #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK              ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
3047 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK        ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
3048 #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)
3049 #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)
3050 #define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_MASK              ((A_UINT32) 0x1 << WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS)
3051 
3052 #define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
3053     WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
3054 #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
3055     WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
3056 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_SET(fw_mode, value) \
3057     WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS, 1, value)
3058 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_SET(fw_mode, value) \
3059     WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS, 1, value)
3060 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_SET(fw_mode, value) \
3061     WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS, 1, value)
3062 #define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_SET(fw_mode, value) \
3063     WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS, 1, value)
3064 
3065 #define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode)    \
3066     ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
3067 #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode)    \
3068     ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
3069 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_GET(fw_mode)    \
3070     ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
3071 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_GET(fw_mode)    \
3072     ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
3073 #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_GET(fw_mode)    \
3074     ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
3075 #define WMI_DBS_FW_MODE_CFG_ASYNC_SBS_GET(fw_mode)    \
3076     ((fw_mode & WMI_DBS_FW_MODE_CFG_ASYNC_SBS_MASK) >> WMI_DBS_FW_MODE_CFG_ASYNC_SBS_BITPOS)
3077 
3078 /** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
3079 typedef struct _wmi_abi_version {
3080     A_UINT32 abi_version_0; /** WMI Major and Minor versions */
3081     A_UINT32 abi_version_1; /** WMI change revision */
3082     A_UINT32 abi_version_ns_0; /** ABI version namespace first four dwords */
3083     A_UINT32 abi_version_ns_1; /** ABI version namespace second four dwords */
3084     A_UINT32 abi_version_ns_2; /** ABI version namespace third four dwords */
3085     A_UINT32 abi_version_ns_3; /** ABI version namespace fourth four dwords */
3086 } wmi_abi_version;
3087 
3088 /*
3089  * maximum number of memory requests allowed from FW.
3090  */
3091 #define WMI_MAX_MEM_REQS 16
3092 
3093 /* !!NOTE!!:
3094  * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
3095  * Please don't change it.
3096  */
3097 #define HW_BD_INFO_SIZE       5
3098 
3099 /**
3100  * PDEV ID to identify the physical device,
3101  * value 0 reserved for SOC level commands/event
3102  */
3103 #define WMI_PDEV_ID_SOC         0 /* SOC level, applicable to all PDEVs */
3104 #define WMI_PDEV_ID_1ST         1 /* first pdev  (pdev 0) */
3105 #define WMI_PDEV_ID_2ND         2 /* second pdev (pdev 1) */
3106 #define WMI_PDEV_ID_3RD         3 /* third pdev  (pdev 2) */
3107 
3108 /*
3109  * Enum regarding which BDF elements are provided in which elements of the
3110  * wmi_service_ready_event_fixed_param.hw_bd_info[] array
3111  */
3112 typedef enum {
3113     BDF_VERSION = 0,
3114     REF_DESIGN_ID = 1,
3115     CUSTOMER_ID = 2,
3116     PROJECT_ID = 3,
3117     BOARD_DATA_REV = 4,
3118 } wmi_hw_bd_info_e;
3119 
3120 /*
3121  * Macros to get/set BDF details within the
3122  * wmi_service_ready_event_fixed_param.hw_bd_info[] array
3123  */
3124 #define WMI_GET_BDF_VERSION(hw_bd_info)         ((hw_bd_info)[BDF_VERSION])
3125 #define WMI_GET_REF_DESIGN(hw_bd_info)          ((hw_bd_info)[REF_DESIGN_ID])
3126 #define WMI_GET_CUSTOMER_ID(hw_bd_info)         ((hw_bd_info)[CUSTOMER_ID])
3127 #define WMI_GET_PROJECT_ID(hw_bd_info)          ((hw_bd_info)[PROJECT_ID])
3128 #define WMI_GET_BOARD_DATA_REV(hw_bd_info)      ((hw_bd_info)[BOARD_DATA_REV])
3129 
3130 #define WMI_SET_BDF_VERSION(hw_bd_info, val)    ((hw_bd_info)[BDF_VERSION]    = (val))
3131 #define WMI_SET_REF_DESIGN(hw_bd_info, val)     ((hw_bd_info)[REF_DESIGN_ID]  = (val))
3132 #define WMI_SET_CUSTOMER_ID(hw_bd_info, val)    ((hw_bd_info)[CUSTOMER_ID]    = (val))
3133 #define WMI_SET_PROJECT_ID(hw_bd_info, val)     ((hw_bd_info)[PROJECT_ID]     = (val))
3134 #define WMI_SET_BOARD_DATA_REV(hw_bd_info, val) ((hw_bd_info)[BOARD_DATA_REV] = (val))
3135 
3136 /*
3137  * Enum to indicate which Tx power capability is provided in which element of
3138  * hw_tx_power_signed
3139  */
3140 typedef enum {
3141     WMI_HW_MIN_TX_POWER_SIGNED = 0,
3142     WMI_HW_MAX_TX_POWER_SIGNED = 1,
3143     WMI_HW_TX_POWER_CAPS_MAX,
3144 } wmi_hw_tx_power_caps;
3145 
3146 /**
3147  * The following struct holds optional payload for
3148  * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
3149  * device capability to the host.
3150  */
3151 typedef struct {
3152     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
3153     A_UINT32 fw_build_vers; /* firmware build number */
3154     wmi_abi_version fw_abi_vers;
3155     A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
3156     A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
3157     A_UINT32 num_rf_chains;
3158     /* The following field is only valid for service type WMI_SERVICE_11AC */
3159     A_UINT32 ht_cap_info; /* WMI HT Capability */
3160     A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
3161     A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
3162     A_UINT32 hw_min_tx_power;
3163     A_UINT32 hw_max_tx_power;
3164     /* sys_cap_info:
3165      * bits  1:0  - RXTX LED + RFKILL enable flags (see WMI_LEDRFKILL_FLAGS)
3166      * bits 31:2  - reserved (must be set to zero)
3167      */
3168     A_UINT32 sys_cap_info;
3169     A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
3170     /** Max beacon and Probe Response IE offload size (includes
3171      *  optional P2P IEs) */
3172     A_UINT32 max_bcn_ie_size;
3173     /*
3174      * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
3175      * FW uses this as FW extesnsion memory for saving its data structures. Only valid
3176      * for low latency interfaces like PCIE where FW can access this memory directly (or)
3177      * by DMA.
3178      */
3179     A_UINT32 num_mem_reqs;
3180     /* Max No. scan channels target can support
3181      * If FW is too old and doesn't indicate this number, host side value will default to
3182      * 0, and host will take the original compatible value (62) for future scan channel
3183      * setup.
3184      */
3185     A_UINT32 max_num_scan_channels;
3186 
3187     /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
3188      * Default 0 means that hw_bd_info[] is invalid (legacy board).
3189      */
3190     A_UINT32 hw_bd_id;
3191     A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
3192 
3193     /*
3194      * Number of MACs supported, i.e. a DBS-capable device will return 2
3195      */
3196     A_UINT32 max_supported_macs;
3197 
3198     /*
3199      * FW sub-feature capabilities to be used in concurrence with wmi_service_bitmap
3200      */
3201     A_UINT32 wmi_fw_sub_feat_caps; /* values from enum WMI_FW_SUB_FEAT_CAPS */
3202 
3203     /*
3204      * Number of Dual Band Simultaneous (DBS) hardware modes
3205      */
3206     A_UINT32 num_dbs_hw_modes;
3207 
3208     /*
3209      * txrx_chainmask
3210      *    [7:0]   - 2G band tx chain mask
3211      *    [15:8]  - 2G band rx chain mask
3212      *    [23:16] - 5G band tx chain mask
3213      *    [31:24] - 5G band rx chain mask
3214      *
3215      */
3216     A_UINT32 txrx_chainmask;
3217 
3218     /*
3219      * default Dual Band Simultaneous (DBS) hardware mode
3220      */
3221     A_UINT32 default_dbs_hw_mode_index;
3222 
3223     /*
3224      * Number of msdu descriptors target would use
3225      */
3226     A_UINT32 num_msdu_desc;
3227 
3228 /* This ready_event_fixed_param TLV is followed by the below TLVs:
3229  *     HAL_REG_CAPABILITIES   hal_reg_capabilities;
3230  *     A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
3231  *     wlan_host_mem_req mem_reqs[];
3232  *     A_UINT32 wlan_dbs_hw_mode_list[];
3233  */
3234 } wmi_service_ready_event_fixed_param;
3235 
3236 typedef enum {
3237     WMI_RXTX_LED_ENABLE         = 0x00000001,
3238     WMI_RFKILL_ENABLE           = 0x00000002,
3239 } WMI_LEDRFKILL_FLAGS;
3240 
3241 #define WMI_SERVICE_SEGMENT_BM_SIZE32 4 /* 4x A_UINT32 = 128 bits */
3242 typedef struct {
3243     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_available_event_fixed_param */
3244     /*
3245      * The wmi_service_segment offset field specifies the position within the
3246      * logical bitmap of WMI service flags at which the WMI service flags
3247      * specified within this message begin.
3248      * Since the first 128 WMI service flags are specified within the
3249      * wmi_service_bitmap field of the WMI_SERVICE_READY_EVENT message,
3250      * the wmi_service_segment_offset value is expected to be 128 or more.
3251      */
3252     A_UINT32 wmi_service_segment_offset;
3253     A_UINT32 wmi_service_segment_bitmap[WMI_SERVICE_SEGMENT_BM_SIZE32];
3254 /*
3255  * This TLV is followed by the below TLVs:
3256  * A_UINT32 wmi_service_ext_bitmap[]
3257  *     The wmi_service_ext_bitmap covers WMI service flags at the offset where
3258  *     wmi_service_available_event_fixed_param.wmi_service_segment_bitmap
3259  *     leaves off.
3260  *     For example, if
3261  *         wmi_service_available_event_fixed_param.wmi_service_segment_offset
3262  *     is 128, then
3263  *         wmi_service_available_event_fixed_param.wmi_service_segment_bitmap
3264  *     will cover WMI service flags
3265  *         128 to (128 + WMI_SERVICE_SEGMENT_BM_SIZE32 * 32) = 128 to 256
3266  *     and wmi_service_ext_bitmap will cover WMI service flags starting at 256.
3267  */
3268 } wmi_service_available_event_fixed_param;
3269 
3270 /*
3271  * HDL version GET/SET APIs
3272  */
3273 #define WMI_HDL_VERSION_BITPOS    0
3274 #define WMI_HDL_VERSION_NUM_BITS 10
3275 
3276 #define WMI_HDL_VERSION_GET(dword) WMI_GET_BITS(dword, WMI_HDL_VERSION_BITPOS, WMI_HDL_VERSION_NUM_BITS)
3277 #define WMI_HDL_VERSION_SET(dword, value) WMI_SET_BITS(dword, WMI_HDL_VERSION_BITPOS, WMI_HDL_VERSION_NUM_BITS, value)
3278 
3279 typedef struct {
3280     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT */
3281     /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
3282     A_UINT32 default_conc_scan_config_bits;
3283     /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
3284     A_UINT32 default_fw_config_bits;
3285     wmi_ppe_threshold ppet;
3286     A_UINT32 he_cap_info; /* see section 8.4.2.213 from draft r8 of 802.11ax; see WMI_HE_FRAG_SUPPORT enum */
3287     /*
3288      * An HT STA shall not allow transmission of more than one MPDU start
3289      * within the time limit described in the MPDU maximum density field.
3290      */
3291     A_UINT32 mpdu_density; /* units are microseconds */
3292     /*
3293      * Maximum no of BSSID based RX filters host can program
3294      * Value 0 means FW hasn't given any limit to host.
3295      */
3296     A_UINT32 max_bssid_rx_filters;
3297     /*
3298      * Extended FW build version information:
3299      * bits  9:0  -> HDL version info
3300      * bits 12:10 -> CRM sub ID MSbs (refer to WMI_SVC_RDY_CRM_SUB_ID_GET/SET)
3301      * bits 27:13 -> reserved
3302      * bits 31:28 -> CRM sub ID LSbs (refer to WMI_SVC_RDY_CRM_SUB_ID_GET/SET)
3303      */
3304     A_UINT32 fw_build_vers_ext;
3305     /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
3306      * This limit is the maximum number of SSIDs that can be configured in the
3307      * target for Network List Offload (i.e. scanning for a preferred network).
3308      * If this value is 0x0, the target supports WMI_NLO_MAX_SSIDS (16).
3309      * If this value is non-zero, the host should send back in the
3310      * WMI_INIT message's wmi_resource_config.max_nlo_ssids a value that
3311      * is equal to or less than the target capability limit reported here.
3312      */
3313     A_UINT32 max_nlo_ssids;
3314     /* ref to section 8.4.2.48 Multiple BSSID element
3315      * The Max BSSID Indicator field contains a value assigned to n,
3316      * where 2^n is the maximum number of BSSIDs
3317      */
3318     A_UINT32 max_bssid_indicator;
3319 
3320     /* 2nd DWORD of HE MAC Capabilities */
3321     A_UINT32 he_cap_info_ext;
3322 
3323     /**************************************************************************
3324      * DON'T ADD ANY FURTHER FIELDS HERE -
3325      * It would cause the size of the READY_EXT message within some targets
3326      * to exceed the size of the buffer used for the message.
3327      **************************************************************************/
3328 
3329     /*
3330      * A variable-length TLV array of wmi_chan_rf_characterization_info will
3331      * follow this fixed_param TLV, containing rx characterization info for
3332      * primary channels.
3333      *   WMI_CHAN_RF_CHARACTERIZATION_INFO wmi_chan_rf_characterization_info[];
3334      */
3335 } wmi_service_ready_ext_event_fixed_param;
3336 
3337 #define WMI_SVC_RDY_CRM_SUB_ID_LSBS_INDEX    28
3338 #define WMI_SVC_RDY_CRM_SUB_ID_LSBS_NUM_BITS 4
3339 #define WMI_SVC_RDY_CRM_SUB_ID_MSBS_INDEX    10
3340 #define WMI_SVC_RDY_CRM_SUB_ID_MSBS_NUM_BITS 3
3341 #define WMI_SVC_RDY_CRM_SUB_ID_GET(var, val) \
3342     WMI_APPEND_TWO_GET_BITS( \
3343         var, \
3344         WMI_SVC_RDY_CRM_SUB_ID_LSBS_INDEX, \
3345         WMI_SVC_RDY_CRM_SUB_ID_LSBS_NUM_BITS, \
3346         WMI_SVC_RDY_CRM_SUB_ID_MSBS_INDEX, \
3347         WMI_SVC_RDY_CRM_SUB_ID_MSBS_NUM_BITS, \
3348         val)
3349 #define WMI_SVC_RDY_CRM_SUB_ID_SET(var, val) \
3350     WMI_APPEND_TWO_SET_BITS( \
3351         var, \
3352         WMI_SVC_RDY_CRM_SUB_ID_LSBS_INDEX, \
3353         WMI_SVC_RDY_CRM_SUB_ID_LSBS_NUM_BITS, \
3354         WMI_SVC_RDY_CRM_SUB_ID_MSBS_INDEX, \
3355         WMI_SVC_RDY_CRM_SUB_ID_MSBS_NUM_BITS, \
3356         val)
3357 
3358 /*
3359  * regdb version GET/SET APIs
3360  */
3361 #define WMI_REG_DB_VERSION_MAJOR_BITPOS 0
3362 #define WMI_REG_DB_VERSION_MINOR_BITPOS 8
3363 #define WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS 16
3364 #define WMI_BDF_REG_DB_VERSION_MINOR_BITPOS 24
3365 #define WMI_REG_DB_VERSION_NUM_BITS 8
3366 
3367 #define WMI_REG_DB_VERSION_MAJOR_GET(dword) \
3368     WMI_GET_BITS(dword, WMI_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
3369 #define WMI_REG_DB_VERSION_MAJOR_SET(dword, value) \
3370     WMI_SET_BITS(dword, WMI_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
3371 
3372 #define WMI_REG_DB_VERSION_MINOR_GET(dword) \
3373     WMI_GET_BITS(dword, WMI_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
3374 #define WMI_REG_DB_VERSION_MINOR_SET(dword, value) \
3375     WMI_SET_BITS(dword, WMI_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
3376 
3377 #define WMI_BDF_REG_DB_VERSION_MAJOR_GET(dword) \
3378     WMI_GET_BITS(dword, WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
3379 #define WMI_BDF_REG_DB_VERSION_MAJOR_SET(dword, value) \
3380     WMI_SET_BITS(dword, WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
3381 
3382 #define WMI_BDF_REG_DB_VERSION_MINOR_GET(dword) \
3383     WMI_GET_BITS(dword, WMI_BDF_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
3384 #define WMI_BDF_REG_DB_VERSION_MINOR_SET(dword, value) \
3385     WMI_SET_BITS(dword, WMI_BDF_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
3386 
3387 #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) \
3388     do { \
3389         WMI_REG_DB_VERSION_MAJOR_SET(dword, reg_db_ver_major); \
3390         WMI_REG_DB_VERSION_MINOR_SET(dword, reg_db_ver_minor); \
3391         WMI_BDF_REG_DB_VERSION_MAJOR_SET(dword, bdf_reg_db_ver_major); \
3392         WMI_BDF_REG_DB_VERSION_MINOR_SET(dword, bdf_reg_db_ver_minor); \
3393     } while (0)
3394 
3395 #define WMI_HW_MIN_TX_POWER_BITPOS  0
3396 #define WMI_HW_MAX_TX_POWER_BITPOS  16
3397 
3398 #define WMI_HW_MIN_TX_POWER_GET(dword) \
3399     ((A_INT16) WMI_GET_BITS(dword, WMI_HW_MIN_TX_POWER_BITPOS, 16))
3400 #define WMI_HW_MIN_TX_POWER_SET(dword, value) \
3401     WMI_SET_BITS(dword, WMI_HW_MIN_TX_POWER_BITPOS, 16, value)
3402 #define WMI_HW_MAX_TX_POWER_GET(dword) \
3403     ((A_INT16) WMI_GET_BITS(dword, WMI_HW_MAX_TX_POWER_BITPOS, 16))
3404 #define WMI_HW_MAX_TX_POWER_SET(dword, value) \
3405     WMI_SET_BITS(dword, WMI_HW_MAX_TX_POWER_BITPOS, 16, value)
3406 
3407 #define WMI_MAX_USER_PER_PPDU_UL_OFDMA_GET(dword) \
3408         WMI_GET_BITS(dword, 0, 16)
3409 
3410 #define WMI_MAX_USER_PER_PPDU_UL_OFDMA_SET(dword, value) \
3411         WMI_SET_BITS(dword, 0, 16, value)
3412 
3413 #define WMI_MAX_USER_PER_PPDU_DL_OFDMA_GET(dword) \
3414         WMI_GET_BITS(dword, 16, 16)
3415 
3416 #define WMI_MAX_USER_PER_PPDU_DL_OFDMA_SET(dword, value) \
3417         WMI_SET_BITS(dword, 16, 16, value)
3418 
3419 #define WMI_MAX_USER_PER_PPDU_UL_MUMIMO_GET(dword) \
3420         WMI_GET_BITS(dword, 0, 16)
3421 
3422 #define WMI_MAX_USER_PER_PPDU_UL_MUMIMO_SET(dword, value) \
3423         WMI_SET_BITS(dword, 0, 16, value)
3424 
3425 #define WMI_MAX_USER_PER_PPDU_DL_MUMIMO_GET(dword) \
3426         WMI_GET_BITS(dword, 16, 16)
3427 
3428 #define WMI_MAX_USER_PER_PPDU_DL_MUMIMO_SET(dword, value) \
3429         WMI_SET_BITS(dword, 16, 16, value)
3430 
3431 #define WMI_TARGET_CAP_FLAGS_RX_PEER_METADATA_VERSION_GET(target_cap_flags) \
3432         WMI_GET_BITS(target_cap_flags, 0, 2)
3433 #define WMI_TARGET_CAP_FLAGS_RX_PEER_METADATA_VERSION_SET(target_cap_flags, value) \
3434         WMI_SET_BITS(target_cap_flags, 0, 2, value)
3435 
3436 #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_2GHZ_GET(target_cap_flags) \
3437     WMI_GET_BITS(target_cap_flags, 2, 1)
3438 #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_2GHZ_SET(target_cap_flags, value) \
3439     WMI_SET_BITS(target_cap_flags, 2, 1, value)
3440 
3441 #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_2GHZ_GET(target_cap_flags) \
3442     WMI_GET_BITS(target_cap_flags, 3, 1)
3443 #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_2GHZ_SET(target_cap_flags, value) \
3444     WMI_SET_BITS(target_cap_flags, 3, 1, value)
3445 
3446 #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_5GHZ_GET(target_cap_flags) \
3447     WMI_GET_BITS(target_cap_flags, 4, 1)
3448 #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_5GHZ_SET(target_cap_flags, value) \
3449     WMI_SET_BITS(target_cap_flags, 4, 1, value)
3450 
3451 #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_5GHZ_GET(target_cap_flags) \
3452     WMI_GET_BITS(target_cap_flags, 5, 1)
3453 #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_5GHZ_SET(target_cap_flags, value) \
3454     WMI_SET_BITS(target_cap_flags, 5, 1, value)
3455 
3456 #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_6GHZ_GET(target_cap_flags) \
3457     WMI_GET_BITS(target_cap_flags, 6, 1)
3458 #define WMI_TARGET_CAP_UL_MU_MIMO_RX_SUPPORT_6GHZ_SET(target_cap_flags, value) \
3459     WMI_SET_BITS(target_cap_flags, 6, 1, value)
3460 
3461 #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_6GHZ_GET(target_cap_flags) \
3462     WMI_GET_BITS(target_cap_flags, 7, 1)
3463 #define WMI_TARGET_CAP_UL_MU_MIMO_TX_SUPPORT_6GHZ_SET(target_cap_flags, value) \
3464     WMI_SET_BITS(target_cap_flags, 7, 1, value)
3465 
3466 #define WMI_TARGET_CAP_MAX_ML_BSS_NUM_GET(target_cap_flags) \
3467     WMI_GET_BITS(target_cap_flags, 8, 3)
3468 #define WMI_TARGET_CAP_MAX_ML_BSS_NUM_SET(target_cap_flags, value) \
3469     WMI_SET_BITS(target_cap_flags, 8, 3, value)
3470 
3471 #define WMI_TARGET_CAP_CONCURRENCE_SUPPORT_GET(target_cap_flags) \
3472     WMI_GET_BITS(target_cap_flags, 11, 2)
3473 #define WMI_TARGET_CAP_CONCURRENCE_SUPPORT_SET(target_cap_flags, value) \
3474     WMI_SET_BITS(target_cap_flags, 11, 2, value)
3475 
3476 #define WMI_TARGET_CAP_MULTIPASS_SAP_SUPPORT_GET(target_cap_flags) \
3477     WMI_GET_BITS(target_cap_flags, 13, 1)
3478 #define WMI_TARGET_CAP_MULTIPASS_SAP_SUPPORT_SET(target_cap_flags, value) \
3479     WMI_SET_BITS(target_cap_flags, 13, 1, value)
3480 
3481 /* ML FULL monitor mode */
3482 #define WMI_TARGET_CAP_ML_MONITOR_MODE_SUPPORT_GET(target_cap_flags) \
3483     WMI_GET_BITS(target_cap_flags, 14, 1)
3484 #define WMI_TARGET_CAP_ML_MONITOR_MODE_SUPPORT_SET(target_cap_flags, value) \
3485     WMI_SET_BITS(target_cap_flags, 14, 1, value)
3486 
3487 #define WMI_TARGET_CAP_QDATA_TX_LCE_FILTER_SUPPORT_GET(target_cap_flags) \
3488     WMI_GET_BITS(target_cap_flags, 15, 1)
3489 #define WMI_TARGET_CAP_QDATA_TX_LCE_FILTER_SUPPORT_SET(target_cap_flags, value)\
3490     WMI_SET_BITS(target_cap_flags, 15, 1, value)
3491 
3492 
3493 /*
3494  * wmi_htt_msdu_idx_to_htt_msdu_qtype GET/SET APIs
3495  */
3496 #define WMI_HTT_MSDUQ_IDX_TO_MSDUQ_QTYPE_INDEX_GET(index_and_type) \
3497     WMI_GET_BITS(index_and_type, 0, 8)
3498 #define WMI_HTT_MSDUQ_IDX_TO_MSDUQ_QTYPE_INDEX_SET(index_and_type, value) \
3499     WMI_SET_BITS(index_and_type, 0, 8, value)
3500 
3501 #define WMI_HTT_MSDUQ_IDX_TO_MSDUQ_QTYPE_TYPE_GET(index_and_type) \
3502     WMI_GET_BITS(index_and_type, 8, 8)
3503 #define WMI_HTT_MSDUQ_IDX_TO_MSDUQ_QTYPE_TYPE_SET(index_and_type, value) \
3504     WMI_SET_BITS(index_and_type, 8, 8, value)
3505 
3506 typedef struct {
3507     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_htt_msdu_idx_to_htt_msdu_qtype.*/
3508     /**
3509      * index_and_type
3510      *
3511      * [7:0]   : htt_msduq_index
3512      * [15:8]  : htt_msduq_type
3513      * [31:16] : reserved
3514      */
3515     A_UINT32 index_and_type;
3516 } wmi_htt_msdu_idx_to_htt_msdu_qtype;
3517 
3518 typedef enum {
3519     WMI_AFC_FEATURE_6G_DEPLOYMENT_UNSPECIFIED = 0,
3520     WMI_AFC_FEATURE_6G_DEPLOYMENT_INDOOR_ONLY =  1,
3521     WMI_AFC_FEATURE_6G_DEPLOYMENT_OUTDOOR_ONLY = 2,
3522 } WMI_AFC_FEATURE_6G_DEPLOYMENT_TYPE;
3523 
3524 typedef enum {
3525     WMI_BDF_VERSION_CHECK_DISABLED = 0,
3526 
3527     /* WMI_BDF_VERSION_CHECK_GOOD:
3528      * BDF version is matched with FW.
3529      */
3530     WMI_BDF_VERSION_CHECK_GOOD = 1,
3531 
3532     /* WMI_BDF_VERSION_TEMPLATE_TOO_OLD:
3533      * BDF template version is older than the oldest version supported by FW.
3534      */
3535     WMI_BDF_VERSION_TEMPLATE_TOO_OLD = 2,
3536 
3537     /* WMI_BDF_VERSION_TEMPLATE_TOO_NEW:
3538      * BDF template version is newer than the newest version supported by FW.
3539      */
3540     WMI_BDF_VERSION_TEMPLATE_TOO_NEW = 3,
3541 
3542     /* WMI_BDF_VERSION_FW_TOO_OLD:
3543      * FW version is older than the major version supported by BDF.
3544      */
3545     WMI_BDF_VERSION_FW_TOO_OLD = 4,
3546 
3547     /* WMI_BDF_VERSION_FW_TOO_NEW:
3548      * FW version is newer than the minor version supported by BDF.
3549      */
3550     WMI_BDF_VERSION_FW_TOO_NEW = 5,
3551 } wmi_bdf_version_status_type;
3552 
3553 typedef struct {
3554     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_ready_ext2_event_fixed_param.*/
3555 
3556     /*
3557      * regDB Version to be sent to Host on WMI service ready ext2 event.
3558      *    [7:0]   - regDbVersionMajor
3559      *    [15:8]  - regDbVersionMinor
3560      *    [23:16] - bdfRegDbVersionMajor
3561      *    [31:24] - bdfRegDbVersionMinor
3562      * The WMI_*REG_DB_VERSION_[MAJOR,MINOR]_[SET,GET] macros are used to
3563      * access these bitfields.
3564      */
3565     A_UINT32 reg_db_version;
3566 
3567     /* Min & Max Tx power (in dBm) supported in 2.4 GHz band
3568      *  [15:0]   - Min Tx Power in 2.4 GHz band
3569      *  [31:16]  - Max Tx Power in 2.4 GHz band
3570      * WMI_HW_[MIN,MAX]_TX_POWER_[GET,SET] macros are used to access
3571      * these bitfields.
3572      * If Min Tx Power = Max Tx Power = 0 means Min Tx Power & Max Tx Power
3573      * are not specified.
3574      */
3575     A_UINT32 hw_min_max_tx_power_2g;
3576 
3577     /* Min & Max Tx power (in dBm) supported in 5 GHz band
3578      *  [15:0]   - Min Tx Power in 5 GHz band
3579      *  [31:16]  - Max Tx Power in 5 GHz band
3580      * WMI_HW_[MIN,MAX]_TX_POWER_[GET,SET] macros are used to access
3581      * these bitfields.
3582      * If Min Tx Power = Max Tx Power = 0 means Min Tx Power & Max Tx Power
3583      * are not specified.
3584      */
3585     A_UINT32 hw_min_max_tx_power_5g;
3586 
3587     /*
3588      * Number of peers supported per WMI_PEER_CHAN_WIDTH_SWITCH_CMDID
3589      * 0 - not enabled
3590      */
3591     A_UINT32 chwidth_num_peer_caps;
3592 
3593     /*
3594      * Whether preamble puncturing is supported by FW, and if so, for which
3595      * bandwidths.  The possible values for this field are listed below.
3596      *   0: preamble puncturing is not supported
3597      *  80: puncturing supported within channels of at least 80 MHz bandwidth
3598      * 160: puncturing supported within channels of at least 160 MHz bandwidth
3599      * 320: puncturing supported within 320 MHz channels
3600      */
3601     A_UINT32 preamble_puncture_bw;
3602 
3603     /*
3604      * [15:0]  - ULOFDMA Refer WMI_MAX_USER_PER_PPDU_UL_OFDMA_GET & SET
3605      * [31:16] - DLOFDMA Refer WMI_MAX_USER_PER_PPDU_DL_OFDMA_GET & SET
3606      * If max_user_per_ppdu_ofdma == 0 the UL/DL max users are unspecified.
3607      */
3608     A_UINT32 max_user_per_ppdu_ofdma;
3609 
3610     /*
3611      * [15:0]  - ULMUMIMO Refer WMI_MAX_USER_PER_PPDU_UL_MUMIMO_GET & SET
3612      * [31:16] - DLMUMIMO Refer WMI_MAX_USER_PER_PPDU_DL_MUMIMO_GET & SET
3613      * If max_user_per_ppdu_mumimo == 0 the UL/DL max users are unspecified.
3614      */
3615     A_UINT32 max_user_per_ppdu_mumimo;
3616 
3617     /**
3618      * @brief target_cap_flags - flags containing information about target capabilities.
3619      * Bits 1:0
3620      *    Rx peer metadata version number used by target
3621      *    0-> legacy case
3622      *    1-> MLO support
3623      *    2,3-> reserved
3624      *    Refer to WMI_TARGET_CAP_FLAGS_PEER_METADATA_VERSION macros.
3625      * Bit 2 - UL MUMIMO Rx support on 2.4 GHz (AP Mode)
3626      * Bit 3 - UL MUMIMO Tx support on 2.4 GHz (STA Mode)
3627      * Bit 4 - UL MUMIMO Rx support on 5 GHz (AP Mode)
3628      * Bit 5 - UL MUMIMO Tx support on 5 GHz (STA Mode)
3629      * Bit 6 - UL MUMIMO Rx support on 6 GHz (AP Mode)
3630      * Bit 7 - UL MUMIMO Tx support on 6 GHz (STA Mode)
3631      * Bits 10:8 - max ML BSS number supported, range [0-7]
3632      * Bits 12:11  concurrence support capability
3633      *      Bit11 - [ML-STA + SL-STA]  0: not supported; 1:supported
3634      *      Bit12 - [ML-STA + SL-SAP]  0: not supported; 1:supported
3635      * Bit 13 - Support for multipass SAP
3636      * Bit 14 - Support for ML monitor mode
3637      * Bit 15 - Support for Qdata Tx LCE filter installation
3638      * Bits 31:16 - Reserved
3639      */
3640     A_UINT32 target_cap_flags;
3641 
3642     /* EHT MAC Capabilities: total WMI_MAX_EHTCAP_MAC_SIZE*A_UINT32 bits
3643      * those bits actually are max mac capabilities = cap_mac_2g | cap_mac_5g
3644      * The actual cap mac info per mac (2g/5g) in the TLV -- WMI_MAC_PHY_CAPABILITIES_EXT
3645      */
3646     A_UINT32 eht_cap_mac_info[WMI_MAX_EHTCAP_MAC_SIZE];
3647 
3648     /* Following this struct are the TLV's:
3649      *     WMI_DMA_RING_CAPABILITIES;
3650      *     wmi_spectral_bin_scaling_params;
3651      *     WMI_MAC_PHY_CAPABILITIES_EXT;  <-- EHT mac capabilities and phy capabilities info
3652      *     WMI_HAL_REG_CAPABILITIES_EXT2;
3653      *     wmi_nan_capabilities;
3654      *     WMI_SCAN_RADIO_CAPABILITIES_EXT2;
3655      */
3656 
3657     /*
3658      * Max number of LinkView peers supported by target
3659      */
3660     A_UINT32 max_num_linkview_peers;
3661 
3662     /*
3663      * Max number of msduq's per TID per peer supported by target,
3664      * defines LinkView peers number
3665      */
3666     A_UINT32 max_num_msduq_supported_per_tid;
3667 
3668     /*
3669      * Number of peers support default flowqs
3670      */
3671     A_UINT32 default_num_msduq_supported_per_tid;
3672 
3673     /*
3674      * Indoor/Outdoor specification for AFC support -
3675      * refer to WMI_AFC_FEATURE_6G_DEPLOYMENT_TYPE enum
3676      */
3677     A_UINT32 afc_deployment_type;
3678 
3679     /*
3680      * Board data check report. Please see wmi_hw_bd_status_type enum values.
3681      */
3682     A_UINT32 hw_bd_status;
3683 
3684     /*
3685      * max block ack window size FW supports for tx.
3686      */
3687     A_UINT32 tx_aggr_ba_win_size_max;
3688 
3689     /*
3690      * max block ack window size FW supports for rx.
3691      */
3692     A_UINT32 rx_aggr_ba_win_size_max;
3693 
3694     /*
3695      * max link number per STA MLD FW supports.
3696      */
3697     A_UINT32 num_max_mlo_link_per_ml_bss_supp;
3698 
3699     /*
3700      * max link number per SAP MLD FW supports.
3701      */
3702     A_UINT32 num_max_mlo_link_per_ml_sap_supp;
3703 
3704     /* Followed by next TLVs:
3705      *     WMI_DMA_RING_CAPABILITIES          dma_ring_caps[];
3706      *     wmi_spectral_bin_scaling_params    wmi_bin_scaling_params[];
3707      *     WMI_MAC_PHY_CAPABILITIES_EXT       mac_phy_caps[];
3708      *     WMI_HAL_REG_CAPABILITIES_EXT2      hal_reg_caps[];
3709      *     wmi_nan_capabilities               nan_cap;
3710      *     WMI_SCAN_RADIO_CAPABILITIES_EXT2   wmi_scan_radio_caps[];
3711      *     wmi_htt_msdu_idx_to_htt_msdu_qtype htt_msdu_idx_to_qtype_map[];
3712      *     wmi_dbs_or_sbs_cap_ext             dbs_or_sbs_cap_ext;
3713      *     A_INT32 hw_tx_power_signed[WMI_HW_TX_POWER_CAPS_MAX];
3714      *     wmi_aux_dev_capabilities           aux_dev_caps[];
3715      */
3716 } wmi_service_ready_ext2_event_fixed_param;
3717 
3718 typedef struct {
3719     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_rf_characterization_info_event_fixed_param */
3720     /*
3721      * A variable-length TLV array of wmi_chan_rf_characterization_info will
3722      * follow this fixed_param TLV, containing rx characterization info for
3723      * primary channels.
3724      * WMI_CHAN_RF_CHARACTERIZATION_INFO wmi_chan_rf_characterization_info[];
3725      */
3726 } wmi_chan_rf_characterization_info_event_fixed_param;
3727 
3728 typedef enum {
3729     WMI_FW_STA_RTT_INITR =     0x00000001,
3730     WMI_FW_STA_RTT_RESPR =     0x00000002,
3731     WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
3732     WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
3733     WMI_FW_P2P_GO_RTT_INITR =  0x00000010,
3734     WMI_FW_P2P_GO_RTT_RESPR =  0x00000020,
3735     WMI_FW_AP_RTT_INITR =      0x00000040,
3736     WMI_FW_AP_RTT_RESPR =      0x00000080,
3737     WMI_FW_NAN_RTT_INITR =     0x00000100,
3738     WMI_FW_NAN_RTT_RESPR =     0x00000200,
3739     WMI_FW_SCAN_DBS_POLICY =   0x00000400,
3740     /*
3741      * New fw sub feature capabilities before
3742      * WMI_FW_MAX_SUB_FEAT_CAP
3743      */
3744     WMI_FW_MAX_SUB_FEAT_CAP =  0x80000000,
3745 } WMI_FW_SUB_FEAT_CAPS;
3746 
3747 typedef enum {
3748     WMI_HWBD_NONE       = 0,            /* No hw board information is given */
3749     WMI_HWBD_QCA6174    = 1,            /* Rome(AR6320) */
3750     WMI_HWBD_QCA2582    = 2,            /* Killer 1525*/
3751 } WMI_HWBD_ID;
3752 
3753 #define ATH_BD_DATA_REV_MASK            0x000000FF
3754 #define ATH_BD_DATA_REV_SHIFT           0
3755 
3756 #define ATH_BD_DATA_PROJ_ID_MASK        0x0000FF00
3757 #define ATH_BD_DATA_PROJ_ID_SHIFT       8
3758 
3759 #define ATH_BD_DATA_CUST_ID_MASK        0x00FF0000
3760 #define ATH_BD_DATA_CUST_ID_SHIFT       16
3761 
3762 #define ATH_BD_DATA_REF_DESIGN_ID_MASK  0xFF000000
3763 #define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
3764 
3765 #define SET_BD_DATA_REV(bd_data_ver, value)     \
3766     ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
3767 
3768 #define GET_BD_DATA_REV(bd_data_ver)            \
3769     (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
3770 
3771 #define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
3772     ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
3773 
3774 #define GET_BD_DATA_PROJ_ID(bd_data_ver)        \
3775     (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
3776 
3777 #define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
3778     ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
3779 
3780 #define GET_BD_DATA_CUST_ID(bd_data_ver)        \
3781     (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
3782 
3783 #define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value)   \
3784     ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
3785 
3786 #define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver)          \
3787     (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
3788 
3789 
3790 #ifdef ROME_LTE_COEX_FREQ_AVOID
3791 typedef struct {
3792     A_UINT32 start_freq; /* start frequency, not channel center freq */
3793     A_UINT32 end_freq; /* end frequency */
3794 } avoid_freq_range_desc;
3795 
3796 typedef struct {
3797     /* bad channel range count, multi range is allowed, 0 means all channel clear */
3798     A_UINT32 num_freq_ranges;
3799     /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
3800     avoid_freq_range_desc avd_freq_range[];
3801 } wmi_wlan_avoid_freq_ranges_event;
3802 #endif
3803 
3804 /** status consists of  upper 16 bits fo A_STATUS status and lower 16 bits of module ID that returned status */
3805 #define WLAN_INIT_STATUS_SUCCESS   0x0
3806 #define WLAN_INIT_STATUS_GEN_FAILED   0x1
3807 #define WLAN_GET_INIT_STATUS_REASON(status)    ((status) & 0xffff)
3808 #define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
3809 
3810 typedef A_UINT32 WLAN_INIT_STATUS;
3811 
3812 typedef struct {
3813     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
3814     wmi_abi_version fw_abi_vers;
3815     /*
3816      * mac_addr is always filled; in addition, there can be a mac_addr_list
3817      * TLV following this fixed_param TLV to specify additional MAC addresses,
3818      * for cases where the target specifies one MAC address per pdev
3819      * (so the host can treat the pdevs within the target as separately
3820      * as possible) rather than one MAC address for the whole SOC.
3821      */
3822     wmi_mac_addr mac_addr;
3823     A_UINT32 status;
3824     A_UINT32 num_dscp_table;
3825     /* num_extra_mac_addr -
3826      * how many additional MAC addresses besides the above mac_addr
3827      * are provided in the subsequent mac_addr_list TLV
3828      */
3829     A_UINT32 num_extra_mac_addr;
3830     /*
3831      * Total number of "real" peers (remote peers of an AP vdev,
3832      * BSS peer of a STA vdev, TDLS peer of a STA vdev) that FW supports.
3833      * If 0, then Host can use param_tlv->resource_config->num_peers as
3834      * total number of peers.
3835      */
3836     A_UINT32 num_total_peers;
3837     /*
3838      * Number of extra peers that Firmware adds.
3839      * These are self peers and/or other FW only peers that don't represent
3840      * a 802.11 transceiver, but instead are used for convenience, e.g. to
3841      * provide a pseudo-peer object for an AP vdev's bcast/mcast tx queues,
3842      * to allow each tx queue to belong to a peer object.
3843      * Peer ID can be up to num_total_peers + num_extra_peers.
3844      */
3845     A_UINT32 num_extra_peers;
3846     /*
3847      * max_ast_index - max AST index that Firmware can generate
3848      * max_ast_index = (ast_table_size-1), ast_table_size is dynamically chosen
3849      * based on num_peers configuration from Host. Hence Host needs to know the
3850      * max_ast_index that Firmware can generate.
3851      * A 0x0 value for max_ast_index means the target has not specified a limit.
3852      */
3853     A_UINT32 max_ast_index;
3854     /* pktlog_defs_checksum:
3855      * checksum computed from the definitions of the enums and structs
3856      * used within pktlog traces.
3857      * This pktlog defs checksum needs to be embedded into pktlog trace files
3858      * (specifically in ath_pktlog_bufhdr.version).
3859      *
3860      * If pktlog_defs_checksum is zero then it is invalid; it should be ignored
3861      * and ath_pktlog_bufhdr.magic_num needs to be PKTLOG_MAGIC_NUM_LEGACY
3862      * (i.e. 7735225).
3863      *
3864      * If pktlog_defs_checksum is non-zero then it is valid, and the host
3865      * should put it into the pktlog trace file header and set
3866      * ath_pktlog_bufhdr.magic_num as PKTLOG_MAGIC_NUM_VERSION_IS_CHECKSUM
3867      * (i.e. 2453506), to indicate that the file header version field contains
3868      * a checksum.
3869      */
3870     A_UINT32 pktlog_defs_checksum;
3871 
3872     /*
3873      * max_onchip_ast_index - max AST index that Firmware can generate
3874      * max_onchip_ast_index = (ast_table_size-1), where ast_table_size is
3875      * dynamically chosen based on num_peers configuration from Host.
3876      * Hence Host needs to know the max_onchip_ast_index that Firmware can
3877      * generate.
3878      * A 0x0 value for max_onchip_ast_index means the target has not specified
3879      * a limit.
3880      */
3881     A_UINT32 max_onchip_ast_index;
3882 
3883     /*
3884      * The maximum number of LinkView peers can be supported onsite of target,
3885      * based on proposed by the host configuration,
3886      * total number of available resources, configured peers number,
3887      * number of MSDUQs per LinkView peer's TID.
3888      * Target can reduce proposed by WMI_INIT_CMDID number, depending on
3889      * the target's resources availability.
3890      */
3891     A_UINT32 num_of_linkview_peers;
3892 
3893     /* Total number of "real" max_active_vdevs that FW supports. */
3894     A_UINT32 num_max_active_vdevs;
3895 
3896 /*
3897  * This fixed_param TLV is followed by these additional TLVs:
3898  * mac_addr_list[num_extra_mac_addr];
3899  */
3900 } wmi_ready_event_fixed_param;
3901 
3902 typedef struct {
3903     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
3904     /**
3905      * @brief num_vdev - number of virtual devices (VAPs) to support
3906      */
3907     A_UINT32 num_vdevs;
3908     /**
3909      * @brief num_peers - number of peer nodes to support
3910      */
3911     A_UINT32 num_peers;
3912     /*
3913      * @brief In offload mode target supports features like WOW, chatter and other
3914      * protocol offloads. In order to support them some functionalities like
3915      * reorder buffering, PN checking need to be done in target. This determines
3916      * maximum number of peers supported by target in offload mode
3917      */
3918     A_UINT32 num_offload_peers;
3919     /* @brief Number of reorder buffers available for doing target based reorder
3920      * Rx reorder buffering
3921      */
3922     A_UINT32 num_offload_reorder_buffs;
3923     /**
3924      * @brief num_peer_keys - number of keys per peer
3925      */
3926     A_UINT32 num_peer_keys;
3927     /**
3928      * @brief num_peer_tids - number of TIDs to provide storage for per peer.
3929      */
3930     A_UINT32 num_tids;
3931     /**
3932      * @brief ast_skid_limit - max skid for resolving hash collisions
3933      * @details
3934      *     The address search table is sparse, so that if two MAC addresses
3935      *     result in the same hash value, the second of these conflicting
3936      *     entries can slide to the next index in the address search table,
3937      *     and use it, if it is unoccupied.  This ast_skid_limit parameter
3938      *     specifies the upper bound on how many subsequent indices to search
3939      *     over to find an unoccupied space.
3940      */
3941     A_UINT32 ast_skid_limit;
3942     /**
3943      * @brief tx_chain_mask - the nominal chain mask for transmit
3944      * @details
3945      *     The chain mask may be modified dynamically, e.g. to operate AP tx with
3946      *     a reduced number of chains if no clients are associated.
3947      *     This configuration parameter specifies the nominal chain-mask that
3948      *     should be used when not operating with a reduced set of tx chains.
3949      */
3950     A_UINT32 tx_chain_mask;
3951     /**
3952      * @brief rx_chain_mask - the nominal chain mask for receive
3953      * @details
3954      *     The chain mask may be modified dynamically, e.g. for a client to use
3955      *     a reduced number of chains for receive if the traffic to the client
3956      *     is low enough that it doesn't require downlink MIMO or antenna
3957      *     diversity.
3958      *     This configuration parameter specifies the nominal chain-mask that
3959      *     should be used when not operating with a reduced set of rx chains.
3960      */
3961     A_UINT32 rx_chain_mask;
3962     /**
3963      * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
3964      * @details
3965      *     Each WMM access class (voice, video, best-effort, background) will
3966      *     have its own timeout value to dictate how long to wait for missing
3967      *     rx MPDUs to arrive before flushing subsequent MPDUs that have already
3968      *     been received.
3969      *     This parameter specifies the timeout in milliseconds for each class .
3970      *     NOTE: the number of class (defined as 4) cannot be
3971      *     changed in the future without breaking WMI compatibility.
3972      */
3973     A_UINT32 rx_timeout_pri[4];
3974     /**
3975      * @brief rx_decap mode - what mode the rx should decap packets to
3976      * @details
3977      *     MAC can decap to RAW (no decap), native wifi or Ethernet types
3978      *     THis setting also determines the default TX behavior, however TX
3979      *     behavior can be modified on a per VAP basis during VAP init
3980      */
3981     A_UINT32 rx_decap_mode;
3982     /**
3983      * @brief  scan_max_pending_req - what is the maximum scan requests than can be queued
3984      */
3985     A_UINT32 scan_max_pending_req;
3986 
3987     /**
3988      * @brief maximum VDEV that could use BMISS offload
3989      */
3990     A_UINT32 bmiss_offload_max_vdev;
3991 
3992     /**
3993      * @brief maximum VDEV that could use offload roaming
3994      */
3995     A_UINT32 roam_offload_max_vdev;
3996 
3997     /**
3998      * @brief maximum AP profiles that would push to offload roaming
3999      */
4000     A_UINT32 roam_offload_max_ap_profiles;
4001 
4002     /**
4003      * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
4004      * @details
4005      *     The target's WAL maintains a table to hold information regarding which
4006      *     peers belong to a given multicast group, so that if multicast->unicast
4007      *     conversion is enabled, the target can convert multicast tx frames to a
4008      *     series of unicast tx frames, to each peer within the multicast group.
4009      *     This num_mcast_groups configuration parameter tells the target how
4010      *     many multicast groups to provide storage for within its multicast
4011      *     group membership table.
4012      */
4013     A_UINT32 num_mcast_groups;
4014 
4015     /**
4016      * @brief num_mcast_table_elems - size to alloc for the mcast membership table
4017      * @details
4018      *     This num_mcast_table_elems configuration parameter tells the target
4019      *     how many peer elements it needs to provide storage for in its
4020      *     multicast group membership table.
4021      *     These multicast group membership table elements are shared by the
4022      *     multicast groups stored within the table.
4023      */
4024     A_UINT32 num_mcast_table_elems;
4025 
4026     /**
4027      * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
4028      * @details
4029      *     This configuration parameter specifies whether the target should
4030      *     perform multicast --> unicast conversion on transmit, and if so,
4031      *     what to do if it finds no entries in its multicast group membership
4032      *     table for the multicast IP address in the tx frame.
4033      *     Configuration value:
4034      *     0 -> Do not perform multicast to unicast conversion.
4035      *     1 -> Convert multicast frames to unicast, if the IP multicast address
4036      *          from the tx frame is found in the multicast group membership
4037      *          table.  If the IP multicast address is not found, drop the frame.
4038      *     2 -> Convert multicast frames to unicast, if the IP multicast address
4039      *          from the tx frame is found in the multicast group membership
4040      *          table.  If the IP multicast address is not found, transmit the
4041      *          frame as multicast.
4042      */
4043     A_UINT32 mcast2ucast_mode;
4044 
4045 
4046     /**
4047      * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
4048      * @details
4049      *     This parameter controls how much memory the target will allocate to
4050      *     store a log of tx PPDU meta-information (how large the PPDU was,
4051      *     when it was sent, whether it was successful, etc.)
4052      */
4053     A_UINT32 tx_dbg_log_size;
4054 
4055     /**
4056      * @brief num_wds_entries - how many AST entries to be allocated for WDS
4057      */
4058     A_UINT32 num_wds_entries;
4059 
4060     /**
4061      * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
4062      * this limit can be 0 -default, 1 256B
4063      */
4064     A_UINT32 dma_burst_size;
4065 
4066     /**
4067      * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
4068      * to account for interface latency to avoid underrun.
4069      */
4070     A_UINT32 mac_aggr_delim;
4071     /**
4072      * @brief rx_skip_defrag_timeout_dup_detection_check
4073      * @details
4074      *  determine whether target is responsible for detecting duplicate
4075      *  non-aggregate MPDU and timing out stale fragments.
4076      *
4077      *  A-MPDU reordering is always performed on the target.
4078      *
4079      *  0: target responsible for frag timeout and dup checking
4080      *  1: host responsible for frag timeout and dup checking
4081      */
4082     A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
4083 
4084     /**
4085      * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
4086      * and Max no of descriptors for each Video link (node).
4087      */
4088     A_UINT32 vow_config;
4089 
4090     /**
4091      * @brief maximum VDEV that could use GTK offload
4092      */
4093     A_UINT32 gtk_offload_max_vdev;
4094 
4095     /**
4096      * @brief num_msdu_desc - Number of msdu descriptors target should use
4097      */
4098     A_UINT32 num_msdu_desc; /* Number of msdu desc */
4099     /**
4100      * @brief max_frag_entry - Max. number of Tx fragments per MSDU
4101      * @details
4102      *     This parameter controls the max number of Tx fragments per MSDU.
4103      *     This is sent by the target as part of the WMI_SERVICE_READY event
4104      *     and is overridden by the OS shim as required.
4105      */
4106     A_UINT32 max_frag_entries;
4107 
4108     /**
4109      * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
4110      * @brief num_msdu_desc - Number of vdev that can support beacon offload
4111      */
4112 
4113     A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
4114 
4115     /**
4116      * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
4117      * @details
4118      *      Each TDLS enabled vdev can track outgoing transmits/RSSI/rates to/of
4119      *      peers in a connection tracking table for possible TDLS link creation
4120      *      or deletion. This controls the number of tracked peers per vdev.
4121      */
4122     A_UINT32  num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
4123     /**
4124      * @brief beacon_tx_offload_max_vdev - Number of maximum beaconing vaps at any time.
4125      */
4126      A_UINT32 beacon_tx_offload_max_vdev;
4127      A_UINT32 num_multicast_filter_entries;
4128      A_UINT32 num_wow_filters; /*host can configure the number of wow filters*/
4129 
4130      /**
4131      * @brief num_keep_alive_pattern - Num of keep alive patterns configured
4132      * from host.
4133      */
4134      A_UINT32 num_keep_alive_pattern;
4135     /**
4136      * @brief keep_alive_pattern_size - keep alive pattern size.
4137      */
4138      A_UINT32 keep_alive_pattern_size;
4139     /**
4140      * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
4141      * @details
4142      *      Each TDLS STA can become a sleep STA independently. This parameter
4143      *      mentions how many such sleep STAs can be supported concurrently.
4144      */
4145     A_UINT32 max_tdls_concurrent_sleep_sta;
4146 
4147     /**
4148      * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
4149      * @details
4150      *      Each TDLS STA can become a buffer STA independently. This parameter
4151      *      mentions how many such buffer STAs can be supported concurrently.
4152      */
4153     A_UINT32 max_tdls_concurrent_buffer_sta;
4154 
4155     /**
4156      * @brief wmi_send_separate - host configures fw to send the wmi separately
4157      */
4158     A_UINT32 wmi_send_separate;
4159 
4160     /**
4161      * @brief num_ocb_vdevs - Number of vdevs used for OCB support
4162      */
4163     A_UINT32 num_ocb_vdevs;
4164 
4165     /**
4166      * @brief num_ocb_channels - The supported number of simultaneous OCB channels
4167      */
4168     A_UINT32 num_ocb_channels;
4169 
4170     /**
4171      * @brief num_ocb_schedules - The supported number of OCB schedule segments
4172      */
4173     A_UINT32 num_ocb_schedules;
4174 
4175     /**
4176      * @brief specific configuration from host, such as per platform configuration
4177      */
4178     #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
4179     #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
4180 
4181     #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
4182     #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
4183 
4184     #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
4185     #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
4186 
4187     #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
4188     #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
4189 
4190     #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
4191     #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
4192 
4193     #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
4194     #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
4195 
4196     #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
4197     #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
4198 
4199     #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
4200     #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
4201 
4202     #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
4203     #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
4204 
4205     #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_S 9
4206     #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_M 0x200
4207 
4208     #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_S 10
4209     #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_M 0x400
4210 
4211     #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_S 11
4212     #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_M 0x800
4213 
4214     #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_S 12
4215     #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_M 0x1000
4216 
4217     #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_S 13
4218     #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_M 0x2000
4219 
4220     #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_S 14
4221     #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_M 0x4000
4222 
4223     #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_S 15
4224     #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_M 0x8000
4225 
4226     /*
4227      * If the AC override valid bit is set then this field will specify the
4228      * access category to use for EAPOL frames
4229      * 0 - WMM_AC_BE
4230      * 1 - WMM_AC_BK
4231      * 2 - WMM_AC_VI
4232      * 3 - WMM_AC_VO
4233      */
4234     #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_S 16
4235     #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_M 0x30000
4236 
4237     /*
4238      * If TX_ACK_RSSI is set, then the target should populate the ack_rssi
4239      * field within the WMI_MGMT_TX_COMPLETION_EVENT message, the ack_rssi
4240      * TLV within the WMI_MGMT_TX_BUNDLE_COMPLETION_EVENT message, and the
4241      * "MSDU ACK RSSI" array within the HTT_T2H TX_COMPL_IND message.
4242      */
4243     #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_S 18
4244     #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_M 0x40000
4245 
4246     /*
4247      * If HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN is set, the host will not
4248      * include the HTC header length in the payload length for all HTT_H2T
4249      * messages.
4250      * Otherwise, only when sending HTT_H2T_MSG_TYPE_TX_FRM message,
4251      * payload length includes HTC header length. Other HTT_H2T messages'
4252      * payload length does not include HTC header length.
4253      * The host will only set this HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN flag
4254      * if the target has set the WMI_SERVICE_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN
4255      * flag to indicate its support for this option.
4256      */
4257     #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_S 19
4258     #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_M 0x80000
4259 
4260     #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_S 20
4261     #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_M 0x100000
4262 
4263     /*
4264      * If this HTT_PEER_STATS is set, then the target should use the
4265      * the HTT_T2H_MSG_TYPE_PEER_STATS_IND message to upload peer stats;
4266      * else the target should avoid sending the PEER_STATS_IND message.
4267      */
4268     #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_S 21
4269     #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_M 0x200000
4270 
4271     /*
4272      * If this BIT is set, then the target should use peer_tid_ext to analyze
4273      * per peer per tid extended configurations
4274      */
4275     #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_S 22
4276     #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_M 0x400000
4277 
4278     /*
4279      * If the VIDEO_OVER_WIFI_ENABLE flag is set, the target will use a
4280      * series of algorithmic adjustments to optimize Video performance
4281      * by reducing latency, reducing latency jitter, and minimizing
4282      * dropped packets.
4283      */
4284     #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_S 23
4285     #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_M 0x800000
4286 
4287     /*
4288      * If the THREE_WAY_COEX_CONFIG_LEGACY flag is set, the target will use
4289      * the configuration parameters given by Host driver to WLAN FW and
4290      * apply them along with the existing CoEx Weights Override logic to
4291      * prioritize the WLAN-BT-Zigbee packets accordingly.
4292      *
4293      * The host shall only set the THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT
4294      * RSRC_CFG flag if the target has set the WMI_SERVICE
4295      * THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT flag.
4296      *
4297      * The logic to send GPM to BT-SOC with BT-ZB priorities remains the same.
4298      */
4299     #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_S 24
4300     #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_M 0x1000000
4301 
4302     /*
4303      * If the THREE_WAY_COEX_CONFIG_OVERRIDE flag is set, the target will use
4304      * the configuration parameters given by Host driver to WLAN FW and
4305      * apply them by OVERRIDing the existing CoEx Weights Override logic to
4306      * prioritize the WLAN-BT-Zigbee packets accordingly.
4307      *
4308      * The host shall only set the THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT
4309      * RSRC_CFG flag if the target has set the WMI_SERVICE
4310      * THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT flag.
4311      *
4312      * The logic to send GPM to BT-SOC with BT-ZB priorities remains the same.
4313      */
4314     #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_S 25
4315     #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_M 0x2000000
4316 
4317     /*
4318      * If the TX_COMPLETION_TX_TSF64 flag is set, the target should
4319      * populate the htt_tx_compl_ind_append_tx_tsf64 array within the
4320      * HTT_T2H TX_COMPL_IND message.
4321      */
4322     #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_S 26
4323     #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_M 0x4000000
4324 
4325     /*
4326      * If this BIT is set, then the target should support Packet capture(SMART MU FR)
4327      */
4328     #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_S 27
4329     #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_M 0x8000000
4330 
4331     /*
4332      * If this BIT is set, then target should support BSS Max Idle period.
4333      */
4334     #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_S 28
4335     #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_M 0x10000000
4336 
4337     /*
4338      * If this bit is set, then target should use the audio sync feature.
4339      * Host should only set this bit if the target has indicated via the
4340      * WMI_SERVICE_AUDIO_SYNC_SUPPORT flag that it supports audio sync.
4341      */
4342     #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_S  29
4343     #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_M 0x20000000
4344 
4345     /*
4346      * If this BIT is set, then the target should disable IPA
4347      */
4348     #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_S 30
4349     #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_M 0x40000000
4350 
4351     /*
4352      * If this bit is set, target should use the PCIe GEN switching feature.
4353      */
4354     #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_S 31
4355     #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_M 0x80000000
4356 
4357     A_UINT32 flag1;
4358 
4359     /** @brief smart_ant_cap - Smart Antenna capabilities information
4360      * @details
4361      *        1 - Smart antenna is enabled.
4362      *        0 - Smart antenna is disabled.
4363      * In future this can contain smart antenna specific capabilities.
4364      */
4365     A_UINT32 smart_ant_cap;
4366 
4367     /**
4368      * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
4369      * during init
4370      */
4371     A_UINT32 BK_Minfree;
4372     A_UINT32 BE_Minfree;
4373     A_UINT32 VI_Minfree;
4374     A_UINT32 VO_Minfree;
4375 
4376     /**
4377      * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
4378      * descriptor memory allocation.
4379      *   1 - Allocate fragment descriptor memory for data packet in firmware.
4380      *       If host wants to transmit data packet at its desired rate,
4381      *       this field must be set.
4382      *   0 - Don't allocate fragment descriptor for data packet.
4383      */
4384     A_UINT32 alloc_frag_desc_for_data_pkt;
4385 
4386     /** how much space to allocate for NDP NS (neighbor solicitation) specs */
4387     A_UINT32 num_ns_ext_tuples_cfg;
4388 
4389     /**
4390      * size (in bytes) of the buffer the FW shall allocate per vdev
4391      * firmware can dynamic allocate memory (or disable)
4392      * packet filtering feature.
4393      * 0 - fw chooses its default value
4394      * -1 (0XFFFFFFFF) - disable APF
4395      */
4396     A_UINT32 bpf_instruction_size;
4397 
4398     /**
4399      * Maximum no of BSSID based RX filters host would program
4400      * Value 0 means host doesn't given any limit to FW.
4401      */
4402     A_UINT32 max_bssid_rx_filters;
4403     /**
4404      * Use PDEV ID instead of MAC ID, added for backward compatibility with older host
4405      * which is using MAC ID. 1 means PDEV ID, 0 means MAC ID.
4406      */
4407     A_UINT32 use_pdev_id;
4408 
4409     /** Maximum number of scan clients whose DBS scan duty cycle can be configured */
4410     A_UINT32 max_num_dbs_scan_duty_cycle;
4411 
4412     /** Maximum number of Multi group key to support */
4413     A_UINT32 max_num_group_keys;
4414 
4415     union {
4416         A_UINT32 peer_map_unmap_v2_support; /* old name */
4417         /**
4418          * HTT peer map/unmap format support (map 4bits and unmap 4bits)
4419          * 0x00 -> host use default map/unmap only.
4420          * 0x01 -> legacy value that is interpreted the same as 0x22.
4421          * 0x22 -> host supports HTT peer map/unmap v2 format; the target is
4422          *         allowed but not required to use peer map/unmap v2 format.
4423          * 0x32 -> host supports HTT peer map v3 format; the target is
4424          *         allowed but not required to use peer map v3 format and
4425          *         peer unmap v2 format.
4426          */
4427         A_UINT32 peer_map_unmap_versions;
4428     };
4429 
4430     /** Sched config params for all pdevs
4431      * These tx scheduling configuration parameters are currently only
4432      * used for internal testing purposes; therefore the non-default
4433      * values for this field are not currently documented.
4434      * For regular use, this field should be set to 0x0.
4435      */
4436     A_UINT32 sched_params;
4437 
4438     /* Number of MAC on which AP TWT feature is supported */
4439     A_UINT32 twt_ap_pdev_count;
4440 
4441     /* Max no of STA with which TWT sessions can be formed by the AP */
4442     A_UINT32 twt_ap_sta_count;
4443 
4444     /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
4445      * This parameter provides the final specification for the maximum number
4446      * of SSIDs for the target to support for Network List Offload's scanning
4447      * for preferred networks.
4448      * This wmi_resource_config.max_nlo_ssids must be <= the max_nlo_ssids
4449      * field from the target's WMI_SERVICE_READY_EXT_EVENT message.
4450      * (If the target didn't provide a max_nlo_ssids field in the
4451      * WMI_SERVICE_READY_EXT message, or if the SERVICE_READY_EXT msg's
4452      * max_nlo_ssids value was 0x0, the target doesn't support dynamic
4453      * negotiation of max NLO SSIDs, and WMI_NLO_MAX_SSIDS (=16) applies.)
4454      * If this wmi_resource_config.max_nlo_ssids field is absent or 0x0,
4455      * the host does not support dynamic negotiation of max NLO SSIDs.
4456      * In such a case, the target will respond as follows:
4457      * If the target supports at least WMI_NLO_MAX_SSIDS, the target will
4458      * use the statically-configured WMI_NLO_MAX_SSIDS value.
4459      * If the target supports less than WMI_NLO_MAX_SSIDS, the target will
4460      * abort its boot-up, due to receiving an invalid/unsupported
4461      * configuration specification.
4462      */
4463     A_UINT32 max_nlo_ssids;
4464 
4465     /**
4466      * num_packet_filters: the num that host requests fw to support for
4467      * pktfilter in total, then firmware can dynamic allocate
4468      * memory(or disable) pktfilter feature.
4469      *
4470      * 0 -  fw chooses its default value.
4471      * -1(0XFFFFFFFF)- disable pktfilter.
4472      */
4473     A_UINT32 num_packet_filters;
4474 
4475     /**
4476      * num_max_sta_vdevs: the max num for the sta vdevs
4477      * fw will use it to config the memory of offload features that
4478      * are only for sta vdevs.
4479      * p2p client should be included.
4480      *
4481      *  0 - fw chooses its default value: 'num_vdevs' of this structure.
4482      */
4483     A_UINT32 num_max_sta_vdevs;
4484 
4485     /* ref to section 8.4.2.48 Multiple BSSID element
4486      * The Max BSSID Indicator field contains a value assigned to n,
4487      * where 2^n is the maximum number of BSSIDs
4488      */
4489     A_UINT32 max_bssid_indicator;
4490 
4491     /** @brief ul_resp_config - Configures the 11ax uplink ofdma feature on STA.
4492      *         I.e. sending uplink response to a trigger frame sent by AP.
4493      *  @details
4494      *        0 - fw default behavior, based on chipset
4495      *        1 - UL_RESP is disabled.
4496      *        2 - UL_RESP is enabled.
4497      *        other - reserved.
4498      */
4499     A_UINT32 ul_resp_config;
4500 
4501     /* msdu_flow_override_config0 - contains AST enable bitmask
4502      * AST0 is unconditionally enabled, unless the MSDU flow override feature
4503      * is entirely disabled.
4504      * AST1 through AST3 are conditionally enabled, based on bits 0-2 in
4505      * msdu_flow_override_config0.
4506      * If all three bits are 0, no msdu flow override feature at all in FW.
4507      *
4508      * The WMI_MSDU_FLOW_AST_ENABLE_GET and WMI_MSDU_FLOW_AST_ENABLE_SET
4509      * macros are used to read and write these bitfields.
4510      */
4511     A_UINT32 msdu_flow_override_config0;
4512 
4513      /* msdu_flow_override_config1:
4514       * Bits 3:0   - AST0_FLOW_MASK(4)
4515       * Bits 7:4   - AST1_FLOW_MASK(4)
4516       * Bits 11:8  - AST2_FLOW_MASK(4)
4517       * Bits 15:12 - AST3_FLOW_MASK(4)
4518       * Bits 23:16 - TID_VALID_HI_PRI (8)
4519       * Bits 31:24 - TID_VALID_LOW_PRI (8)
4520       *
4521       * The macros
4522       * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET
4523       * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET
4524       * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET
4525       * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET
4526       * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET
4527       * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET
4528       * are used to read and write these bitfields.
4529       */
4530     A_UINT32 msdu_flow_override_config1;
4531 
4532     /** @brief flags2 - contains flags used for the following purposes:
4533      *  Configure 11ax uplink ofdma/MU-MIMO feature in FW, when chipsets
4534      *  are brought up in Repeater/STA mode.
4535      *
4536      *  @details
4537      *  Bits  3:0
4538      *      Enable UL MU-OFDMA/MIMO for PDEVs WIFI0, WIFI1, WIFI2
4539      *      This flags should only be set when a pdev has STA VAP
4540      *      in repeater/self-organizing-network modes.
4541      *      E.g. to enable UL RESP for 5G and 2G radios, value shall be
4542      *      0b00000000000000000000000000000011 = 0x3.
4543      *      Host shall use UCI config for a radio to populate this value,
4544      *      each radio entry shall have "config re_ul_resp 1" value set.
4545      *      Hence this can be configured dynamically.
4546      *
4547      *      Refer to the below WMI_RSRC_CFG_FLAGS2_RE_ULRESP_PDEV_CFG_GET/SET
4548      *      macros.
4549      *  Bits 5:4
4550      *      HTT rx peer metadata version number that host supports.
4551      *      Firmware initially sends the target supported version number
4552      *      as part of service_ready_ext2 message.
4553      *      Host can ack the version number that it is using as part of
4554      *      this message.
4555      *      0-> legacy case
4556      *      1-> MLO support
4557      *      2-3-> Reserved
4558      *      Refer to the WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION macros.
4559      *  Bit 6 - is_sap_connected_d3wow_enabled
4560      *      Enable D3WoW for SAP w/ clients connected
4561      *      0-> disable the feature
4562      *      1-> enable the feature
4563      *      Refer to the WMI_RSRC_CFG_FLAGS2_IS_SAP_CONNECTED_D3WOW_ENABLED
4564      *      GET/SET macros.
4565      *  Bit 7 - is_go_connected_d3wow_enabled
4566      *      Enable D3WoW for GO w/ clients connected
4567      *      0-> disable the feature
4568      *      1-> enable the feature
4569      *      Refer to the WMI_RSRC_CFG_FLAGS2_IS_GO_CONNECTED_D3WOW_ENABLED
4570      *      GET/SET macros.
4571      *  Bit 8 - enable_dynamic_pcie_gen_speed_switch
4572      *      enable dynamic pcie gen speed switch
4573      *      0-> disable the feature
4574      *      1-> enable the feature
4575      *      Refer to the WMI_RSRC_CFG_FLAGS2_IS_DYNAMIC_PCIE_GEN_SPEED_SWITCH_ENABLED
4576      *      GET/SET macros.
4577      *  Bit 9 - calc_next_dtim_count
4578      *      0 -> disable calculation of DTIM count for MBSSID_NON_TX_VAP
4579      *      1 -> Used by some hosts to indicate calculation of DTIM count
4580      *           for MBSSID_NON_TX_VAP
4581      *      Refer to WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_GET/SET macros.
4582      *
4583      * Bit 10 - arp_ac_override_valid
4584      *      0 -> arp_ac_override field is invalid
4585      *      1 -> arp_ac_override field is valid
4586      *      Refer to WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_VALID_GET/SET macros.
4587      * Bit 12:11 - arp_ac_override
4588      *      If the AC override valid bit is set then this field will specify the
4589      *      access category to use for ARP frames
4590      *      0 - WMM_AC_BE
4591      *      1 - WMM_AC_BK
4592      *      2 - WMM_AC_VI
4593      *      3 - WMM_AC_VO
4594      *      Refer to WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_GET/SET macros.
4595      * Bit 13 - sawf_sched
4596      *      SAWF feature flag for scheduler
4597      *      0  -> disable SAWF based scheduling
4598      *      1  -> enable SAWF based scheduling
4599      *      Refer to WMI_RSRC_CFG_FLAGS2_SAWF_CONFIG_ENABLE_GET/SET macros.
4600      * Bit 14 - notify_frame_support
4601      *      Flag to enable notify_frame_support from host.
4602      *      0  -> disable notify_frame_support feature
4603      *      1  -> enable_notify_frame_support feature
4604      *      Refer to WMI_RSRC_CFG_FLAGS2_NOTIFY_FRAME_CONFIG_ENABLE_GET/SET
4605      *      macros.
4606      * Bit 15 - disable_wds_mec_intrabss
4607      *      Flag to disable wds learning, MEC, intrabss offload.
4608      *      By default, it is enabled.
4609      *      0  -> enable wds_mec_intrabss offload
4610      *      1  -> disable wds_mec_intrabss offload
4611      *      Refer to WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_MEC_INTRABSS_OFFLOAD_GET /
4612      *      SET macros.
4613      * Bit 16 - latency_flowq_support
4614      *      Flag to indicate whether host supports latency tolerant queue.
4615      *      By default, it is disabled.
4616      *      0  -> disable latency_flowq_support
4617      *      1  -> enable latency_flowq_support
4618      *      Refer to WMI_RSRC_CFG_FLAGS2_LATENCY_FLOWQ_SUPPORT_GET/SET macros.
4619      * Bit 17 - rf_path_mode
4620      *      Flag to indicate overlapping_freq_mode
4621      *      By default, it will be primary mode (0)
4622      *      0 - Primary
4623      *      1 - Secondary
4624      *      Refer to WMI_RSRC_CFG_FLAGS2_RF_PATH_MODE_GET/SET macros.
4625      * Bit 18 - disable_wds_peer_map_unmap_event
4626      *      Flag to indicate whether the WDS peer map/unmap event should be
4627      *      processed or ignored.
4628      *      0 - leave the WDS peer map/unmap event enabled
4629      *      1 - disable the WDS peer map/unmap event
4630      *      This flag shall only be set if the target has set the
4631      *      WMI_SERVICE_DISABLE_WDS_PEER_MAP_UNMAP_EVENT_SUPPORT flag.
4632      *      Refer to WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_PEER_MAP_UNMAP_EVENT_GET
4633      *      and _SET macros.
4634      *  Bit 19 - show whether the host supports 128 or 256 service classes
4635      *      This bit will be set when host supports for 256 service classes
4636      *      0 -> host supports 128 service classes
4637      *      1 -> host supports 255 [0-254] valid service classes,
4638      *           and 255 indicates an invalid service class
4639      *      Refer to WMI_RSRC_CFG_FLAGS2_SAWF_255_SVC_CLASS_SUPPORT_GET/SET
4640      *      macros.
4641      *  Bit 20 - enable feature EPM (Enhanced Power Management)
4642      *      0 -> disable the feature
4643      *      1 -> enable the feature
4644      *      Refer to the below WMI_RSRC_CFG_FLAGS2_EPM_GET/SET macros.
4645      *  Bit 21 - enable new MGMT SRNG for beacons and probe responses.
4646      *      0 -> disable the feature
4647      *      1 -> enable the feature
4648      *      Refer to the below WMI_RSRC_CFG_FLAGS2_IS_MGMT_SRNG_ENABLED_GET/SET
4649      *      macros.
4650      *  Bit 22 - enable 4address WDS support
4651      *      0 -> disable the feature
4652      *      1 -> enable the feature
4653      *     Refer to below WMI_RSRC_CFG_FLAGS2_ENABLE_WDS_NULL_FRAME_SUPPORT
4654      *
4655      *  Bits 31:23 - Reserved
4656      */
4657     A_UINT32 flags2;
4658     /** @brief host_service_flags - can be used by Host to indicate
4659      * services that host can support.
4660      *
4661      *  @details
4662      *  Bit 0
4663      *      The bit will be set when Host HDD supports separate iface creation
4664      *      for NAN.  More specifically Host can support creation of NAN vdev
4665      *      in firmware.
4666      *
4667      *      Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_IFACE_SUPPORT_GET/SET
4668      *      macros defined below.
4669      *  Bit 1
4670      *      The bit will be set when HOST is capable of processing multiple
4671      *      radio events per radio. More specifically whenever Firmware is
4672      *      sending multiple radio events (WMI_RADIO_LINK_STATS_EVENTID
4673      *      = 0x16004) for a single radio,
4674      *      Through this flag Firmware will know that HOST is able to support
4675      *      delivery of RADIO_LINK_STATS across multiple event messages,
4676      *      and Firmware can send multiple radio events.
4677      *
4678      *      Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_HOST_SUPPORT_MULTI_RADIO_EVTS_PER_RADIO_GET/SET
4679      *      macros defined below.
4680      *  Bit 2
4681      *      This bit will be set when host is able to handle split AST feature.
4682      *      Refer to the below definitions of the
4683      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_SPLIT_AST_FEATURE_HOST_SUPPORT_GET
4684      *      and _SET macros.
4685      *  Bit 3
4686      *      This bit will be set when host is able to enable EAPOL offload to
4687      *      FW for SAE roaming feature.
4688      *      Refer to the below definitions of the
4689      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_SAE_EAPOL_OFFLOAD_SUPPORT_GET
4690      *      and _SET macros.
4691      *  Bit 4
4692      *      This bit will be set when host is able to process the
4693      *      WMI_REG_CC_EXT_EVENT.
4694      *      Refer to the below definitions of the
4695      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_CC_EXT_SUPPORT_GET
4696      *      and _SET macros.
4697      *  Bit 5
4698      *      This bit will be set when the host supports NAN channels.
4699      *      Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_CHANNEL_SUPPORT_GET/SET
4700      *  Bit 6
4701      *      This bit will be set when the host supports synchronous TWT events.
4702      *      Refer to WMI_RSRC_CFG_HOST_SERVICE_FLAG_STA_TWT_SYNC_EVT_SUPPORT_GET
4703      *      and _SET.
4704      *  Bit 7
4705      *      This bit will be set when host supports both LPI and SP mode.
4706      *      when this bit is set to 0 - Indicate LPI only mode
4707      *                  when set to 1 - Indicate both SP mode and LPI mode
4708      *                                  both are supported
4709      *      Refer to the below definitions of the
4710      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_LPI_SP_MODE_SUPPORT_GET
4711      *      and _SET macros.
4712      *  Bit 8
4713      *      This bit will be set when host wants to disable timer check in
4714      *      reg for AFC.
4715      *      when set to 1 - Disable timer check
4716      *      Refer to the below definitions of the
4717      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_TIMER_CHECK_GET
4718      *      and _SET macros.
4719      *  Bit 9
4720      *      This bit will be set when host host wants to disable request id
4721      *      check in reg for AFC.
4722      *      when set to 1 - Disable Request ID check
4723      *      Refer to the below definitions of the
4724      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_REQ_ID_CHECK_GET
4725      *      and _SET macros.
4726      *  Bit 10
4727      *      This bit will be set when host wants to enable indoor for AFC
4728      *      when this bit is set to 0 indoor mode not enabled
4729      *      when this bit is set to 1 indoor mode is enabled
4730      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_INDOOR_SUPPORT_CHECK_GET
4731      *      and SET macros
4732      *  Bit 11
4733      *      This bit will be set when host wants to enable outdoor for AFC
4734      *      when this bit is set to 0 outdoor mode not enabled
4735      *      when this bit is set to 1 outdoor mode is enabled
4736      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_OUTDOOR_SUPPORT_CHECK_GET
4737      *      and SET macros.
4738      *  Bit 12
4739      *      This bit will be set when host host wants to enable/disable
4740      *      REO QREF feature
4741      *      when set to 1 - Enable the REO QREF feature
4742      *      when set to 0 - Disable the REO QREF feature
4743      *      Refer to the below definitions of the
4744      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_REO_QREF_FEATURE_SUPPORT_GET
4745      *      and _SET macros.
4746      *  Bit 13
4747      *      This bit will be set when host host wants to enable/disable
4748      *      bang radar 320M support feature
4749      *      when set to 1 - Enable the bang radar 320M support
4750      *      when set to 0 - Disable the bang radar 320M support
4751      *      Refer to the below definitions of the
4752      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_BANG_RADAR_320M_SUPPORT_GET
4753      *      and _SET macros.
4754      *  Bit 14
4755      *      This bit will be set when host wants to enable/disable
4756      *      full BW NOL feature.
4757      *      When set to 1: Enable full BW NOL feature.
4758      *      When set to 0: Disable the full BW NOL feature.
4759      *      Refer to the below definitions of the
4760      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_RADAR_FLAGS_FULL_BW_NOL_GET
4761      *      and _SET macros.
4762      *  Bit 15
4763      *      This bit will be set if the host has smem_mailbox support enabled.
4764      *      Refer to the below definitions of the
4765      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_GET
4766      *      and _SET macros.
4767      *  Bit 16
4768      *      ML FULL monitor mode
4769      *      This bit will be set by host to enable ML_FULL_MONITOR_MODE
4770      *      Refer to the below definitions of the
4771      *      WMI_RSRC_CFG_HOST_SERVICE_FLAG_ML_FULL_MONITOR_MODE_SUPPORT_GET
4772      *      and _SET macros
4773      *  Bit 17
4774      *      This bit will set by host to inform FW that rx buffer refilling
4775      *      is supported by the host in Qdata feature (tx LCE consent pkt),
4776      *      So FW will start refilling the buffers.
4777      *      Refer to the below definitions of WMI_RSRC_CFG_HOST_SERVICE_FLAG
4778      *      OPT_DP_CTRL_REPLENISH_REFILL_RX_BUFFER_SUPPORT_GET and _SET macros.
4779      *  Bits 31:18 - Reserved
4780      */
4781     A_UINT32 host_service_flags;
4782 
4783     /** @brief max_rnr_neighbours -
4784      * The Maximum number of neighbour RNR's from other SoC.
4785      * This limits the field @num_bss in @wmi_pdev_tbtt_offset_sync_cmd_fixed_param.
4786      * Value of 0 means cross SoC TBTT offset synchronization not required and
4787      * @PDEV_TBTT_OFFSET_SYNC_CMD wouldn't be used.
4788      */
4789     A_UINT32 max_rnr_neighbours;
4790 
4791     /** @brief ema_max_vap_cnt - number of maximum EMA Tx vaps (VAPs having both
4792      *  VDEV_FLAGS_EMA_MODE and VDEV_FLAGS_TRANSMIT_AP set) at any instance
4793      * of time across SOC. Legacy MBSS Vaps are not accounted in this field.
4794      */
4795     A_UINT32 ema_max_vap_cnt;
4796 
4797     /** @brief ema_max_profile_period - maximum profile periodicity
4798      * (maximum number of beacons after which VAP profiles repeat)
4799      * for any EMA VAP on any pdev.
4800      */
4801 
4802     A_UINT32 ema_max_profile_period;
4803     /** @brief max_ndp_sessions
4804      * This is the max ndp sessions sent by the host which is the minimum
4805      * of the value requested within the host's ini configurations and
4806      * the max ndp sessions supported by the firmware (as reported in the
4807      * SERVICE_READY_EXT2_EVENT message).
4808      */
4809     A_UINT32 max_ndp_sessions;
4810 
4811     /** @brief max_ndi_supported
4812      * This is the max ndi interfaces sent by the host based on the value
4813      * specified by the host's ini configuration.
4814      */
4815     A_UINT32 max_ndi_interfaces;
4816 
4817     /** @brief max_ap_vaps
4818      * Maximum number of AP mode vdevs created at any time.
4819      * This value is minimum of the number of AP vdevs supported by
4820      * the target and host.
4821      */
4822     A_UINT32 max_ap_vaps;
4823 
4824     /** @brief cbc_flow_ena
4825      * When cbc_flow_ena is se, halphy will do Cold Boot Calibration flow.
4826      * Otherwise, halphy will do normal flow.
4827      */
4828     A_UINT32 cbc_flow_ena;
4829 
4830     /** @brief ema_init_config - can be used by Host to indicate beacon size
4831      *  @details
4832      *  Bit   0 : 15 - Size of beacon, currently it can be sent as
4833      *                 1500 or 2500 or 4000 bytes
4834      *  Bit  16 : 31 - Reserved
4835      *  In case of Backward compatibility, if this variable is 0 then
4836      *  default beacon size (1500) is used.
4837      */
4838     A_UINT32 ema_init_config;
4839 
4840     /** @brief carrier_config
4841      * Carrier profile configuration
4842      * BIT 0 -> enable/disable charter configurations
4843      * BIT 1 : 31 Reserved
4844      */
4845     A_UINT32 carrier_config;
4846 
4847     /** @brief num_of_linkview_peers - proposed by the host value of
4848      *      the peers with the num_of_linkview_msduqs_per_tid allocation
4849      *  @details
4850      *  Host can request what the number of 'num_peers' should use
4851      *  num_of_linkview_msduqs_per_tid. All other peers will use
4852      *  default number of MSDUQs allocated.
4853      */
4854     A_UINT32 num_of_linkview_peers;
4855 
4856     /** @brief num_of_linkview_msduqs_per_tid - proposed by the host value of
4857      *      MSDUQs per each LinkView peer's TID
4858      *  @details
4859      *  Host sends the number of MSDUQs per each LinkView peer's TID.
4860      *  This number will be used during resources allocation for
4861      * LinkView peer in the target.
4862      */
4863     A_UINT32 num_of_linkview_msduqs_per_tid;
4864 
4865     /**
4866      * @brief num_max_active_vdevs -
4867      * number of max active virtual devices (VAPs) to support
4868      */
4869     A_UINT32 num_max_active_vdevs;
4870 
4871     /**
4872      * @brief num_max_mlo_link_per_ml_bss
4873      * number of max partner links of a ML BSS
4874      */
4875     A_UINT32 num_max_mlo_link_per_ml_bss;
4876 
4877     /**
4878      * @brief num_max_active_mlo_link_per_ml_bss
4879      * number of max active partner links of a ML BSS
4880      */
4881     A_UINT32 num_max_active_mlo_link_per_ml_bss;
4882 } wmi_resource_config;
4883 
4884 #define WMI_MSDU_FLOW_AST_ENABLE_GET(msdu_flow_config0, ast_x) \
4885     (((ast_x) == 0) ? 1 : ((msdu_flow_config0) & (1 << ((ast_x) - 1))))
4886 #define WMI_MSDU_FLOW_AST_ENABLE_SET(msdu_flow_config0, ast_x, enable) \
4887     do { \
4888         if ((ast_x) == 0) break;  \
4889         if ((enable)) { \
4890             (msdu_flow_config0) |= (1 << ((ast_x) - 1)); \
4891         } else { \
4892             (msdu_flow_config0) &= ~(1 << ((ast_x) - 1)); \
4893         } \
4894     } while(0)
4895 
4896 #define WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET(msdu_flow_config1, ast_x) \
4897     (((msdu_flow_config1) & (0x0f << ((ast_x) * 4))) >> ((ast_x) * 4))
4898 #define WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET( \
4899     msdu_flow_config1, ast_x, mask) \
4900     do { \
4901         (msdu_flow_config1) &= ~(0xF << ((ast_x) * 4)); \
4902         (msdu_flow_config1) |= ((mask) << ((ast_x) * 4)); \
4903     } while(0)
4904 
4905 #define WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET(msdu_flow_config1) \
4906     (((msdu_flow_config1) & 0xff0000) >> 16)
4907 #define WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET(msdu_flow_config1, mask) \
4908     do { \
4909         (msdu_flow_config1) &= ~0xff0000; \
4910         (msdu_flow_config1) |= ((mask) << 16); \
4911     } while(0)
4912 
4913 #define WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET(msdu_flow_config1) \
4914     ((msdu_flow_config1 & 0xff000000) >> 24)
4915 #define WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET(msdu_flow_config1, mask) \
4916     do { \
4917         (msdu_flow_config1) &= ~0xff000000; \
4918         (msdu_flow_config1) |= ((mask) << 24); \
4919     } while(0)
4920 
4921 #define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
4922     do { \
4923         (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
4924         (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
4925             WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
4926     } while (0)
4927 #define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
4928     (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
4929     WMI_RSRC_CFG_FLAG_ ## flag ## _S)
4930 
4931 #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
4932     WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
4933 #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
4934     WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
4935 
4936 #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
4937     WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
4938 #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
4939     WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
4940 
4941 #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
4942     WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
4943 #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
4944     WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
4945 
4946 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
4947     WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
4948 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
4949     WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
4950 
4951 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
4952     WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
4953 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
4954     WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
4955 
4956 #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
4957     WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
4958 #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
4959     WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
4960 
4961 #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
4962     WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
4963 #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
4964     WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
4965 
4966 #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
4967     WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
4968 #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
4969     WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
4970 
4971 #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
4972     WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
4973 #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
4974     WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
4975 
4976 #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(word32, value) \
4977     WMI_RSRC_CFG_FLAG_SET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT, (value))
4978 #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_GET(word32) \
4979     WMI_RSRC_CFG_FLAG_GET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT)
4980 
4981 #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_SET(word32, value) \
4982     WMI_RSRC_CFG_FLAG_SET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT, (value))
4983 #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_GET(word32) \
4984     WMI_RSRC_CFG_FLAG_GET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT)
4985 
4986 #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_SET(word32, value) \
4987     WMI_RSRC_CFG_FLAG_SET((word32), TCL_CCE_DISABLE, (value))
4988 #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_GET(word32) \
4989     WMI_RSRC_CFG_FLAG_GET((word32), TCL_CCE_DISABLE)
4990 
4991 #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_SET(word32, value) \
4992     WMI_RSRC_CFG_FLAG_SET((word32), TIM_V2_SUPPORT_ENABLE, (value))
4993 #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_GET(word32) \
4994     WMI_RSRC_CFG_FLAG_GET((word32), TIM_V2_SUPPORT_ENABLE)
4995 
4996 #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_SET(word32, value) \
4997     WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_REKEY_MINRATE_SUPPORT_ENABLE, (value))
4998 #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_GET(word32) \
4999     WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_REKEY_MINRATE_SUPPORT_ENABLE)
5000 
5001 #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_SET(word32, value) \
5002     WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_AC_OVERRIDE_VALID, (value))
5003 #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_GET(word32) \
5004     WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE_VALID)
5005 
5006 #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_SET(word32, value) \
5007     WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_AC_OVERRIDE, (value))
5008 #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_GET(word32) \
5009     WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE)
5010 
5011 #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_SET(word32, value) \
5012     WMI_RSRC_CFG_FLAG_SET((word32), TX_ACK_RSSI, (value))
5013 #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_GET(word32) \
5014     WMI_RSRC_CFG_FLAG_GET((word32), TX_ACK_RSSI)
5015 
5016 #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_SET(word32, value) \
5017     WMI_RSRC_CFG_FLAG_SET((word32), HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN, (value))
5018 #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_GET(word32) \
5019     WMI_RSRC_CFG_FLAG_GET((word32), HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN)
5020 
5021 #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_SET(word32, value) \
5022     WMI_RSRC_CFG_FLAG_SET((word32), PEER_UNMAP_RESPONSE_SUPPORT, (value))
5023 #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_GET(word32) \
5024     WMI_RSRC_CFG_FLAG_GET((word32), PEER_UNMAP_RESPONSE_SUPPORT)
5025 
5026 #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_SET(word32, value) \
5027     WMI_RSRC_CFG_FLAG_SET((word32), HTT_PEER_STATS, (value))
5028 #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_GET(word32) \
5029     WMI_RSRC_CFG_FLAG_GET((word32), HTT_PEER_STATS)
5030 
5031 #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_SET(word32, value) \
5032     WMI_RSRC_CFG_FLAG_SET((word32), PEER_TID_EXT, (value))
5033 #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_GET(word32) \
5034     WMI_RSRC_CFG_FLAG_GET((word32), PEER_TID_EXT)
5035 
5036 #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_SET(word32, value) \
5037     WMI_RSRC_CFG_FLAG_SET((word32), VIDEO_OVER_WIFI_ENABLE, (value))
5038 #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_GET(word32) \
5039     WMI_RSRC_CFG_FLAG_GET((word32), VIDEO_OVER_WIFI_ENABLE)
5040 
5041 #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_SET(word32, value) \
5042     WMI_RSRC_CFG_FLAG_SET((word32), THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT, (value))
5043 #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_GET(word32) \
5044     WMI_RSRC_CFG_FLAG_GET((word32), THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT)
5045 
5046 #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_SET(word32, value) \
5047     WMI_RSRC_CFG_FLAG_SET((word32), THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT, (value))
5048 #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_GET(word32) \
5049     WMI_RSRC_CFG_FLAG_GET((word32), THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT)
5050 
5051 #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_SET(word32, value) \
5052     WMI_RSRC_CFG_FLAG_SET((word32), TX_COMPLETION_TX_TSF64_ENABLE, (value))
5053 #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_GET(word32) \
5054     WMI_RSRC_CFG_FLAG_GET((word32), TX_COMPLETION_TX_TSF64_ENABLE)
5055 
5056 #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_SET(word32, value) \
5057     WMI_RSRC_CFG_FLAG_SET((word32), PACKET_CAPTURE_SUPPORT, (value))
5058 #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_GET(word32) \
5059     WMI_RSRC_CFG_FLAG_GET((word32), PACKET_CAPTURE_SUPPORT)
5060 
5061 #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_SET(word32, value) \
5062     WMI_RSRC_CFG_FLAG_SET((word32), BSS_MAX_IDLE_TIME_SUPPORT, (value))
5063 #define WMI_RSRC_CFG_FLAG_BSS_MAX_IDLE_TIME_SUPPORT_GET(word32) \
5064     WMI_RSRC_CFG_FLAG_GET((word32), BSS_MAX_IDLE_TIME_SUPPORT)
5065 
5066 #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_SET(word32, value) \
5067     WMI_RSRC_CFG_FLAG_SET((word32), AUDIO_SYNC_SUPPORT, (value))
5068 #define WMI_RSRC_CFG_FLAG_AUDIO_SYNC_SUPPORT_GET(word32) \
5069     WMI_RSRC_CFG_FLAG_GET((word32), AUDIO_SYNC_SUPPORT)
5070 
5071 #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_SET(word32, value) \
5072     WMI_RSRC_CFG_FLAG_SET((word32), IPA_DISABLE, (value))
5073 #define WMI_RSRC_CFG_FLAG_IPA_DISABLE_GET(word32) \
5074     WMI_RSRC_CFG_FLAG_GET((word32), IPA_DISABLE)
5075 
5076 #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_SET(word32, value) \
5077     WMI_RSRC_CFG_FLAG_SET((word32), PCIE_GEN_SWITCH_CAPABLITY, (value))
5078 #define WMI_RSRC_CFG_FLAG_PCIE_GEN_SWITCH_CAPABLITY_GET(word32) \
5079     WMI_RSRC_CFG_FLAG_GET((word32), PCIE_GEN_SWITCH_CAPABLITY)
5080 
5081 #define WMI_RSRC_CFG_FLAGS2_RE_ULRESP_PDEV_CFG_GET(flags2, pdev_id) \
5082     WMI_GET_BITS(flags2, pdev_id, 1)
5083 #define WMI_RSRC_CFG_FLAGS2_RE_ULRESP_PDEV_CFG_SET(flags2, pdev_id, value) \
5084     WMI_SET_BITS(flags2, pdev_id, 1, value)
5085 
5086 #define WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION_GET(flags2) \
5087     WMI_GET_BITS(flags2, 4, 2)
5088 #define WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION_SET(flags2, value) \
5089     WMI_SET_BITS(flags2, 4, 2, value)
5090 
5091 #define WMI_RSRC_CFG_FLAGS2_IS_SAP_CONNECTED_D3WOW_ENABLED_GET(flags2) \
5092     WMI_GET_BITS(flags2, 6, 1)
5093 #define WMI_RSRC_CFG_FLAGS2_IS_SAP_CONNECTED_D3WOW_ENABLED_SET(flags2, value) \
5094     WMI_SET_BITS(flags2, 6, 1, value)
5095 
5096 #define WMI_RSRC_CFG_FLAGS2_IS_GO_CONNECTED_D3WOW_ENABLED_GET(flags2) \
5097     WMI_GET_BITS(flags2, 7, 1)
5098 #define WMI_RSRC_CFG_FLAGS2_IS_GO_CONNECTED_D3WOW_ENABLED_SET(flags2, value) \
5099     WMI_SET_BITS(flags2, 7, 1, value)
5100 
5101 #define WMI_RSRC_CFG_FLAGS2_IS_DYNAMIC_PCIE_GEN_SPEED_SWITCH_ENABLED_GET(flags2) \
5102     WMI_GET_BITS(flags2, 8, 1)
5103 #define WMI_RSRC_CFG_FLAGS2_IS_DYNAMIC_PCIE_GEN_SPEED_SWITCH_ENABLED_SET(flags2, value) \
5104     WMI_SET_BITS(flags2, 8, 1, value)
5105 
5106 #define WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_GET(flags2) \
5107     WMI_GET_BITS(flags2, 9, 1)
5108 #define WMI_RSRC_CFG_FLAGS2_CALC_NEXT_DTIM_COUNT_SET(flags2, value) \
5109     WMI_SET_BITS(flags2, 9, 1, value)
5110 
5111 #define WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_VALID_GET(flags2) \
5112     WMI_GET_BITS(flags2, 10, 1)
5113 #define WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_VALID_SET(flags2, value) \
5114     WMI_SET_BITS(flags2, 10, 1, value)
5115 
5116 #define WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_GET(flags2) \
5117     WMI_GET_BITS(flags2, 11, 2)
5118 #define WMI_RSRC_CFG_FLAGS2_ARP_AC_OVERRIDE_SET(flags2, value) \
5119     WMI_SET_BITS(flags2, 11, 2, value)
5120 
5121 #define WMI_RSRC_CFG_FLAGS2_SAWF_CONFIG_ENABLE_GET(flags2) \
5122     WMI_GET_BITS(flags2, 13, 1)
5123 #define WMI_RSRC_CFG_FLAGS2_SAWF_CONFIG_ENABLE_SET(flags2, value) \
5124     WMI_SET_BITS(flags2, 13, 1, value)
5125 
5126 #define WMI_RSRC_CFG_FLAGS2_NOTIFY_FRAME_CONFIG_ENABLE_GET(flags2) \
5127     WMI_GET_BITS(flags2, 14, 1)
5128 #define WMI_RSRC_CFG_FLAGS2_NOTIFY_FRAME_CONFIG_ENABLE_SET(flags2, value) \
5129     WMI_SET_BITS(flags2, 14, 1, value)
5130 
5131 #define WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_MEC_INTRABSS_OFFLOAD_GET(flags2) \
5132     WMI_GET_BITS(flags2, 15, 1)
5133 #define WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_MEC_INTRABSS_OFFLOAD_SET(flags2, value) \
5134     WMI_SET_BITS(flags2, 15, 1, value)
5135 
5136 #define WMI_RSRC_CFG_FLAGS2_LATENCY_FLOWQ_SUPPORT_GET(flags2) \
5137     WMI_GET_BITS(flags2, 16, 1)
5138 #define WMI_RSRC_CFG_FLAGS2_LATENCY_FLOWQ_SUPPORT_SET(flags2, value) \
5139     WMI_SET_BITS(flags2, 16, 1, value)
5140 
5141 #define WMI_RSRC_CFG_FLAGS2_RF_PATH_MODE_GET(flags2) \
5142     WMI_GET_BITS(flags2, 17, 1)
5143 #define WMI_RSRC_CFG_FLAGS2_RF_PATH_MODE_SET(flags2, value) \
5144     WMI_SET_BITS(flags2, 17, 1, value)
5145 
5146 #define WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_PEER_MAP_UNMAP_EVENT_GET(flags2) \
5147     WMI_GET_BITS(flags2, 18, 1)
5148 #define WMI_RSRC_CFG_FLAGS2_DISABLE_WDS_PEER_MAP_UNMAP_EVENT_SET(flags2, value) \
5149     WMI_SET_BITS(flags2, 18, 1, value)
5150 
5151 #define WMI_RSRC_CFG_FLAGS2_SAWF_255_SVC_CLASS_SUPPORT_GET(flags2) \
5152     WMI_GET_BITS(flags2, 19, 1)
5153 #define WMI_RSRC_CFG_FLAGS2_SAWF_255_SVC_CLASS_SUPPORT_SET(flags2, value) \
5154     WMI_SET_BITS(flags2, 19, 1, value)
5155 
5156 #define WMI_RSRC_CFG_FLAGS2_EPM_GET(flags2) \
5157     WMI_GET_BITS(flags2, 20, 1)
5158 #define WMI_RSRC_CFG_FLAGS2_EPM_SET(flags2, value) \
5159     WMI_SET_BITS(flags2, 20, 1, value)
5160 
5161 #define WMI_RSRC_CFG_FLAGS2_IS_MGMT_SRNG_ENABLED_GET(flags2) \
5162     WMI_GET_BITS(flags2, 21, 1)
5163 #define WMI_RSRC_CFG_FLAGS2_IS_MGMT_SRNG_ENABLED_SET(flags2, value) \
5164     WMI_SET_BITS(flags2, 21, 1, value)
5165 
5166 #define WMI_RSRC_CFG_FLAGS2_ENABLE_WDS_NULL_FRAME_SUPPORT_GET(flags2) \
5167     WMI_GET_BITS(flags2, 22, 1)
5168 #define WMI_RSRC_CFG_FLAGS2_ENABLE_WDS_NULL_FRAME_SUPPORT_SET(flags2, value) \
5169     WMI_SET_BITS(flags2, 22, 1, value)
5170 
5171 
5172 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_IFACE_SUPPORT_GET(host_service_flags) \
5173     WMI_GET_BITS(host_service_flags, 0, 1)
5174 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_IFACE_SUPPORT_SET(host_service_flags, val) \
5175     WMI_SET_BITS(host_service_flags, 0, 1, val)
5176 
5177 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_HOST_SUPPORT_MULTI_RADIO_EVTS_PER_RADIO_GET(host_service_flags) \
5178     WMI_GET_BITS(host_service_flags, 1, 1)
5179 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_HOST_SUPPORT_MULTI_RADIO_EVTS_PER_RADIO_SET(host_service_flags, val) \
5180     WMI_SET_BITS(host_service_flags, 1, 1, val)
5181 
5182 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SPLIT_AST_FEATURE_HOST_SUPPORT_GET(host_service_flags) \
5183     WMI_GET_BITS(host_service_flags, 2, 1)
5184 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SPLIT_AST_FEATURE_HOST_SUPPORT_SET(host_service_flags, val) \
5185     WMI_SET_BITS(host_service_flags, 2, 1, val)
5186 
5187 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SAE_EAPOL_OFFLOAD_SUPPORT_GET(host_service_flags) \
5188     WMI_GET_BITS(host_service_flags, 3, 1)
5189 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SAE_EAPOL_OFFLOAD_SUPPORT_SET(host_service_flags, val) \
5190     WMI_SET_BITS(host_service_flags, 3, 1, val)
5191 
5192 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_CC_EXT_SUPPORT_GET(host_service_flags) \
5193     WMI_GET_BITS(host_service_flags, 4, 1)
5194 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_CC_EXT_SUPPORT_SET(host_service_flags, val) \
5195     WMI_SET_BITS(host_service_flags, 4, 1, val)
5196 
5197 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_CHANNEL_SUPPORT_GET(host_service_flags) \
5198     WMI_GET_BITS(host_service_flags, 5, 1)
5199 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_CHANNEL_SUPPORT_SET(host_service_flags, val) \
5200     WMI_SET_BITS(host_service_flags, 5, 1, val)
5201 
5202 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_STA_TWT_SYNC_EVT_SUPPORT_GET(host_service_flags) \
5203     WMI_GET_BITS(host_service_flags, 6, 1)
5204 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_STA_TWT_SYNC_EVT_SUPPORT_SET(host_service_flags, val) \
5205     WMI_SET_BITS(host_service_flags, 6, 1, val)
5206 
5207 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_LPI_SP_MODE_SUPPORT_GET(host_service_flags) \
5208     WMI_GET_BITS(host_service_flags, 7, 1)
5209 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_LPI_SP_MODE_SUPPORT_SET(host_service_flags, val) \
5210     WMI_SET_BITS(host_service_flags, 7, 1, val)
5211 
5212 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_TIMER_CHECK_GET(host_service_flags) \
5213     WMI_GET_BITS(host_service_flags, 8, 1)
5214 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_TIMER_CHECK_SET(host_service_flags, val) \
5215     WMI_SET_BITS(host_service_flags, 8, 1, val)
5216 
5217 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_REQ_ID_CHECK_GET(host_service_flags) \
5218     WMI_GET_BITS(host_service_flags, 9, 1)
5219 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_REQ_ID_CHECK_SET(host_service_flags, val) \
5220     WMI_SET_BITS(host_service_flags, 9, 1, val)
5221 
5222 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_INDOOR_SUPPORT_CHECK_GET(host_service_flags) \
5223     WMI_GET_BITS(host_service_flags, 10, 1)
5224 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_INDOOR_SUPPORT_CHECK_SET(host_service_flags, val) \
5225     WMI_SET_BITS(host_service_flags, 10, 1, val)
5226 
5227 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_OUTDOOR_SUPPORT_CHECK_GET(host_service_flags) \
5228     WMI_GET_BITS(host_service_flags, 11, 1)
5229 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_AFC_OUTDOOR_SUPPORT_CHECK_SET(host_service_flags, val) \
5230     WMI_SET_BITS(host_service_flags, 11, 1, val)
5231 
5232 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REO_QREF_FEATURE_SUPPORT_GET(host_service_flags) \
5233     WMI_GET_BITS(host_service_flags, 12, 1)
5234 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_REO_QREF_FEATURE_SUPPORT_SET(host_service_flags, val) \
5235     WMI_SET_BITS(host_service_flags, 12, 1, val)
5236 
5237 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_BANG_RADAR_320M_SUPPORT_GET(host_service_flags) \
5238     WMI_GET_BITS(host_service_flags, 13, 1)
5239 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_BANG_RADAR_320M_SUPPORT_SET(host_service_flags, val) \
5240     WMI_SET_BITS(host_service_flags, 13, 1, val)
5241 
5242 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_RADAR_FLAGS_FULL_BW_NOL_GET(host_service_flags) \
5243     WMI_GET_BITS(host_service_flags, 14, 1)
5244 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_RADAR_FLAGS_FULL_BW_NOL_SET(host_service_flags, val) \
5245     WMI_SET_BITS(host_service_flags, 14, 1, val)
5246 
5247 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_GET(host_service_flags) \
5248     WMI_GET_BITS(host_service_flags, 15, 1)
5249 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_SET(host_service_flags, val) \
5250     WMI_SET_BITS(host_service_flags, 15, 1, val)
5251 /*
5252  * Temporarily retain deprecated old "QMS_DLKM" macro names as aliases
5253  * for the new "SMEM_MAILBOX" macro names.
5254  */
5255 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_QMS_DLKM_SUPPORT_GET(host_service_flags) /* DEPRECATED */ \
5256     WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_GET(host_service_flags)
5257 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_QMS_DLKM_SUPPORT_SET(host_service_flags, val) /* DEPRECATED */ \
5258     WMI_RSRC_CFG_HOST_SERVICE_FLAG_SMEM_MAILBOX_SUPPORT_SET(host_service_flags, val)
5259 
5260 /* ML FULL monitor mode */
5261 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_ML_FULL_MONITOR_MODE_SUPPORT_GET(host_service_flags) \
5262         WMI_GET_BITS(host_service_flags, 16, 1)
5263 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_ML_FULL_MONITOR_MODE_SUPPORT_SET(host_service_flags, val) \
5264         WMI_SET_BITS(host_service_flags, 16, 1, val)
5265 
5266 /* This bit is used to inform FW to provide refill buffers in Qdata feature */
5267 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_OPT_DP_CTRL_REPLENISH_REFILL_RX_BUFFER_SUPPORT_GET(host_service_flags) \
5268         WMI_GET_BITS(host_service_flags, 17, 1)
5269 #define WMI_RSRC_CFG_HOST_SERVICE_FLAG_OPT_DP_CTRL_REPLENISH_REFILL_RX_BUFFER_SUPPORT_SET(host_service_flags, val) \
5270         WMI_SET_BITS(host_service_flags, 17, 1, val)
5271 
5272 #define WMI_RSRC_CFG_CARRIER_CFG_CHARTER_ENABLE_GET(carrier_config) \
5273     WMI_GET_BITS(carrier_config, 0, 1)
5274 #define WMI_RSRC_CFG_CARRIER_CFG_CHARTER_ENABLE_SET(carrier_config, val) \
5275     WMI_SET_BITS(carrier_config, 0, 1, val)
5276 
5277 /** Top nibble can be used to diff between HE and EHT: 0xVXXXXXXX
5278  *  If V == 0b0000: format is HE.
5279  *  If V == 0b0001: format is EHT.
5280  */
5281 #define WMI_RSRC_CFG_IS_EHT_GET(param_value) \
5282     WMI_GET_BITS(param_value, 28, 4)
5283 #define WMI_RSRC_CFG_IS_EHT_SET(param_value, val) \
5284     WMI_SET_BITS(param_value, 28, 4, val)
5285 
5286 /* Used along with the above macro to set the value. */
5287 #define WMI_RSRC_CFG_PARAM_VALUE_GET(param_value) \
5288     WMI_GET_BITS(param_value, 0, 28)
5289 #define WMI_RSRC_CFG_PARAM_VALUE_SET(param_value, val) \
5290     WMI_SET_BITS(param_value, 0, 28, val)
5291 
5292 typedef struct {
5293     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
5294 
5295     /** The following indicate the WMI versions to be supported by
5296      *  the host driver. Note that the host driver decide to
5297      *  "downgrade" its WMI version support and this may not be the
5298      *  native version of the host driver. */
5299     wmi_abi_version host_abi_vers;
5300 
5301     A_UINT32 num_host_mem_chunks; /** size of array host_mem_chunks[] */
5302 /* This init_cmd_fixed_param TLV is followed by the below TLVs:
5303  *     wmi_resource_config   resource_config;
5304  *     wlan_host_memory_chunk host_mem_chunks[];
5305  *     wmi_pdev_set_hw_mode_cmd_fixed_param hw_mode_config;
5306  *         Note that the hw_mode_config, in spite of its "pdev" name,
5307  *         applies to the entire target rather than for a single pdev
5308  *         within the target.
5309  *         To avoid specifying a HW mode for the target, the host should
5310  *         fill hw_mode_config's fields with 0x0.
5311  *     wmi_pdev_band_to_mac                 band_to_mac[];
5312  *     wmi_htt_msdu_idx_to_htt_msdu_qtype   htt_msdu_idx_to_qtype_map[];
5313  */
5314 } wmi_init_cmd_fixed_param;
5315 
5316 typedef enum {
5317     WMI_WIFI_STANDARD_4     = 0,
5318     WMI_WIFI_STANDARD_5     = 1,
5319     WMI_WIFI_STANDARD_6     = 2,
5320     WMI_WIFI_STANDARD_6E    = 3,
5321     WMI_WIFI_STANDARD_7     = 4,
5322 } WMI_WIFI_STANDARD;
5323 
5324 typedef enum {
5325     WMI_HOST_NONE       = 0, /* No concurrency mode supported */
5326     WMI_HOST_DBS        = 1, /* When 2.4G + 5G & 2.4G + 6G if 6G is supported */
5327     WMI_HOST_DBS_SBS    = 2, /* When 2.4G + 5G, 2.4G + 6G, 5G + 6G & 5G + 5G is supported */
5328 } WMI_BAND_CONCURRENCY;
5329 
5330 typedef enum {
5331     WMI_SISO        = 1, /* When 1x1 is supported */
5332     WMI_MIMO_2X2    = 2, /* When 2x2 MIMO is supported */
5333 } WMI_NUM_ANTENNAS;
5334 
5335 typedef enum {
5336     WMI_VENDOR1_REQ1_VERSION_3_00   = 0,
5337     WMI_VENDOR1_REQ1_VERSION_3_01   = 1,
5338     WMI_VENDOR1_REQ1_VERSION_3_20   = 2,
5339     WMI_VENDOR1_REQ1_VERSION_3_30   = 3,
5340     WMI_VENDOR1_REQ1_VERSION_3_40   = 4,
5341     WMI_VENDOR1_REQ1_VERSION_4_00   = 5,
5342     WMI_VENDOR1_REQ1_VERSION_4_10   = 6,
5343 } WMI_VENDOR1_REQ1_VERSION;
5344 
5345 typedef enum {
5346     WMI_VENDOR1_REQ2_VERSION_3_00   = 0,
5347     WMI_VENDOR1_REQ2_VERSION_3_01   = 1,
5348     WMI_VENDOR1_REQ2_VERSION_3_20   = 2,
5349     WMI_VENDOR1_REQ2_VERSION_3_50   = 3,
5350 } WMI_VENDOR1_REQ2_VERSION;
5351 
5352 typedef enum {
5353     WMI_HOST_BAND_CAP_2GHZ = 0x01,
5354     WMI_HOST_BAND_CAP_5GHZ = 0x02,
5355     WMI_HOST_BAND_CAP_6GHZ = 0x04,
5356 } WMI_HOST_BAND_CAP;
5357 
5358 /* HW features supported info */
5359 /* enum WMI_WIFI_STANDARD are possible values for WiFi standard bitfield */
5360 #define WMI_GET_WIFI_STANDARD(var, feature_bitmap)              \
5361         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 0, 4)
5362 #define WMI_SET_WIFI_STANDARD(feature_bitmap, val)              \
5363         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 0, 4, val)
5364 /* enum WMI_BAND_CONCURRENCY are possible values for band concurrency support bitfield */
5365 #define WMI_GET_BAND_CONCURRENCY_SUPPORT(var, feature_bitmap)   \
5366         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 4, 3)
5367 #define WMI_SET_BAND_CONCURRENCY_SUPPORT(feature_bitmap, val)   \
5368         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 4, 3, val)
5369 
5370 /* PNO feature supported info */
5371 #define WMI_GET_PNO_SCAN_IN_UNASSOC_STATE(var, feature_bitmap)          \
5372         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 7, 1)
5373 #define WMI_SET_PNO_SCAN_IN_UNASSOC_STATE(feature_bitmap, val)          \
5374         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 7, 1, val)
5375 #define WMI_GET_PNO_SCAN_IN_ASSOC_STATE(var, feature_bitmap)            \
5376         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 8, 1)
5377 #define WMI_SET_PNO_SCAN_IN_ASSOC_STATE(feature_bitmap, val)            \
5378         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 8, 1, val)
5379 
5380 /* TWT feature supported info */
5381 #define WMI_GET_TWT_FEATURE_SUPPORT(var, feature_bitmap)           \
5382         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 9, 1)
5383 #define WMI_SET_TWT_FEATURE_SUPPORT(feature_bitmap, val)           \
5384         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 9, 1, val)
5385 #define WMI_GET_TWT_REQUESTOR(var, feature_bitmap)                 \
5386         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 10, 1)
5387 #define WMI_SET_TWT_REQUESTER(feature_bitmap, val)                 \
5388         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 10, 1, val)
5389 #define WMI_GET_TWT_BROADCAST(var, feature_bitmap)                 \
5390         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 11, 1)
5391 #define WMI_SET_TWT_BROADCAST(feature_bitmap, val)                 \
5392         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 11, 1, val)
5393 #define WMI_GET_TWT_FLEXIBLE(var, feature_bitmap)                  \
5394         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 12, 1)
5395 #define WMI_SET_TWT_FLEXIBLE(feature_bitmap, val)                  \
5396         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 12, 1, val)
5397 
5398 /* WIFI optimizer feature supported info */
5399 #define WMI_GET_WIFI_OPT_FEATURE_SUPPORT(var, feature_bitmap)                   \
5400         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 13, 1)
5401 #define WMI_SET_WIFI_OPT_FEATURE_SUPPORT(feature_bitmap, val)         \
5402         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 13, 1, val)
5403 
5404 /* RFC8325 feature supported info */
5405 #define WMI_GET_RFC8325_FEATURE_SUPPORT(var, feature_bitmap)                \
5406         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 14, 1)
5407 #define WMI_SET_RFC8325_FEATURE_SUPPORT(feature_bitmap, val)                \
5408         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 14, 1, val)
5409 
5410 /* MHS feature supported info */
5411 #define WMI_GET_MHS_5G_SUPPORT(var, feature_bitmap)                     \
5412         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 15, 1)
5413 #define WMI_SET_MHS_5G_SUPPORT(feature_bitmap, val)                     \
5414         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 15, 1, val)
5415 #define WMI_GET_MHS_6G_SUPPORT(var, feature_bitmap)                     \
5416         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 16, 1)
5417 #define WMI_SET_MHS_6G_SUPPORT(feature_bitmap, val)                     \
5418         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 16, 1, val)
5419 #define WMI_GET_MHS_MAX_CLIENTS_SUPPORT(var, feature_bitmap)            \
5420         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 17, 8)
5421 #define WMI_SET_MHS_MAX_CLIENTS_SUPPORT(feature_bitmap, val)            \
5422         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 17, 8, val)
5423 #define WMI_GET_MHS_SET_COUNTRY_CODE_HAL_SUPPORT(var, feature_bitmap)   \
5424         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 25, 1)
5425 #define WMI_SET_MHS_SET_COUNTRY_CODE_HAL_SUPPORT(feature_bitmap, val)   \
5426         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 25, 1, val)
5427 #define WMI_GET_MHS_GETVALID_CHANNELS_SUPPORT(var, feature_bitmap)      \
5428         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 26, 1)
5429 #define WMI_SET_MHS_GETVALID_CHANNELS_SUPPORT(feature_bitmap, val)      \
5430         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 26, 1, val)
5431 /* enum WMI_WIFI_STANDARD are possible values for MHS DOT11 mode support bitfield */
5432 #define WMI_GET_MHS_DOT11_MODE_SUPPORT(var, feature_bitmap)             \
5433         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 27, 4)
5434 #define WMI_SET_MHS_DOT11_MODE_SUPPORT(feature_bitmap, val)             \
5435         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 27, 4, val)
5436 #define WMI_GET_MHS_WPA3_SUPPORT(var, feature_bitmap)                   \
5437         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 31, 1)
5438 #define WMI_SET_MHS_WPA3_SUPPORT(feature_bitmap, val)                   \
5439         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 31, 1, val)
5440 
5441 /* Vendor requirement1 supported version info */
5442 /* enum's WMI_VENDORxx_REQxx_VERSION are the possible vaues for below bitfield*/
5443 #define WMI_GET_VENDOR_REQ_1_VERSION(var, feature_bitmap)          \
5444         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 32, 8)
5445 #define WMI_SET_VENDOR_REQ_1_VERSION(feature_bitmap, val)          \
5446         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 32, 8, val)
5447 
5448 /* Roaming feature supported info */
5449 #define WMI_GET_ROAMING_HIGH_CU_ROAM_TRIGGER(var, feature_bitmap)          \
5450         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 40, 1)
5451 #define WMI_SET_ROAMING_HIGH_CU_ROAM_TRIGGER(feature_bitmap, val)          \
5452         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 40, 1, val)
5453 #define WMI_GET_ROAMING_EMERGENCY_TRIGGER(var, feature_bitmap)             \
5454         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 41, 1)
5455 #define WMI_SET_ROAMING_EMERGENCY_TRIGGER(feature_bitmap, val)             \
5456         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 41, 1, val)
5457 #define WMI_GET_ROAMING_BTM_TRIGGER(var, feature_bitmap)                   \
5458         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 42, 1)
5459 #define WMI_SET_ROAMING_BTM_TRIGGER(feature_bitmap, val)                   \
5460         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 42, 1, val)
5461 #define WMI_GET_ROAMING_IDLE_TRIGGER(var, feature_bitmap)                  \
5462         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 43, 1)
5463 #define WMI_SET_ROAMING_IDLE_TRIGGER(feature_bitmap, val)                  \
5464         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 43, 1, val)
5465 #define WMI_GET_ROAMING_WTC_TRIGGER(var, feature_bitmap)                   \
5466         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 44, 1)
5467 #define WMI_SET_ROAMING_WTC_TRIGGER(feature_bitmap, val)                   \
5468         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 44, 1, val)
5469 #define WMI_GET_ROAMING_BTCOEX_TRIGGER(var, feature_bitmap)                \
5470         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 45, 1)
5471 #define WMI_SET_ROAMING_BTCOEX_TRIGGER(feature_bitmap, val)                \
5472         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 45, 1, val)
5473 #define WMI_GET_ROAMING_BTW_WPA_WPA2(var, feature_bitmap)                  \
5474         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 46, 1)
5475 #define WMI_SET_ROAMING_BTW_WPA_WPA2(feature_bitmap, val)                  \
5476         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 46, 1, val)
5477 #define WMI_GET_ROAMING_MANAGE_CHAN_LIST_API(var, feature_bitmap)          \
5478         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 47, 1)
5479 #define WMI_SET_ROAMING_MANAGE_CHAN_LIST_API(feature_bitmap, val)          \
5480         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 47, 1, val)
5481 #define WMI_GET_ROAMING_ADAPTIVE_11R(var, feature_bitmap)                  \
5482         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 48, 1)
5483 #define WMI_SET_ROAMING_ADAPTIVE_11R(feature_bitmap, val)                  \
5484         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 48, 1, val)
5485 #define WMI_GET_ROAMING_CTRL_API_GET_SET(var, feature_bitmap)              \
5486         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 49, 1)
5487 #define WMI_SET_ROAMING_CTRL_API_GET_SET(feature_bitmap, val)              \
5488         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 49, 1, val)
5489 #define WMI_GET_ROAMING_CTRL_API_REASSOC(var, feature_bitmap)              \
5490         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 50, 1)
5491 #define WMI_SET_ROAMING_CTRL_API_REASSOC(feature_bitmap, val)              \
5492         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 50, 1, val)
5493 #define WMI_GET_ROAMING_CTRL_GET_CU(var, feature_bitmap)                   \
5494         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 51, 1)
5495 #define WMI_SET_ROAMING_CTRL_GET_CU(feature_bitmap, val)                   \
5496         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 51, 1, val)
5497 
5498 /* Vendor requirement2 supported version info */
5499 /* enum's WMI_VENDORxx_REQxx_VERSION are the possible vaues for below bitfield*/
5500 #define WMI_GET_VENDOR_REQ_2_VERSION(var, feature_bitmap)          \
5501         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 52, 8)
5502 #define WMI_SET_VENDOR_REQ_2_VERSION(feature_bitmap, val)          \
5503         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 52, 8, val)
5504 
5505 #define WMI_GET_ASSURANCE_DISCONNECT_REASON_API(var, feature_bitmap)       \
5506         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 60, 1)
5507 #define WMI_SET_ASSURANCE_DISCONNECT_REASON_API(feature_bitmap, val)       \
5508         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 60, 1, val)
5509 
5510 /* Frame pcap logging */
5511 #define WMI_GET_FRAME_PCAP_LOG_MGMT(var, feature_bitmap)          \
5512         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 61, 1)
5513 #define WMI_SET_FRAME_PCAP_LOG_MGMT(feature_bitmap, val)          \
5514         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 61, 1, val)
5515 #define WMI_GET_FRAME_PCAP_LOG_CTRL(var, feature_bitmap)          \
5516         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 62, 1)
5517 #define WMI_SET_FRAME_PCAP_LOG_CTRL(feature_bitmap, val)          \
5518         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 62, 1, val)
5519 #define WMI_GET_FRAME_PCAP_LOG_DATA(var, feature_bitmap)          \
5520         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 63, 1)
5521 #define WMI_SET_FRAME_PCAP_LOG_DATA(feature_bitmap, val)          \
5522         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 63, 1, val)
5523 
5524 /* Security features supported info */
5525 #define WMI_GET_SECURITY_WPA3_SAE_H2E(var, feature_bitmap)                \
5526         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 64, 1)
5527 #define WMI_SET_SECURITY_WPA3_SAE_H2E(feature_bitmap, val)                \
5528         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 64, 1, val)
5529 #define WMI_GET_SECURITY_WPA3_SAE_FT(var, feature_bitmap)                 \
5530         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 65, 1)
5531 #define WMI_SET_SECURITY_WPA3_SAE_FT(feature_bitmap, val)                 \
5532         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 65, 1, val)
5533 #define WMI_GET_SECURITY_WPA3_ENTERP_SUITEB(var, feature_bitmap)          \
5534         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 66, 1)
5535 #define WMI_SET_SECURITY_WPA3_ENTERP_SUITEB(feature_bitmap, val)          \
5536         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 66, 1, val)
5537 #define WMI_GET_SECURITY_WPA3_ENTERP_SUITEB_192bit(var, feature_bitmap)   \
5538         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 67, 1)
5539 #define WMI_SET_SECURITY_WPA3_ENTERP_SUITEB_192bit(feature_bitmap, val)   \
5540         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 67, 1, val)
5541 #define WMI_GET_SECURITY_FILS_SHA256(var, feature_bitmap)                 \
5542         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 68, 1)
5543 #define WMI_SET_SECURITY_FILS_SHA256(feature_bitmap, val)                 \
5544         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 68, 1, val)
5545 #define WMI_GET_SECURITY_FILS_SHA384(var, feature_bitmap)                 \
5546         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 69, 1)
5547 #define WMI_SET_SECURITY_FILS_SHA384(feature_bitmap, val)                 \
5548         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 69, 1, val)
5549 #define WMI_GET_SECURITY_FILS_SHA256_FT(var, feature_bitmap)              \
5550         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 70, 1)
5551 #define WMI_SET_SECURITY_FILS_SHA256_FT(feature_bitmap, val)              \
5552         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 70, 1, val)
5553 #define WMI_GET_SECURITY_FILS_SHA384_FT(var, feature_bitmap)              \
5554         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 71, 1)
5555 #define WMI_SET_SECURITY_FILS_SHA384_FT(feature_bitmap, val)              \
5556         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 71, 1, val)
5557 #define WMI_GET_SECURITY_ENCHANCED_OPEN(var, feature_bitmap)              \
5558         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 72, 1)
5559 #define WMI_SET_SECURITY_ENCHANCED_OPEN(feature_bitmap, val)              \
5560         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 72, 1, val)
5561 
5562 /* Peer protocol features supported info */
5563 #define WMI_GET_NAN_SUPPORT(var, feature_bitmap)            \
5564         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 73, 1)
5565 #define WMI_SET_NAN_SUPPORT(feature_bitmap, val)            \
5566         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 73, 1, val)
5567 #define WMI_GET_TDLS_SUPPORT(var, feature_bitmap)           \
5568         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 74, 1)
5569 #define WMI_SET_TDLS_SUPPORT(feature_bitmap, val)           \
5570         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 74, 1, val)
5571 #define WMI_GET_P2P6E_SUPPORT(var, feature_bitmap)          \
5572         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 75, 1)
5573 #define WMI_SET_P2P6E_SUPPORT(feature_bitmap, val)          \
5574         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 75, 1, val)
5575 #define WMI_GET_TDLS_OFFCHAN_SUPPORT(var, feature_bitmap)   \
5576         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 76, 1)
5577 #define WMI_SET_TDLS_OFFCHAN_SUPPORT(feature_bitmap, val)   \
5578         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 76, 1, val)
5579 #define WMI_GET_TDLS_CAP_ENHANCE(var, feature_bitmap)       \
5580         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 77, 1)
5581 #define WMI_SET_TDLS_CAP_ENHANCE(feature_bitmap, val)       \
5582         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 77, 1, val)
5583 #define WMI_GET_MAX_TDLS_PEERS_SUPPORT(var, feature_bitmap) \
5584         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 78, 4)
5585 #define WMI_SET_MAX_TDLS_PEERS_SUPPORT(feature_bitmap, val) \
5586         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 78, 4, val)
5587 #define WMI_GET_STA_DUAL_P2P_SUPPORT(var, feature_bitmap)   \
5588         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 82, 1)
5589 #define WMI_SET_STA_DUAL_P2P_SUPPORT(feature_bitmap, val)   \
5590         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 82, 1, val)
5591 
5592 /* Big data feature supported info */
5593 #define WMI_GET_PEER_BIGDATA_GETBSSINFO_API_SUPPORT(var, feature_bitmap)            \
5594         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 83, 1)
5595 #define WMI_SET_PEER_BIGDATA_GETBSSINFO_API_SUPPORT(feature_bitmap, val)            \
5596         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 83, 1, val)
5597 #define WMI_GET_PEER_BIGDATA_GETASSOCREJECTINFO_API_SUPPORT(var, feature_bitmap)    \
5598         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 84, 1)
5599 #define WMI_SET_PEER_BIGDATA_GETASSOCREJECTINFO_API_SUPPORT(feature_bitmap, val)    \
5600         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 84, 1, val)
5601 #define WMI_GET_PEER_BIGDATA_GETSTAINFO_API_SUPPORT(var, feature_bitmap)            \
5602         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 85, 1)
5603 #define WMI_SET_PEER_BIGDATA_GETSTAINFO_API_SUPPORT(feature_bitmap, val)            \
5604         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 85, 1, val)
5605 
5606 /* Feature set requirement supported version info */
5607 #define WMI_GET_FEATURE_SET_VERSION(var, feature_bitmap)                 \
5608         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 86, 16)
5609 #define WMI_SET_FEATURE_SET_VERSION(feature_bitmap, val)                 \
5610         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 86, 16, val)
5611 
5612 /*
5613  * enum WMI_NUM_ANTENNAS are possible values for number of antennas supported bitfield.
5614  * Bitfield value 0 means invalid, 1 means SISO, 2 means MIMO, and values 3+ are reserved.
5615  */
5616 #define WMI_GET_NUM_ANTENNAS(var, feature_bitmap)   \
5617         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 102, 4)
5618 #define WMI_SET_NUM_ANTENNAS(feature_bitmap, val)   \
5619         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 102, 4, val)
5620 
5621 /* enum WMI_HOST_BAND_CAP are possible values for below bitfield */
5622 #define WMI_GET_HOST_BAND_CAP(var, feature_bitmap)   \
5623         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 106, 6)
5624 #define WMI_SET_HOST_BAND_CAP(feature_bitmap, val)   \
5625         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 106, 6, val)
5626 
5627 #define WMI_GET_STA_DUMP_SUPPORT(var, feature_bitmap)   \
5628         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 112, 1)
5629 #define WMI_SET_STA_DUMP_SUPPORT(feature_bitmap, val)   \
5630         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 112, 1, val)
5631 
5632 /* Peer protocol features supported info (contd) */
5633 #define WMI_GET_STA_P2P_SUPPORT(var, feature_bitmap)   \
5634         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 113, 1)
5635 #define WMI_SET_STA_P2P_SUPPORT(feature_bitmap, val)   \
5636         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 113, 1, val)
5637 #define WMI_GET_STA_SAP_SUPPORT(var, feature_bitmap)   \
5638         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 114, 1)
5639 #define WMI_SET_STA_SAP_SUPPORT(feature_bitmap, val)   \
5640         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 114, 1, val)
5641 #define WMI_GET_STA_NAN_SUPPORT(var, feature_bitmap)   \
5642         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 115, 1)
5643 #define WMI_SET_STA_NAN_SUPPORT(feature_bitmap, val)   \
5644         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 115, 1, val)
5645 #define WMI_GET_STA_TDLS_SUPPORT(var, feature_bitmap)   \
5646         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 116, 1)
5647 #define WMI_SET_STA_TDLS_SUPPORT(feature_bitmap, val)   \
5648         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 116, 1, val)
5649 /* Reserving 16 bits for accomodating other 2 port concurrencies later */
5650 
5651 #define WMI_GET_STA_SAP_P2P_SUPPORT(var, feature_bitmap)   \
5652         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 133, 1)
5653 #define WMI_SET_STA_SAP_P2P_SUPPORT(feature_bitmap, val)   \
5654         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 133, 1, val)
5655 #define WMI_GET_STA_SAP_NAN_SUPPORT(var, feature_bitmap)   \
5656         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 134, 1)
5657 #define WMI_SET_STA_SAP_NAN_SUPPORT(feature_bitmap, val)   \
5658         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 134, 1, val)
5659 #define WMI_GET_STA_P2P_NAN_SUPPORT(var, feature_bitmap)   \
5660         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 135, 1)
5661 #define WMI_SET_STA_P2P_NAN_SUPPORT(feature_bitmap, val)   \
5662         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 135, 1, val)
5663 #define WMI_GET_STA_P2P_TDLS_SUPPORT(var, feature_bitmap)   \
5664         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 136, 1)
5665 #define WMI_SET_STA_P2P_TDLS_SUPPORT(feature_bitmap, val)   \
5666         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 136, 1, val)
5667 #define WMI_GET_STA_SAP_TDLS_SUPPORT(var, feature_bitmap)   \
5668         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 137, 1)
5669 #define WMI_SET_STA_SAP_TDLS_SUPPORT(feature_bitmap, val)   \
5670         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 137, 1, val)
5671 #define WMI_GET_STA_NAN_TDLS_SUPPORT(var, feature_bitmap)   \
5672         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 138, 1)
5673 #define WMI_SET_STA_NAN_TDLS_SUPPORT(feature_bitmap, val)   \
5674         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 138, 1, val)
5675 /* Reserving 16 bits for accomodating other 3 port concurrencies later */
5676 
5677 #define WMI_GET_STA_SAP_P2P_TDLS_SUPPORT(var, feature_bitmap)   \
5678         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 155, 1)
5679 #define WMI_SET_STA_SAP_P2P_TDLS_SUPPORT(feature_bitmap, val)   \
5680         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 155, 1, val)
5681 #define WMI_GET_STA_SAP_NAN_TDLS_SUPPORT(var, feature_bitmap)   \
5682         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 156, 1)
5683 #define WMI_SET_STA_SAP_NAN_TDLS_SUPPORT(feature_bitmap, val)   \
5684         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 156, 1, val)
5685 #define WMI_GET_STA_P2P_P2P_TDLS_SUPPORT(var, feature_bitmap)   \
5686         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 157, 1)
5687 #define WMI_SET_STA_P2P_P2P_TDLS_SUPPORT(feature_bitmap, val)   \
5688         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 157, 1, val)
5689 #define WMI_GET_STA_P2P_NAN_TDLS_SUPPORT(var, feature_bitmap)   \
5690         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 158, 1)
5691 #define WMI_SET_STA_P2P_NAN_TDLS_SUPPORT(feature_bitmap, val)   \
5692         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 158, 1, val)
5693 /* NAN EHT supported info */
5694 #define WMI_GET_NAN_EHT_SUPPORT(var, feature_bitmap) \
5695         WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 159, 1)
5696 #define WMI_SET_NAN_EHT_SUPPORT(feature_bitmap, val) \
5697         WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 159, 1, val)
5698 
5699 /*
5700  * Specify how many A_UINT32 words are needed to hold the feature bitmap flags.
5701  * This value may change over time.
5702  * It is not directly used in any WMI message definition.
5703  * It is provided simply as a convenience for the feature_set_bitmap sender to
5704  * know how many 32-bit words to allocate for the bitmap.
5705  */
5706 #define WMI_FEATURE_SET_BITMAP_ARRAY_LEN32 6
5707 
5708 /**
5709  * TLV for channel list
5710  */
5711 typedef struct {
5712     /** WMI_CHAN_LIST_TAG */
5713     A_UINT32 tag;
5714     /** # of channels to scan */
5715     A_UINT32 num_chan;
5716     /** channels in Mhz */
5717     WMI_VAR_LEN_ARRAY1(A_UINT32, channel_list);
5718 } wmi_chan_list;
5719 
5720 /**
5721  * TLV for bssid list
5722  */
5723 typedef struct {
5724     /** WMI_BSSID_LIST_TAG */
5725     A_UINT32 tag;
5726     /** number of bssids   */
5727     A_UINT32 num_bssid;
5728     /** bssid list         */
5729     WMI_VAR_LEN_ARRAY1(wmi_mac_addr, bssid_list);
5730 } wmi_bssid_list;
5731 
5732 /**
5733  * TLV for  ie data.
5734  */
5735 typedef struct {
5736     /** WMI_IE_TAG */
5737     A_UINT32 tag;
5738     /** number of bytes in ie data   */
5739     A_UINT32 ie_len;
5740     /** ie data array  (ie_len adjusted to  number of words  (ie_len + 4)/4)  */
5741     WMI_VAR_LEN_ARRAY1(A_UINT32, ie_data);
5742 } wmi_ie_data;
5743 
5744 /**
5745  * TLV used for length/buffer
5746  */
5747 typedef struct {
5748     A_UINT32 tlv_header;    /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_buf_len_param */
5749     A_UINT32 buf_len;       /** Length of buf */
5750     /**
5751      * Following this structure is the TLV byte stream of buf of length buf_len:
5752      * A_UINT8 buf[];
5753      *
5754      */
5755 } wmi_tlv_buf_len_param;
5756 
5757 /**
5758  * TLV used for specifying the dimensions of a multi-dimensional array
5759  * that has been stored in a flat buffer
5760  */
5761 typedef struct {
5762     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_arrays_len_param */
5763     /**
5764      * d1_len, d2_len, d3_len, and d4_len are the lengths of each dimension
5765      * for a multi-dimensional array.
5766      * If the length of outer dimension is not 1, the inner dimension
5767      * shouldn't be 1.
5768      * If the multi-dimensional array has less than 4 dimensions, the outer
5769      * dimensions' lengths should be 1.  For example, a buf[3][4] array
5770      * would have d1_len = 4, d2_len = 3, d3_len = 1, d4_len = 1.
5771      * The outermost dimension of the array can be inferred from the array
5772      * length; thus, this struct supports up to 5-D arrays.  For a 5-D array,
5773      * the outermost (5th) dimension would be
5774      *     array length / (d1_len * d2_len * d3_len * d4_len)
5775      *
5776      * For security (to ensure no out-of-bounds memory access),
5777      * the receiver shall validate that the product of all dimensions
5778      * is equal to (or less than) the array length.
5779      */
5780     A_UINT32 d1_len;  /* the length of 1st (innermost) dimension array */
5781     A_UINT32 d2_len;  /* the length of 2nd dimension array */
5782     A_UINT32 d3_len;  /* the length of 3rd dimension array */
5783     A_UINT32 d4_len;  /* the length of 4th dimension array */
5784     /**
5785      * Following this structure is the TLV multi-dimension array buffer:
5786      * <type> buf[L1*L2*L3*L4];
5787      * where, L1, L2, L3, and L4 are the values of
5788      * d1_len, d2_len, d3_len and d4_len.
5789      * To access the 4-D element a[i][j][k][l], the buf[] array would be
5790      * indexed as buf[i*L3*L2*L1 + j*L2*L1 + k*L1 + l].
5791      */
5792 } wmi_tlv_arrays_len_param;
5793 
5794 typedef struct {
5795     /** Len of the SSID */
5796     A_UINT32 ssid_len;
5797     /** SSID */
5798     A_UINT32 ssid[8];
5799 } wmi_ssid;
5800 
5801 typedef struct {
5802     /** WMI_SSID_LIST_TAG */
5803     A_UINT32 tag;
5804     A_UINT32 num_ssids;
5805     WMI_VAR_LEN_ARRAY1(wmi_ssid, ssids);
5806 } wmi_ssid_list;
5807 
5808 typedef struct {
5809     /** WMI_SCAN_START_OFFSET_TAG */
5810     A_UINT32     tag;
5811     /** Number of start TSF offsets */
5812     A_UINT32     num_offset;
5813     /** Array of start TSF offsets provided in milliseconds */
5814     WMI_VAR_LEN_ARRAY1(A_UINT32, start_tsf_offset);
5815 } wmi_scan_start_offset;
5816 
5817 /**
5818  * WLAN_SCAN_CHAN_MODE Macros defined for A_UINT8 phymode_list[]
5819  */
5820 /** enum WLAN_PHY_MODE _mode starts from 0, but the WMI message requires
5821  * 0 to be used to represent unspecified / don't care / default values.
5822  * Therefore, WMI phy mode = WLAN phy mode + 1.
5823  */
5824 /** If the received WMI phy mode is 0 then it is ignored by the FW,
5825  * and the FW will use any mode as long as the frequency matches.
5826  */
5827 /** The number of phy_mode's (BW+mode) passed in the TLV phymode_list[] must
5828  * be equal to num_chan.  (Unless the host does not specify phymode_list values
5829  * at all, in which case the number of phymode_list elements will be zero.)
5830  * The indexing of the phymode_list[] array corresponds to same index of
5831  * the chan_list[] array.
5832  */
5833 #define WMI_SCAN_CHAN_SET_MODE(_c) ((_c) + 1)
5834 #define WMI_SCAN_CHAN_GET_MODE(_c) ((_c) - 1)
5835 #define WMI_SCAN_CHAN_MODE_IS_SET(_c) (_c)
5836 
5837 typedef struct {
5838     /*
5839      * freq unit: MHz (upper 16bits -- value)
5840      * flags (lower 16bits -- bitfield): valid for the freq short ssid
5841      *     The flags bitfield contains a bitmask of WMI_SCAN_HINT_FLAG_ values.
5842      */
5843     A_UINT32 freq_flags;
5844     /* per spec, only 4 bytes*/
5845     A_UINT32 short_ssid;
5846 } wmi_hint_freq_short_ssid;
5847 
5848 /** following bssid mac address same as wmi_mac_addr
5849  *  one example: freq -- 5980(0x175c), flags -- 0x1, mac -- 00:03:7f:12:34:56
5850  *  freq_flags     will be: 0x175c0001
5851  *  macaddr31to00 will be: 0x127f0300
5852  *  macaddr47to32 will be: 0x00005634
5853  */
5854 typedef struct {
5855     /*
5856      * freq unit: MHz (upper 16bits -- value)
5857      * flags (lower 16bits -- bitfield): valid for the freq bssid
5858      *     The flags bitfield contains a bitmask of WMI_SCAN_HINT_FLAG_ values.
5859      */
5860     A_UINT32 freq_flags;
5861     /* legacy bssid addr, use same macro to convert: WMI_MAC_ADDR_TO_CHAR_ARRAY, WMI_CHAR_ARRAY_TO_MAC_ADDR */
5862     wmi_mac_addr bssid;
5863 } wmi_hint_freq_bssid;
5864 
5865 /** macro to get freq and corresponding flags from wmi_hint_freq_short_ssid */
5866 #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)
5867 #define WMI_GET_FLAGS_FROM_HINT_FREQ_SHORT_SSID(pwmi_hint_freq_short_ssid_addr) (((pwmi_hint_freq_short_ssid_addr)->freq_flags) & 0xffff)
5868 
5869 /** macro to set freq and corresponding flags in wmi_hint_freq_short_ssid */
5870 #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))
5871 #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))
5872 
5873 /** macro to get freq and corresponding flags from wmi_hint_freq_bssid */
5874 #define WMI_GET_FREQ_FROM_HINT_FREQ_BSSID(pwmi_hint_freq_bssid_addr) ((((pwmi_hint_freq_bssid_addr)->freq_flags) >> 16) & 0xffff)
5875 #define WMI_GET_FLAGS_FROM_HINT_FREQ_BSSID(pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) & 0xffff)
5876 
5877 /** macro to set freq and corresponding flags in wmi_hint_freq_bssid */
5878 #define WMI_SET_FREQ_IN_HINT_FREQ_BSSID(freq, pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) |= ((freq) << 16))
5879 #define WMI_SET_FLAGS_IN_HINT_FREQ_BSSID(flags, pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) |= (flags))
5880 
5881 /** other macro for 6 GHZ, TU (time unit), 20TU normally it is 20ms */
5882 #define MAX_NUM_20TU_EACH_CH      6
5883 #define MAX_NUM_S_SSID_EACH_20TU  1
5884 #define MAX_NUM_BSSID_EACH_20TU   3
5885 
5886 /* prefix used by scan requestor ids on the host */
5887 #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
5888 /* prefix used by scan request ids generated on the host */
5889 /* host cycles through the lower 12 bits to generate ids */
5890 #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
5891 
5892 #define WLAN_SCAN_PARAMS_MAX_SSID    16
5893 #define WLAN_SCAN_PARAMS_MAX_BSSID   4
5894 #define WLAN_SCAN_PARAMS_MAX_IE_LEN  512
5895 
5896 /* NOTE: This constant cannot be changed without breaking WMI compatibility */
5897 #define WMI_IE_BITMAP_SIZE             8
5898 
5899 #define WMI_SCAN_MLD_PARAM_MLD_ID_GET(mld_param) WMI_GET_BITS(mld_param, 0, 8)
5900 #define WMI_SCAN_MLD_PARAM_MLD_ID_SET(mld_param, val) WMI_SET_BITS(mld_param, 0, 8, val)
5901 
5902 typedef struct {
5903     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
5904     /** Scan ID (lower 16 bits) MSB 4 bits is used to identify scan client based on enum WMI_SCAN_CLIENT_ID */
5905     A_UINT32 scan_id;
5906     /** Scan requestor ID (lower 16 bits) is used by scan client to classify the scan source, reason, ...etc */
5907     A_UINT32 scan_req_id;
5908     /** VDEV id(interface) that is requesting scan */
5909     A_UINT32 vdev_id;
5910     /** Scan Priority, input to scan scheduler */
5911     A_UINT32 scan_priority;
5912     /** Scan events subscription */
5913     A_UINT32 notify_scan_events;
5914     /** dwell time in msec on active channels */
5915     A_UINT32 dwell_time_active;
5916     /** dwell time in msec on passive channels */
5917     A_UINT32 dwell_time_passive;
5918     /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
5919     A_UINT32 min_rest_time;
5920     /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
5921     /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
5922      *  will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
5923      *  switch to off channel. if there is activity the scanner will let the radio on the bss channel
5924      *  until max_rest_time expires.at max_rest_time scanner will switch to off channel
5925      *  irrespective of activity. activity is determined by the idle_time parameter.
5926      */
5927     A_UINT32 max_rest_time;
5928     /** time before sending next set of probe requests.
5929      *   The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
5930      *   The number of probe requests specified depends on the ssid_list and bssid_list
5931      */
5932     A_UINT32 repeat_probe_time;
5933     /** time in msec between 2 consecutive probe requests with in a set. */
5934     A_UINT32 probe_spacing_time;
5935     /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity  */
5936     A_UINT32 idle_time;
5937     /** maximum time in msec allowed for scan  */
5938     A_UINT32 max_scan_time;
5939     /** delay in msec before sending first probe request after switching to a channel */
5940     A_UINT32 probe_delay;
5941     /** Scan control flags */
5942     A_UINT32 scan_ctrl_flags;
5943     /** Burst duration time in msec*/
5944     A_UINT32 burst_duration;
5945 
5946     /** # if channels to scan. In the TLV channel_list[] */
5947     A_UINT32 num_chan;
5948     /** number of bssids. In the TLV bssid_list[] */
5949     A_UINT32 num_bssid;
5950     /** number of ssid. In the TLV ssid_list[] */
5951     A_UINT32 num_ssids;
5952     /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
5953     A_UINT32 ie_len;
5954     /** Max number of probes to be sent */
5955     A_UINT32 n_probes;
5956     /** MAC Address to use in Probe Req as SA **/
5957     wmi_mac_addr mac_addr;
5958     /** Mask on which MAC has to be randomized **/
5959     wmi_mac_addr mac_mask;
5960     /**  ie bitmap to use in probe req **/
5961     A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
5962     /** Number of vendor OUIs. In the TLV vendor_oui[] **/
5963     A_UINT32 num_vendor_oui;
5964     /** Scan control flags extended **/
5965     A_UINT32 scan_ctrl_flags_ext;
5966     /** dwell time in msec on active 2G channels, if it's not zero */
5967     A_UINT32 dwell_time_active_2g;
5968     /**
5969      * dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked
5970      * as an active channel
5971      */
5972     A_UINT32 dwell_time_active_6ghz;
5973     /**
5974      * dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked
5975      * as a passive channel
5976      */
5977     A_UINT32 dwell_time_passive_6ghz;
5978     /**
5979      * Offset time is in milliseconds per channel.
5980      */
5981     A_UINT32 scan_start_offset;
5982     /**
5983      * minimum dwell time in msec for 6 GHz channel
5984      * We'll listen for this time on the channel; if no beacon /
5985      * probe response / FILS frame are received during this time
5986      * we'll move to next channel.
5987      */
5988     A_UINT32 min_dwell_time_6ghz;
5989     /**
5990      * dwell time in msec for 6 GHz channel of spectral scan channel list
5991      */
5992     A_UINT32 dwell_time_spectral_ch;
5993     /**
5994      * B0-B7: mld id to be inserted in ML probe request
5995      * B8-B31: reserved
5996      */
5997     A_UINT32 mld_parameter;
5998 
5999 /**
6000  * TLV (tag length value) parameters follow the scan_cmd
6001  * structure. The TLV's are:
6002  *     channel_list:
6003  *         If FW supports WMI_SERVICE_SCAN_CONFIG_PER_CHANNEL,
6004  *             then channel_list may fill the upper 12 bits with channel flags,
6005  *             while using only the lower 20 bits for channel frequency.
6006  *             Check WMI_SCAN_CHANNEL_FLAG macros for the channel flags
6007  *         If FW doesn't support WMI_SERVICE_SCAN_CONFIG_PER_CHANNEL,
6008  *             then channel_list only holds the frequency value
6009  *         Use WMI_SCAN_CHANNEL_FREQ_MASK & WMI_SCAN_CHANNEL_FLAGS_MASK
6010  *     A_UINT32 channel_list[num_chan]; // in MHz
6011  *     wmi_ssid ssid_list[num_ssids];
6012  *     wmi_mac_addr bssid_list[num_bssid];
6013  *     A_UINT8 ie_data[ie_len];
6014  *     wmi_vendor_oui vendor_oui[num_vendor_oui];
6015  *     A_UINT8 phymode_list[0 or num_chan]; // see WMI_SCAN_CHAN_MODE macros
6016  *     wmi_hint_freq_short_ssid hint_freq_short_ssid[num]; // the num can be calculated by TLV len
6017  *     wmi_hint_freq_bssid hint_freq_bssid[num]; // the num can be calculated by TLV len
6018  *     A_UINT32 spectral_chan_list[num]; // in MHz, the num can be calculated by TLV len
6019  *     *** NOTE:
6020  *     *** Use caution when using further TLVs, in case the additional
6021  *     *** TLVs cause the message size to exceed the of the buffer to
6022  *     *** hold the message.
6023  */
6024 } wmi_start_scan_cmd_fixed_param;
6025 
6026 /**
6027  * scan control flags.
6028  */
6029 
6030 /** passively scan all channels including active channels */
6031 #define WMI_SCAN_FLAG_PASSIVE        0x1
6032 /** add wild card ssid probe request even though ssid_list is specified. */
6033 #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
6034 /** add cck rates to rates/xrate ie for the generated probe request */
6035 #define WMI_SCAN_ADD_CCK_RATES       0x4
6036 /** add ofdm rates to rates/xrate ie for the generated probe request */
6037 #define WMI_SCAN_ADD_OFDM_RATES      0x8
6038 /** To enable indication of Chan load and Noise floor to host */
6039 #define WMI_SCAN_CHAN_STAT_EVENT     0x10
6040 /** Filter Probe request frames  */
6041 #define WMI_SCAN_FILTER_PROBE_REQ    0x20
6042 /**When set, not to scan DFS channels*/
6043 #define WMI_SCAN_BYPASS_DFS_CHN      0x40
6044 /**When set, certain errors are ignored and scan continues.
6045  * Different FW scan engine may use its own logic to decide what errors to ignore*/
6046 #define WMI_SCAN_CONTINUE_ON_ERROR   0x80
6047 /** Enable promiscuous mode for CCXv4 */
6048 #define WMI_SCAN_FILTER_PROMISCOUS   0x100
6049 /** allow to send probe req on DFS channel */
6050 #define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
6051 /** add TPC content in probe req frame */
6052 #define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ  0x400
6053 /** add DS content in probe req frame */
6054 #define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ   0x800
6055 /** use random mac address for TA for probe request frame and add
6056  * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
6057  * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID  then the flag is ignored*/
6058 #define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ   0x1000
6059 /** allow mgmt transmission during off channel scan */
6060 #define WMI_SCAN_OFFCHAN_MGMT_TX    0x2000
6061 /** allow data transmission during off channel scan */
6062 #define WMI_SCAN_OFFCHAN_DATA_TX    0x4000
6063 /** allow capture ppdu with phy errors */
6064 #define WMI_SCAN_CAPTURE_PHY_ERROR  0x8000
6065 /** always do passive scan on passive channels */
6066 #define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x10000
6067 /** set HALF (10MHz) rate support */
6068 #define WMI_SCAN_FLAG_HALF_RATE_SUPPORT      0x20000
6069 /** set Quarter (5MHz) rate support */
6070 #define WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT   0x40000
6071 #define WMI_SCAN_RANDOM_SEQ_NO_IN_PROBE_REQ 0x80000
6072 #define WMI_SCAN_ENABLE_IE_WHTELIST_IN_PROBE_REQ 0x100000
6073 /** pause home channel when scan channel is same as home channel */
6074 #define WMI_SCAN_FLAG_PAUSE_HOME_CHANNEL            0x200000
6075 /**
6076  * report CCA busy for each possible 20Mhz subbands of the wideband scan channel
6077  */
6078 #define WMI_SCAN_FLAG_REPORT_CCA_BUSY_FOREACH_20MHZ 0x400000
6079 
6080 /** for adaptive scan mode using 3 bits (21 - 23 bits) */
6081 #define WMI_SCAN_DWELL_MODE_MASK 0x00E00000
6082 #define WMI_SCAN_DWELL_MODE_SHIFT        21
6083 
6084 typedef enum {
6085     WMI_SCAN_DWELL_MODE_DEFAULT      = 0,
6086     WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1,
6087     WMI_SCAN_DWELL_MODE_MODERATE     = 2,
6088     WMI_SCAN_DWELL_MODE_AGGRESSIVE   = 3,
6089     WMI_SCAN_DWELL_MODE_STATIC       = 4,
6090 } WMI_SCAN_DWELL_MODE;
6091 
6092 #define WMI_SCAN_SET_DWELL_MODE(flag, mode) \
6093     do { \
6094         (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \
6095             WMI_SCAN_DWELL_MODE_MASK); \
6096     } while (0)
6097 
6098 #define WMI_SCAN_GET_DWELL_MODE(flag) \
6099     (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT)
6100 
6101 /** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
6102 #define WMI_SCAN_CLASS_MASK 0xFF000000
6103 
6104 /*
6105  * Masks identifying types/ID of scans
6106  * Scan_Stop macros should be the same value as below defined in UMAC
6107  * #define IEEE80211_SPECIFIC_SCAN       0x00000000
6108  * #define IEEE80211_VAP_SCAN            0x01000000
6109  * #define IEEE80211_ALL_SCANS           0x04000000
6110  */
6111 /* WMI_SCAN_STOP_ONE:
6112  * Stop one scan which matches with scan_id provided in scan stop command.
6113  */
6114 #define WMI_SCAN_STOP_ONE         0x00000000
6115 /* WMI_SCN_STOP_VAP_ALL:
6116  * Stop all scans (host scans and FW internal scans) on provided vdev.
6117  */
6118 #define WMI_SCN_STOP_VAP_ALL      0x01000000
6119 /* WMI_SCN_STOP_HOST_VAP_ALL:
6120  * Stop all host scans on provided vdev.
6121  */
6122 #define WMI_SCN_STOP_HOST_VAP_ALL 0x02000000
6123 /* WMI_SCAN_STOP_ALL:
6124  * Stop all scans (host scans and FW internal scans) on all vdevs.
6125  */
6126 #define WMI_SCAN_STOP_ALL         0x04000000
6127 
6128 /** extended Scan ctrl flags **/
6129 #define WMI_SCAN_FLAG_EXT_DBS_SCAN_POLICY_MASK 0x00000003 /* Bit 0-1 reserved for DBS scan selection policy.*/
6130 
6131 #define WMI_SCAN_DBS_POLICY_DEFAULT             0x0 /** Select duty cycle if configured, else fall back to whatever
6132                                                         policy scan manager computes */
6133 #define WMI_SCAN_DBS_POLICY_FORCE_NONDBS        0x1 /** Force to select Non-DBS scan */
6134 #define WMI_SCAN_DBS_POLICY_IGNORE_DUTY         0x2 /** Ignore duty cycle even if configured and fall back to whatever
6135                                                         policy scan manager computes*/
6136 #define WMI_SCAN_DBS_POLICY_RESERVED            0x3
6137 #define WMI_SCAN_DBS_POLICY_MAX                 0x3
6138 
6139 /* Enable Reception of Public Action frame with this flag */
6140 #define WMI_SCAN_FLAG_EXT_FILTER_PUBLIC_ACTION_FRAME  0x00000004
6141 
6142 /* Indicate to scan all PSC channel */
6143 #define WMI_SCAN_FLAG_EXT_6GHZ_SCAN_ALL_PSC_CH        0x00000008
6144 
6145 /* Indicate to scan all NON-PSC channel */
6146 #define WMI_SCAN_FLAG_EXT_6GHZ_SCAN_ALL_NON_PSC_CH    0x00000010
6147 
6148 /* Indicate to save scan result matching hint from scan client */
6149 #define WMI_SCAN_FLAG_EXT_6GHZ_MATCH_HINT             0x00000020
6150 
6151 /* Skip any ch on which no any RNR had been received */
6152 #define WMI_SCAN_FLAG_EXT_6GHZ_SKIP_NON_RNR_CH        0x00000040
6153 
6154 /* Indicate client hint req is high priority than fw rnr or FILS disc */
6155 #define WMI_SCAN_FLAG_EXT_6GHZ_CLIENT_HIGH_PRIORITY   0x00000080
6156 
6157 /* Force all 6 GHz scan channels to active channel */
6158 #define WMI_SCAN_FLAG_EXT_6GHZ_FORCE_CHAN_ACTIVE      0x00000100
6159 
6160 /* Force broadcast address in RA even though specified bssid */
6161 #define WMI_SCAN_FLAG_EXT_FORCE_BRCAST_RA             0x00000200
6162 
6163 /* Extend 6 GHz channel measure time */
6164 #define WMI_SCAN_FLAG_EXT_6GHZ_EXTEND_MEASURE_TIME    0x00000400
6165 
6166 /**
6167  * Currently passive scan has higher priority than beacon and
6168  * beacon miss would happen irrespective of dwell time.
6169  * Below flag ensures there would not be beacon miss if the dwell
6170  * time is lesser than beacon interval - channel switch time combined.
6171  * For dwell time greater than beacon interval, bmiss is expected.
6172  */
6173 #define WMI_SCAN_FLAG_EXT_PASSIVE_SCAN_START_TIME_ENHANCE   0x00000800
6174 
6175 /* Force unicast address in RA */
6176 #define WMI_SCAN_FLAG_EXT_FORCE_UNICAST_RA            0x00001000
6177 
6178 /**
6179  * Indicate to add 10 Mhz offset to spectral scan center frequencies
6180  * sent by Host when checking against support channel list in FW
6181  */
6182 #define WMI_SCAN_FLAG_EXT_SPECTRAL_CFREQ_PLUS_10MHZ_IN_SUPP_CH_LIST 0x00002000
6183 
6184 /* Include MLO IE in Probe req */
6185 #define WMI_SCAN_FLAG_EXT_INCL_MLIE_PRB_REQ           0x00004000
6186 
6187 #define WMI_SCAN_FLAG_EXT_LOW_LATENCY_SCAN    0x00008000
6188 #define WMI_SCAN_FLAG_EXT_RELIABLE_SCAN       0x00010000
6189 #define WMI_SCAN_FLAG_EXT_FAST_SCAN           0x00020000
6190 #define WMI_SCAN_FLAG_EXT_LOW_POWER_SCAN      0x00040000
6191 #define WMI_SCAN_FLAG_EXT_STOP_IF_BSSID_FOUND 0x00080000
6192 #define WMI_SCAN_FLAG_EXT_P2P_SCAN            0x00100000
6193 
6194 
6195 /**
6196  * new 6 GHz flags per chan (short ssid or bssid) in struct
6197  * wmi_hint_freq_short_ssid or wmi_hint_freq_bssid
6198  */
6199 /* Indicate not to send probe req for short_ssid or bssid on that channel */
6200 #define WMI_SCAN_HINT_FLAG_SKIP_TX_PROBE_REQ    0x00000001
6201 
6202 /* Force channel in WMI hint to active channel */
6203 #define WMI_SCAN_HINT_FLAG_FORCE_CHAN_ACTIVE    0x00000002
6204 
6205 /* Combine short SSID with legacy bssid list */
6206 #define WMI_SCAN_HINT_FLAG_COMBINE_BSSID_LIST   0x00000004
6207 
6208 
6209 #define WMI_SCAN_CHANNEL_FREQ_MASK  0x000FFFFF
6210 #define WMI_SCAN_CHANNEL_FLAGS_MASK 0xFFF00000
6211 
6212 /**
6213  * Per channel configuration flags
6214  */
6215 
6216 /**
6217  * WMI_SCAN_CHANNEL_FLAG_SCAN_ONLY_IF_RNR_FOUND:
6218  *     If this flag is set, then scan only if the corresponding channel
6219  *     is found via RNR IE during 2g/5g scan.
6220  *     If this flag is not set, then FW always scans the channel
6221  *     irrespective of RNR and also FW ignores
6222  *     WMI_SCAN_FLAG_EXT_6GHZ_SKIP_NON_RNR_CH flag
6223  */
6224 #define WMI_SCAN_CHANNEL_FLAG_SCAN_ONLY_IF_RNR_FOUND 0x001
6225 
6226 typedef struct {
6227     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
6228     /** requestor requesting cancel  */
6229     A_UINT32 requestor;
6230     /** Scan ID */
6231     A_UINT32 scan_id;
6232     /**
6233      * Req Type
6234      * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
6235      * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id (on a specific pdev in DBDC)
6236      * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
6237      * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine (on a specific pdev in DBDC)
6238      */
6239     A_UINT32 req_type;
6240     /**
6241      * vDev ID
6242      * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
6243      */
6244     A_UINT32 vdev_id;
6245     /** pdev_id for identifying the MAC
6246      * See macros starting with WMI_PDEV_ID_ for values.
6247      * In non-DBDC case host should set it to 0
6248      */
6249     A_UINT32 pdev_id;
6250 } wmi_stop_scan_cmd_fixed_param;
6251 
6252 
6253 #define MAX_NUM_CHAN_PER_WMI_CMD     58    /* each WMI cmd can hold 58 channel entries at most */
6254 #define WMI_APPEND_TO_EXISTING_CHAN_LIST    0x1
6255 #define WMI_CHANNEL_MAX_BANDWIDTH_VALID     0x2
6256 #define WMI_HONOR_HOST_6GHZ_CHANNEL_PASSIVE 0x4
6257 /*
6258  * To preserve backwards compatibility, retain old names (without WMI_ prefix)
6259  * as aliases for the corrected names (with WMI_ prefix).
6260  */
6261 #define APPEND_TO_EXISTING_CHAN_LIST WMI_APPEND_TO_EXISTING_CHAN_LIST
6262 #define CHANNEL_MAX_BANDWIDTH_VALID WMI_CHANNEL_MAX_BANDWIDTH_VALID
6263 
6264 typedef struct {
6265     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
6266     A_UINT32 num_scan_chans; /** no of elements in chan_info[] */
6267     A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
6268     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. */
6269 /** Followed by the variable length TLV chan_info:
6270  *  wmi_channel chan_info[] */
6271 } wmi_scan_chan_list_cmd_fixed_param;
6272 
6273 /*
6274  * Priority numbers must be sequential, starting with 0.
6275  */
6276 /* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
6277 typedef enum {
6278     WMI_SCAN_PRIORITY_VERY_LOW = 0,
6279     WMI_SCAN_PRIORITY_LOW,
6280     WMI_SCAN_PRIORITY_MEDIUM,
6281     WMI_SCAN_PRIORITY_HIGH,
6282     WMI_SCAN_PRIORITY_VERY_HIGH,
6283 
6284     WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
6285 } wmi_scan_priority;
6286 
6287 /* Five Levels for Requested Priority */
6288 /* VERY_LOW LOW  MEDIUM   HIGH  VERY_HIGH */
6289 typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
6290 
6291 /**
6292  * 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
6293  * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
6294  * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
6295  */
6296 typedef struct {
6297     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
6298     /**
6299      * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
6300      * 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
6301      */
6302     A_UINT32 vdev_type;
6303     /**
6304      * number of rows in mapping_table for a specific vdev
6305      * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
6306      */
6307     A_UINT32 number_rows;
6308     /**
6309      * pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values.
6310      * In non-DBDC case host should set it to 0
6311      */
6312     A_UINT32 pdev_id;
6313 /**  mapping_table for a specific vdev follows this TLV
6314  *   WLAN_PRIORITY_MAPPING mapping_table[]; */
6315 } wmi_scan_sch_priority_table_cmd_fixed_param;
6316 
6317 /** update flags */
6318 #define WMI_SCAN_UPDATE_SCAN_PRIORITY           0x1
6319 #define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME      0x2
6320 #define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME      0x4
6321 
6322 typedef struct {
6323     A_UINT32 tlv_header;
6324     /** requestor requesting update scan request  */
6325     A_UINT32 requestor;
6326     /** Scan ID of the scan request that need to be update */
6327     A_UINT32 scan_id;
6328     /** update flags, indicating which of the following fields are valid and need to be updated*/
6329     A_UINT32 scan_update_flags;
6330     /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
6331     A_UINT32 scan_priority;
6332     /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
6333     A_UINT32 min_rest_time;
6334     /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
6335     A_UINT32 max_rest_time;
6336     /** 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 */
6337     A_UINT32 pdev_id;
6338 } wmi_scan_update_request_cmd_fixed_param;
6339 
6340 #define WMI_SCAN_PROBE_OUI_SPOOFED_MAC_IN_PROBE_REQ 0x1
6341 #define WMI_SCAN_PROBE_OUI_RANDOM_SEQ_NO_IN_PROBE_REQ 0x2
6342 #define WMI_SCAN_PROBE_OUI_ENABLE_IE_WHITELIST_IN_PROBE_REQ 0x4
6343 
6344 typedef struct _wmi_vendor_oui {
6345     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vendor_oui */
6346     A_UINT32 oui_type_subtype; /** Vendor OUI type and subtype, lower 3 bytes is type and highest byte is subtype**/
6347 }wmi_vendor_oui;
6348 
6349 typedef struct {
6350     A_UINT32 tlv_header;
6351     /** oui to be used in probe request frame when  random mac addresss is
6352      * requested part of scan parameters. this is applied to both FW internal scans and
6353      * host initated scans. host can request for random mac address with
6354      * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag.     */
6355     A_UINT32 prob_req_oui;
6356     A_UINT32 vdev_id;
6357     /** Control Flags **/
6358     A_UINT32 flags;
6359     /**  ie bitmap to use in probe req **/
6360     A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
6361     /** Number of vendor OUIs. In the TLV vendor_oui[] **/
6362     A_UINT32 num_vendor_oui;
6363     /** 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 */
6364     A_UINT32 pdev_id;
6365     /* Following this tlv, there comes an array of structure of type wmi_vendor_oui
6366  wmi_vendor_oui vendor_oui[];*/
6367 } wmi_scan_prob_req_oui_cmd_fixed_param;
6368 
6369 
6370 enum wmi_scan_event_type {
6371     WMI_SCAN_EVENT_STARTED = 0x1,
6372     WMI_SCAN_EVENT_COMPLETED = 0x2,
6373     WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
6374     WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
6375     WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
6376     WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
6377     WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
6378     WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
6379     WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
6380     WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */
6381     WMI_SCAN_EVENT_RESUMED = 0x400,   /* scan request is resumed */
6382     WMI_SCAN_EVENT_MAX = 0x8000
6383 };
6384 
6385 enum wmi_scan_completion_reason {
6386     /** scan related events */
6387     WMI_SCAN_REASON_NONE = 0xFF,
6388     WMI_SCAN_REASON_COMPLETED = 0,
6389     WMI_SCAN_REASON_CANCELLED = 1,
6390     WMI_SCAN_REASON_PREEMPTED = 2,
6391     WMI_SCAN_REASON_TIMEDOUT = 3,
6392     WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
6393     WMI_SCAN_REASON_SUSPENDED = 5,
6394     WMI_SCAN_REASON_DFS_VIOLATION = 6, /* Failure when tried to SCAN channel in NOL list */
6395     WMI_SCAN_REASON_MAX,
6396 };
6397 
6398 #define WMI_SCAN_EVT_IS_SCAN_TYPE_P2P_FLAG_SET(flag, value) \
6399     WMI_SET_BITS(flag, 0, 1, value)
6400 #define WMI_SCAN_EVT_IS_SCAN_TYPE_P2P_FLAG_GET(flag) \
6401     WMI_GET_BITS(flag, 0, 1)
6402 
6403 typedef struct {
6404     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
6405     /** scan event (wmi_scan_event_type) */
6406     A_UINT32 event;
6407     /** status of the scan completion event */
6408     A_UINT32 reason;
6409     /** channel freq , only valid for FOREIGN channel event*/
6410     A_UINT32 channel_freq;
6411     /**id of the requestor whose scan is in progress */
6412     A_UINT32 requestor;
6413     /**id of the scan that is in progress */
6414     A_UINT32 scan_id;
6415     /**id of VDEV that requested the scan */
6416     A_UINT32 vdev_id;
6417     /** TSF Timestamp when the scan event (wmi_scan_event_type) is completed
6418      * In case of AP it is TSF of the AP vdev
6419      * In case of STA connected state this is the TSF of the AP
6420      * In case of STA not connected it will be the free running HW timer
6421      */
6422     A_UINT32 tsf_timestamp;
6423     /** flags:
6424      * Bit[0]    - indicate if scan type is for p2p
6425      * Bit[1:31] - reserved
6426      */
6427     A_UINT32 flags;
6428 } wmi_scan_event_fixed_param;
6429 
6430 /* WMI Diag event */
6431 typedef struct {
6432     A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
6433     A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
6434     A_UINT32 count;   /* Number of diag frames added to current event */
6435     A_UINT32 dropped;
6436     /* followed by WMITLV_TAG_ARRAY_BYTE */
6437 } wmi_diag_event_fixed_param;
6438 
6439 #define WMI_11K_OFFLOAD_BITMAP_NEIGHBOR_REPORT_REQ  0x1
6440 
6441 typedef struct {
6442     A_UINT32 time_offset;                   /* positive offset in secs from the time 11k offload command has been received, 0xFFFFFFFF if offset is not valid */
6443     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 */
6444     A_UINT32 bmiss_count_trigger;           /* value 1 is to send neighbor report at 1st BMISS, 0xFFFFFFFF if input is not valid */
6445     A_UINT32 per_threshold_offset;          /* percentage offset from the current per_threshold, 0xFFFFFFFF if input is not valid */
6446     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 */
6447     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
6448                                              * neighbor report requests that will be sent by FW after every roam */
6449     wmi_ssid ssid;                          /* ssid of current connected AP FW might choose to use this SSID in the neighbor report req frame if it is
6450                                              * interested in candidate of the same SSID */
6451 } wmi_neighbor_report_offload;
6452 
6453 typedef struct {
6454     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_11k_report_fixed_param */
6455     A_UINT32 vdev_id;
6456     A_UINT32 offload_11k; /* bitmask to indicate to FW what all 11k features are offloaded */
6457 } wmi_11k_offload_report_fixed_param;
6458 
6459 typedef struct {
6460     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_neighbor_report_offload_tlv_param */
6461     wmi_neighbor_report_offload neighbor_rep_ofld_params;
6462 } wmi_neighbor_report_11k_offload_tlv_param;
6463 
6464 #define WMI_INVOKE_NEIGHBOR_REPORT_FLAGS_SEND_RESP_TO_HOST 0x1
6465 
6466 typedef struct {
6467     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_invoke_neighbor_report_fixed_param */
6468     A_UINT32 vdev_id;
6469     A_UINT32 flags;
6470     wmi_ssid ssid; /* if ssid.len == 0, firmware doesn't include ssid sub-element.
6471                     * In that case AP gives all the candidates in ESS without SSID filter
6472                     * If host wants to insert ssid subelement in the neighbor report request frame, then it can specify the ssid here */
6473 } wmi_11k_offload_invoke_neighbor_report_fixed_param;
6474 
6475 #define WMI_MAX_PMKID_LEN   16
6476 #define WMI_MAX_PMK_LEN     64
6477 
6478 #define WMI_PMK_CACHE_CAT_FLAG_BSSID              0x1
6479 #define WMI_PMK_CACHE_CAT_FLAG_SSID_CACHE_ID      0x2
6480 
6481 #define WMI_PMK_CACHE_ACTION_FLAG_ADD_ENTRY       0x1
6482 #define WMI_PMK_CACHE_ACTION_FLAG_DEL_ENTRY       0x2
6483 
6484 typedef struct {
6485     A_UINT32       tlv_header;
6486     A_UINT32       pmk_len;
6487     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,
6488                                         in spite of the automatic byte-swap applied to WMI messages during download*/
6489     A_UINT32       pmkid_len;
6490     A_UINT8        pmkid[WMI_MAX_PMKID_LEN];
6491     wmi_mac_addr   bssid;
6492     wmi_ssid       ssid;
6493     A_UINT32       cache_id;
6494     A_UINT32       cat_flag;  // whether (bssid) or (ssid,cache_id) is valid
6495     A_UINT32       action_flag;  // add/delete the entry
6496 } wmi_pmk_cache;
6497 
6498 #define WMI_PMK_CACHE_OP_FLAG_FLUSH_ALL       0x1
6499 
6500 typedef struct {
6501     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pmk_cache_cmd_fixed_param */
6502     A_UINT32 op_flag;   //option to flush all the cache at once
6503     A_UINT32 vdev_id;
6504     A_UINT32 num_cache;
6505     /**
6506     * TLV (tag length value) parameters follow the update_pmk_cache cmd
6507     * structure. The TLV's are:
6508      * wmi_pmk_cache cache_list[];
6509     */
6510 } wmi_pdev_update_pmk_cache_cmd_fixed_param;
6511 
6512 #define WMI_FILS_MAX_USERNAME_LEN 16
6513 #define WMI_FILS_MAX_REALM_LEN 256
6514 #define WMI_FILS_MAX_RRK_LEN 64
6515 #define WMI_FILS_MAX_RIK_LEN 64
6516 
6517 /* for big-endian hosts, manual endian conversion will be needed to keep the array values in their original order,
6518 in spite of the automatic byte-swap applied to WMI messages during download*/
6519 
6520 typedef struct {
6521     A_UINT8     username[WMI_FILS_MAX_USERNAME_LEN];
6522     A_UINT32    username_length;
6523     A_UINT32    next_erp_seq_num;
6524     A_UINT8     rRk[WMI_FILS_MAX_RRK_LEN];
6525     A_UINT32    rRk_length;
6526     A_UINT8     rIk[WMI_FILS_MAX_RIK_LEN];
6527     A_UINT32    rIk_length;
6528     A_UINT8     realm[WMI_FILS_MAX_REALM_LEN];
6529     A_UINT32    realm_len;
6530 } wmi_erp_info;
6531 
6532 enum wmi_fils_hlp_pkt_type {
6533     WMI_FILS_HLP_PKT_TYPE_DHCP_DISCOVER = 1,
6534 };
6535 
6536 typedef struct {
6537     A_UINT32      tlv_header;  /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_offload_tlv_param */
6538     A_UINT32      flags;
6539     wmi_erp_info  vdev_erp_info;
6540 } wmi_roam_fils_offload_tlv_param;
6541 
6542 typedef struct {
6543     A_UINT32  tlv_header; /** tag WMITLV_TAG_STRUC_wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param**/
6544     A_UINT32  flags;
6545     A_UINT32  vdev_id;
6546     A_UINT32  size;
6547     A_UINT32  pkt_type; // filled using enum wmi_fils_hlp_pkt_type
6548  // A_UINT8          fils_hlp_pkt[];
6549 } wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param;
6550 
6551 #define WMI_MAX_KEK_LEN 64
6552 #define GTK_OFFLOAD_KEK_EXTENDED_BYTES WMI_MAX_KEK_LEN /*KEK len has been increased to 64 to support FILS security.
6553                                           To not break backward compatibility, new GTK_OFFLOAD_KEK_EXTENDED_BYTES has been defined without modifying old GTK_OFFLOAD_KEK_BYTES */
6554 
6555 typedef struct {
6556     A_UINT32   tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_synch_tlv_param */
6557     A_UINT32   update_erp_next_seq_num;// Boolean denoting whether next erp_seq_num changed or not.
6558     A_UINT32   next_erp_seq_num;
6559     A_UINT32   kek_len;
6560     A_UINT8    kek[WMI_MAX_KEK_LEN];
6561     A_UINT32   pmk_len;
6562     A_UINT8    pmk[WMI_MAX_PMK_LEN];
6563     A_UINT8    pmkid[WMI_MAX_PMKID_LEN];
6564     A_UINT8    realm[WMI_FILS_MAX_REALM_LEN];
6565     A_UINT32   realm_len;
6566 } wmi_roam_fils_synch_tlv_param;
6567 
6568 /*
6569  * FW sends PMK cache of roamed candidate to host to sync pmk cache with host
6570  */
6571 typedef struct {
6572     A_UINT32  tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_pmk_cache_synch_tlv_param */
6573     A_UINT32  pmk_len;
6574     A_UINT8  pmk[WMI_MAX_PMK_LEN];
6575     A_UINT8  pmkid[WMI_MAX_PMKID_LEN];
6576 } wmi_roam_pmk_cache_synch_tlv_param;
6577 
6578 /**
6579  * WMI_ROAM_LINK_FLAG_XXX definition:
6580  */
6581 #define WMI_ROAM_LINK_FLAG_DISABLE    0x1   /* link is disabled, host can overwrite it later. */
6582 
6583 typedef struct {
6584     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ml_setup_links_param */
6585     A_UINT32 vdev_id; /* when vdev_id is 0xffffffff, means the link_id hasn't attached to vdev */
6586     A_UINT32 link_id; /* link id defined as in 802.11 BE spec. */
6587     wmi_channel channel; /* link primary channel */
6588     /**
6589      * link flags: refer WMI_ROAM_LINK_FLAG_XXX.
6590      */
6591     A_UINT32 flags;
6592     wmi_mac_addr link_addr; /* link address */
6593     wmi_mac_addr self_link_addr; /* self-link address */
6594 } wmi_roam_ml_setup_links_param;
6595 
6596 /*
6597  * If FW has multiple active channels due to MCC(multi channel concurrency),
6598  * then these stats are combined stats for all the active channels.
6599  */
6600 typedef struct {
6601     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
6602     /** ack count, it is an incremental number, not accumulated number */
6603     A_UINT32 ackRcvBad;
6604     /** bad rts count, it is an incremental number, not accumulated number */
6605     A_UINT32 rtsBad;
6606     /** good rts, it is an incremental number, not accumulated number */
6607     A_UINT32 rtsGood;
6608     /** fcs count, it is an incremental number, not accumulated number */
6609     A_UINT32 fcsBad;
6610     /** beacon count, it is an incremental number, not accumulated number */
6611     A_UINT32 noBeacons;
6612 } wmi_update_whal_mib_stats_event_fixed_param;
6613 
6614 /*
6615  * This defines how much headroom is kept in the
6616  * receive frame between the descriptor and the
6617  * payload, in order for the WMI PHY error and
6618  * management handler to insert header contents.
6619  *
6620  * This is in bytes.
6621  */
6622 #define WMI_MGMT_RX_HDR_HEADROOM (sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr))
6623 
6624 /** This event will be used for sending scan results
6625  * as well as rx mgmt frames to the host. The rx buffer
6626  * will be sent as part of this WMI event. It would be a
6627  * good idea to pass all the fields in the RX status
6628  * descriptor up to the host.
6629  */
6630 /* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
6631 #define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
6632 
6633 /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
6634 #define WMI_MGMT_RX_HDR_EXTSCAN     0x01
6635 /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of matched network by FW ENLO */
6636 #define WMI_MGMT_RX_HDR_ENLO     0x02
6637 
6638 #define MAX_ANTENNA_EIGHT 8
6639 
6640 
6641 /** Helper macro for params GET/SET of MGMT_RX_FW_CONSUMED_EVENTID */
6642 #define WMI_MGMT_RX_FW_CONSUMED_PARAM_PEER_ID_GET(peer_info_subtype) WMI_GET_BITS(peer_info_subtype, 0, 16)
6643 #define WMI_MGMT_RX_FW_CONSUMED_PARAM_PEER_ID_SET(peer_info_subtype, value) WMI_SET_BITS(peer_info_subtype, 0, 16, value)
6644 
6645 #define WMI_MGMT_RX_FW_CONSUMED_PARAM_IEEE_LINK_ID_GET(peer_info_subtype) WMI_GET_BITS(peer_info_subtype, 16, 3)
6646 #define WMI_MGMT_RX_FW_CONSUMED_PARAM_IEEE_LINK_ID_SET(peer_info_subtype, value) WMI_SET_BITS(peer_info_subtype, 16, 3, value)
6647 
6648 #define WMI_MGMT_RX_FW_CONSUMED_PARAM_SUBTYPE_GET(peer_info_subtype) WMI_GET_BITS(peer_info_subtype, 28, 4)
6649 #define WMI_MGMT_RX_FW_CONSUMED_PARAM_SUBTYPE_SET(peer_info_subtype, value) WMI_SET_BITS(peer_info_subtype, 28, 4, value)
6650 
6651 #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)
6652 #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)
6653 
6654 #define WMI_MGMT_RX_FW_CONSUMED_PARAM_MGMT_PKT_CTR_GET(mgmt_pkt_ctr_info) WMI_GET_BITS(mgmt_pkt_ctr_info, 16, 16)
6655 #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)
6656 
6657 typedef struct {
6658     A_UINT32 tlv_header; /* WMITLV_TAG_STRUCT_wmi_mgmt_rx_fw_consumed_hdr */
6659     A_UINT32 rx_tsf_l32; /* h/w assigned timestamp of the rx frame in micro sec */
6660     A_UINT32 rx_tsf_u32 ;/* h/w assigned timestamp of the rx frame in micro sec */
6661     A_UINT32 pdev_id; /* pdev_id for identifying the MAC the rx mgmt frame was received by */
6662     /**
6663      * peer_info_subtype
6664      *
6665      * [15:0]:  ml_peer_id, ML peer_id unique across chips
6666      * [18:16]: ieee_link_id, protocol link id on which the rx frame is received
6667      * [27:19]: reserved
6668      * [31:28]: subtype, subtype of the received MGMT frame
6669      */
6670     A_UINT32 peer_info_subtype;
6671     A_UINT32 chan_freq; /* frequency in MHz of the channel on which this frame was received */
6672     /* Timestamp (in micro sec) of the last fw consumed/dropped mgmt. frame, same across chips */
6673     A_UINT32 global_timestamp;
6674     /**
6675      * mgmt_pkt_ctr_info
6676      *
6677      * [14:0]:  reserved
6678      * [15]:    mgmt_pkt_ctr_valid
6679      * [31:16]: mgmt_pkt_ctr, Sequence number of the last fw consumed mgmt frame
6680      */
6681     A_UINT32 mgmt_pkt_ctr_info;
6682     A_UINT32 rx_ppdu_duration_us; /* receive duration in us */
6683     A_UINT32 mpdu_end_timestamp; /* mpdu end timestamp in us (based on HWMLO timer) */
6684 } wmi_mgmt_rx_fw_consumed_hdr;
6685 
6686 /** Helper macro for param GET/SET of mgmt_rx_reo_params */
6687 #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)
6688 #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)
6689 
6690 #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)
6691 #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)
6692 
6693 #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)
6694 #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)
6695 
6696 /** Data structure of the TLV to add in RX EVENTID for providing REO params
6697  *  like global_timestamp and mgmt_pkt_ctr
6698  */
6699 typedef struct {
6700     A_UINT32 tlv_header; /*TLV WMITLV_TAG_STRUC_wmi_mgmt_rx_reo_params*/
6701     /* Timestamp (in micro sec) of the last fw forwarded mgmt. frame, same across chips */
6702     A_UINT32 global_timestamp;
6703     /**
6704      * mgmt_pkt_ctr_link_info
6705      *
6706      * [11:0]:  reserved
6707      * [14:12]: ieee_link_id, protocol link id on which the rx frame is received
6708      * [15]:    mgmt_pkt_ctr_valid
6709      * [31:16]: mgmt_pkt_ctr, Sequence number of the last fw forwarded mgmt frame
6710      */
6711 
6712     A_UINT32 mgmt_pkt_ctr_link_info;
6713     A_UINT32 rx_ppdu_duration_us; /* receive duration in us */
6714     A_UINT32 mpdu_end_timestamp; /* mpdu end timestamp in us (based on HWMLO timer) */
6715 } wmi_mgmt_rx_reo_params;
6716 
6717 /** Helper macro for param GET/SET */
6718 #define WMI_RX_PARAM_EXT_META_ID_GET(mgmt_rx_params_ext_dword0) WMI_GET_BITS(mgmt_rx_params_ext_dword0, 0, 3)
6719 #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)
6720 
6721 #define WMI_RX_PARAM_EXT_BA_WIN_SIZE_GET(mgmt_rx_params_ext_dword1) WMI_GET_BITS(mgmt_rx_params_ext_dword1, 0, 16)
6722 #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)
6723 
6724 #define WMI_RX_PARAM_EXT_REO_WIN_SIZE_GET(mgmt_rx_params_ext_dword1) WMI_GET_BITS(mgmt_rx_params_ext_dword1, 16, 16)
6725 #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)
6726 
6727 typedef enum {
6728     WMI_RX_PARAMS_EXT_META_ADDBA = 0x0,
6729     WMI_RX_PARAMS_EXT_META_TWT = 0x1,
6730 } wmi_mgmt_rx_params_ext_meta_t;
6731 
6732 typedef struct {
6733     A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_mgmt_rx_params_ext) and len */
6734     union {
6735         struct {
6736             A_UINT32
6737                 /* Describes the representation of the data in rx_param_ext_dword1
6738                  * Full set shown in wmi_mgmt_rx_params_ext_meta_t */
6739                 meta_id     : 3,
6740                 /* Dedicated for commonly used parameters only */
6741                 reserved_0  : 29;
6742         };
6743         A_UINT32 mgmt_rx_params_ext_dword0;
6744     };
6745     union {
6746         struct {
6747             /* WMI_RX_PARAMS_EXT_META_ADDBA */
6748             A_UINT32
6749                 ba_win_size :16,  /* negotiated BA window size */
6750                 reo_win_size :16; /* 2x the negotiated BA window size to handle any latency across MLO */
6751         };
6752         A_UINT32 mgmt_rx_params_ext_dword1;
6753     };
6754     union {
6755         struct {
6756             /* WMI_RX_PARAMS_EXT_META_TWT */
6757             A_UINT32 twt_ie_buf_len; /* IE length */
6758             /* Following this structure is the TLV byte stream of IE data
6759              * of length twt_ie_buf_len:
6760              *     A_UINT8 ie_data[]; <-- length in bytes given by field
6761              *                            twt_ie_buf_len.
6762              *     This ie_data[] would contain only the TWT IE information
6763              *     when twt_ie_buf_len is non zero.
6764              */
6765         };
6766         A_UINT32 mgmt_rx_params_ext_dword2;
6767     };
6768 } wmi_mgmt_rx_params_ext;
6769 
6770 typedef struct {
6771     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
6772     /** channel on which this frame is received (channel number) */
6773     A_UINT32 channel;
6774     /** snr information used to cal RSSI */
6775     A_UINT32 snr;
6776     /** Rate kbps */
6777     A_UINT32 rate;
6778     /** rx phy mode WLAN_PHY_MODE */
6779     A_UINT32 phy_mode;
6780     /** length of the frame */
6781     A_UINT32 buf_len;
6782     /** rx status */
6783     A_UINT32 status; /* capture mode indication */
6784     /** RSSI of PRI 20MHz for each chain. */
6785     A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
6786     /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
6787     A_UINT32 flags;
6788     /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
6789     A_INT32 rssi;
6790     /** delta between local TSF(TSF timestamp when frame was RXd)
6791      *  and remote TSF(TSF timestamp in the IE for mgmt frame -
6792      *  beacon,proberesp for e.g). If remote TSF is not available,
6793      *  delta set to 0.
6794      *  Although tsf_delta is stored as A_UINT32, it can be negative,
6795      *  and thus would need to be sign-extended if added to a value
6796      *  larger than 32 bits.
6797      */
6798     A_UINT32 tsf_delta;
6799 
6800     /* The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from
6801      * TSF timestamp in the RX MAC descriptor provided by HW.
6802      */
6803     A_UINT32 rx_tsf_l32;
6804 
6805     /* The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register
6806      * after the packet is received.
6807      */
6808     A_UINT32 rx_tsf_u32;
6809 
6810     /** pdev_id for identifying the MAC the rx mgmt frame was received by
6811      * See macros starting with WMI_PDEV_ID_ for values.
6812      */
6813     A_UINT32 pdev_id;
6814 
6815     /** freq in MHz of the channel on which this frame was received */
6816     A_UINT32 chan_freq;
6817 
6818 /* This TLV is followed by array of bytes:
6819  *   A_UINT8 bufp[]; <-- management frame buffer
6820  */
6821 /* This TLV is optionally followed by array of struct:
6822  *  wmi_rssi_ctl_ext rssi_ctl_ext;
6823  */
6824 /*
6825  * This TLV is followed by struct:
6826  * wmi_mgmt_rx_reo_params reo_params;// MGMT rx REO params
6827  */
6828 /*
6829  * This TLV is optionally followed by struct:
6830  * wmi_mgmt_rx_params_ext mgmt_rx_params_ext[0 or 1];
6831  */
6832 } wmi_mgmt_rx_hdr;
6833 
6834 /* WMI CMD to receive the management filter criteria from the host */
6835 typedef struct {
6836     A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_mgmt_reo_filter_cmd_fixed_param */
6837     A_UINT32 pdev_id; /* pdev_id for identifying the MAC */
6838     /* filter:
6839      * Each bit represents the possible combination of frame type (2 bits)
6840      * and subtype (4 bits)
6841      * There would be 64 such combinations as per the 802.11 standard
6842      * For Exp : We have beacon frame, we will take the type and subtype
6843      *           of this frame and concatenate the bits, it will give 6 bits
6844      *           number. We need to go to that bit position in the below
6845      *           2 filter_low and filter_high bitmap and set the bit.
6846      */
6847     A_UINT32 filter_low;
6848     A_UINT32 filter_high;
6849 } wmi_mgmt_rx_reo_filter_configuration_cmd_fixed_param;
6850 
6851 typedef struct {
6852     A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_frame_pn_params) and len */
6853     A_UINT8 cur_pn[WMI_MAX_PN_LEN];
6854     A_UINT8 prev_pn[WMI_MAX_PN_LEN];
6855 } wmi_frame_pn_params;
6856 
6857 typedef struct {
6858     A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_is_my_frame) */
6859     A_UINT32 mgmt_frm_sub_type; /* to indicate which sub-type of MGMT frame */
6860     A_UINT32 is_my_frame; /* to indicate frame is sent to this BSSID */
6861 } wmi_is_my_mgmt_frame;
6862 
6863 typedef struct {
6864     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_ml_info */
6865     /**
6866      * CU vdev map to initmate about the on-going Critical update
6867      * per-link contains 16 VAPs at max.
6868      */
6869 
6870     /*
6871      *  bits    : 0-15 | 16-31
6872      *  link-id :  0   |   1
6873      */
6874     A_UINT32 cu_vdev_map_1;
6875     /*
6876      *  bits    : 0-15 | 16-31
6877      *  link-id :  2   |   3
6878      */
6879     A_UINT32 cu_vdev_map_2;
6880     /*
6881      *  bits    : 0-15 | 16-31
6882      *  link-id :  4   |   5
6883      */
6884     A_UINT32 cu_vdev_map_3;
6885     /*
6886      *  bits    : 0-15 | 16-31
6887      *  link-id :  6   |   7
6888      */
6889     A_UINT32 cu_vdev_map_4; /* bits 63:32 */
6890     /**
6891      * This is followed by byte array that contains BPCC value per MLO VAP.
6892      * There will be 16 byte entries for each link corresponding to VAP-ID.
6893      * So number of byte entries will be (num of max links supported by AP * 16)
6894      * Note: num of max links supported = 8
6895      */
6896 } wmi_mgmt_ml_info;
6897 
6898 #define WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_GET(_var)       WMI_GET_BITS(_var, 0, 8)
6899 #define WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_SET(_var, _val) WMI_SET_BITS(_var, 0, 8, _val)
6900 
6901 #define WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_EXP_DUR_GET(_var)       WMI_GET_BITS(_var, 8, 24)
6902 #define WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_EXP_DUR_SET(_var, _val) WMI_SET_BITS(_var, 8, 24, _val)
6903 
6904 typedef struct {
6905     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_bcast_t2lm_info */
6906     /*
6907      * Vdev_id for MLO vap
6908      * WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_GET /
6909      * WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_SET
6910      * vdev_id :8
6911      *
6912      * Duration time for MLO Vap
6913      * WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_GET /
6914      * WMI_MLO_BROADCAST_TID_TO_LINK_MAP_INFO_VDEV_ID_SET
6915      * expected_duration :24
6916      */
6917     A_UINT32 vdev_id_expec_dur;
6918 } wmi_mlo_bcast_t2lm_info;
6919 
6920 typedef enum {
6921     PKT_CAPTURE_MODE_DISABLE = 0,
6922     PKT_CAPTURE_MODE_MGMT_ONLY,
6923     PKT_CAPTURE_MODE_DATA_ONLY,
6924     PKT_CAPTURE_MODE_DATA_MGMT,
6925 } WMI_PKT_CAPTURE_MODE_CONFIG;
6926 
6927 /* This information sending to host during offloaded MGMT local TX and host TX */
6928 typedef struct {
6929     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_hdr */
6930     /* channel frequency in MHz */
6931     A_UINT32 chan_freq;
6932     /** snr information used to cal RSSI in dB */
6933     A_UINT32 snr;
6934     /** Rate kbps */
6935     A_UINT32 rate_kbps;
6936     /** phy mode WLAN_PHY_MODE */
6937     A_UINT32 phy_mode;
6938     /** length of the frame in bytes */
6939     A_UINT32 buf_len;
6940     /** status:
6941      * 0x00: CRC ERR
6942      * 0x08: DECRYPT ERR
6943      * 0x10: MIC ERR
6944      * 0x20: KEY CACHE MISS
6945      */
6946     A_UINT32 status;
6947     /** flags:
6948      * Information about the management frame e.g. can give a scan source
6949      * for a scan result mgmt frame
6950      * Refer to WMI_MGMT_RX_HDR_ definitions.
6951      * ex: WMI_MGMT_RX_HDR_EXTSCAN,WMI_MGMT_RX_HDR_ENLO
6952      */
6953     A_UINT32 flags;
6954     /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
6955     A_INT32 rssi;
6956     /** delta between local TSF (TSF timestamp when frame was RXd)
6957      *  and remote TSF (TSF timestamp in the IE for mgmt frame -
6958      *  beacon, proberesp for example). If remote TSF is not available,
6959      *  delta is set to 0.
6960      *  Although tsf_delta is stored as A_UINT32, it can be negative,
6961      *  and thus would need to be sign-extended if added to a value
6962      *  larger than 32 bits.
6963      */
6964     A_UINT32 tsf_delta;
6965 
6966     /* The lower 32 bits of the TSF (tsf_l32) is copied by FW from
6967      * TSF timestamp in the TX MAC descriptor provided by HW.
6968      */
6969     A_UINT32 tsf_l32;
6970 
6971     /* The upper 32 bits of the TSF (tsf_u32) is copied by FW from
6972      * TSF timestamp in the TX MAC descriptor provided by HW.
6973      */
6974     A_UINT32 tsf_u32;
6975 
6976     /** pdev_id for identifying the MAC the tx mgmt frame transmitted.
6977      * See macros starting with WMI_PDEV_ID_ for values.
6978      */
6979     A_UINT32 pdev_id;
6980 
6981     A_UINT32 direction; /* tx:0,rx:1*/
6982 
6983     /** tx_status:
6984      * 0: xmit ok
6985      * 1: excessive retries
6986      * 2: blocked by tx filtering
6987      * 4: fifo underrun
6988      * 8: swabort
6989      */
6990     A_UINT32 tx_status;
6991 
6992     A_UINT32
6993         /* tx_retry_cnt:
6994          * Indicates retry count of offloaded/local & host mgmt tx frames.
6995          * The WMI_MGMT_HDR_TX_RETRY_[SET,GET] macros can be used to access
6996          * this bitfield in a portable manner.
6997          */
6998         tx_retry_cnt:6, /* [5:0] */
6999         reserved_1:26;  /* [31:6] */
7000 
7001 /* This TLV may be followed by array of bytes:
7002  *   A_UINT8 bufp[]; <-- management frame buffer
7003  */
7004 } wmi_mgmt_hdr;
7005 
7006 /* Tx retry cnt set & get bits*/
7007 #define WMI_MGMT_HDR_TX_RETRY_CNT_SET(tx_retry_cnt, value) \
7008     WMI_SET_BITS(tx_retry_cnt, 0, 6, value)
7009 #define WMI_MGMT_HDR_TX_RETRY_CNT_GET(tx_retry_cnt) \
7010     WMI_GET_BITS(tx_retry_cnt, 0, 6)
7011 
7012 /*
7013  * Instead of universally increasing the RX_HDR_HEADROOM size which may cause problems for older targets,
7014  * this new ext_hdr can be used for extending the header and will be only applicable for new targets.
7015  */
7016 typedef struct
7017 {
7018     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_rssi_ctl_ext */
7019     /** RSSI of PRI 20MHz for each chain, in dB w.r.t. noise floor */
7020     A_UINT32 rssi_ctl_ext[MAX_ANTENNA_EIGHT - ATH_MAX_ANTENNA];
7021 } wmi_rssi_ctl_ext;
7022 
7023 typedef struct {
7024     /** TSF timestamp */
7025     A_UINT32 tsf_timestamp;
7026 
7027     /**
7028      * Current freq1, freq2
7029      *
7030      * [7:0]:    freq1[lo]
7031      * [15:8] :   freq1[hi]
7032      * [23:16]:   freq2[lo]
7033      * [31:24]:   freq2[hi]
7034      */
7035     A_UINT32 freq_info_1;
7036 
7037     /**
7038      * Combined RSSI over all chains and channel width for this PHY error
7039      *
7040      * [7:0]: RSSI combined
7041      * [15:8]: Channel width (MHz)
7042      * [23:16]: PHY error code
7043      * [24:16]: reserved (future use)
7044      */
7045     A_UINT32 freq_info_2;
7046 
7047     /**
7048      * RSSI on chain 0 through 3
7049      *
7050      * This is formatted the same as the PPDU_START RX descriptor
7051      * field:
7052      *
7053      * [7:0]:   pri20
7054      * [15:8]:  sec20
7055      * [23:16]: sec40
7056      * [31:24]: sec80
7057      */
7058     A_UINT32 rssi_chain0;
7059     A_UINT32 rssi_chain1;
7060     A_UINT32 rssi_chain2;
7061     A_UINT32 rssi_chain3;
7062 
7063     /**
7064      * Last calibrated NF value for chain 0 through 3
7065      *
7066      * nf_list_1:
7067      *
7068      * + [15:0] - chain 0
7069      * + [31:16] - chain 1
7070      *
7071      * nf_list_2:
7072      *
7073      * + [15:0] - chain 2
7074      * + [31:16] - chain 3
7075      */
7076     A_UINT32 nf_list_1;
7077     A_UINT32 nf_list_2;
7078 
7079     /** Length of the frame */
7080     A_UINT32 buf_len;
7081 } wmi_single_phyerr_rx_hdr;
7082 
7083 typedef struct {
7084     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_single_phyerr_ext_rx_hdr */
7085     /**
7086      * RSSI on chain 4 through 7 in dB w.r.t noise floor.
7087      *
7088      * This is formatted the same as the PPDU_START RX descriptor
7089      * field:
7090      *
7091      * [7:0]:   pri20
7092      * [15:8]:  sec20
7093      * [23:16]: sec40
7094      * [31:24]: sec80
7095      */
7096     A_UINT32 rssi_chain4;
7097     A_UINT32 rssi_chain5;
7098     A_UINT32 rssi_chain6;
7099     A_UINT32 rssi_chain7;
7100     /**
7101      * Last calibrated NF value for chain 4 through 7 in dBm
7102      *
7103      * nf_list_3:
7104      * + [15:0] - chain 4
7105      * + [31:16] - chain 5
7106      *
7107      * nf_list_4:
7108      * + [15:0] - chain 6
7109      * + [31:16] - chain 7
7110      *
7111      * Each chain's noise floor is stored as a sign-extended (negative)
7112      * value in dBm units.
7113      */
7114     A_UINT32 nf_list_3;
7115     A_UINT32 nf_list_4;
7116 } wmi_single_phyerr_ext_rx_hdr;
7117 
7118 #define WMI_UNIFIED_FREQINFO_1_LO   0x000000ff
7119 #define WMI_UNIFIED_FREQINFO_1_LO_S 0
7120 #define WMI_UNIFIED_FREQINFO_1_HI   0x0000ff00
7121 #define WMI_UNIFIED_FREQINFO_1_HI_S 8
7122 #define WMI_UNIFIED_FREQINFO_2_LO   0x00ff0000
7123 #define WMI_UNIFIED_FREQINFO_2_LO_S 16
7124 #define WMI_UNIFIED_FREQINFO_2_HI   0xff000000
7125 #define WMI_UNIFIED_FREQINFO_2_HI_S 24
7126 
7127 /*
7128  * Please keep in mind that these _SET macros break macro side effect
7129  * assumptions; don't be clever with them.
7130  */
7131 #define WMI_UNIFIED_FREQ_INFO_GET(hdr, f)                                   \
7132             (WMI_F_MS((hdr)->freq_info_1,                                   \
7133               WMI_UNIFIED_FREQINFO_##f##_LO)                                \
7134               | (WMI_F_MS((hdr)->freq_info_1,                               \
7135                  WMI_UNIFIED_FREQINFO_##f##_HI) << 8))
7136 
7137 #define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v)                                \
7138         do {                                                                \
7139             WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff,                       \
7140                 WMI_UNIFIED_FREQINFO_##f##_LO);                             \
7141             WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff,                \
7142                 WMI_UNIFIED_FREQINFO_##f##_HI);                             \
7143         } while (0)
7144 
7145 #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB    0x000000ff
7146 #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S  0
7147 #define WMI_UNIFIED_FREQINFO_2_CHWIDTH      0x0000ff00
7148 #define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S    8
7149 #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE   0x00ff0000
7150 #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
7151 
7152 #define WMI_UNIFIED_RSSI_COMB_GET(hdr)                                      \
7153             ((int8_t) (WMI_F_MS((hdr)->freq_info_2,                         \
7154                 WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
7155 
7156 #define WMI_UNIFIED_RSSI_COMB_SET(hdr, v)                                   \
7157             WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff,                       \
7158               WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
7159 
7160 #define WMI_UNIFIED_CHWIDTH_GET(hdr)                                        \
7161             WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
7162 
7163 #define WMI_UNIFIED_CHWIDTH_SET(hdr, v)                                     \
7164             WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff,                       \
7165               WMI_UNIFIED_FREQINFO_2_CHWIDTH);
7166 
7167 #define WMI_UNIFIED_PHYERRCODE_GET(hdr)                                     \
7168             WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
7169 
7170 #define WMI_UNIFIED_PHYERRCODE_SET(hdr, v)                                  \
7171             WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff,                       \
7172               WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
7173 
7174 #define WMI_UNIFIED_CHAIN_0     0x0000ffff
7175 #define WMI_UNIFIED_CHAIN_0_S   0
7176 #define WMI_UNIFIED_CHAIN_1     0xffff0000
7177 #define WMI_UNIFIED_CHAIN_1_S   16
7178 #define WMI_UNIFIED_CHAIN_2     0x0000ffff
7179 #define WMI_UNIFIED_CHAIN_2_S   0
7180 #define WMI_UNIFIED_CHAIN_3     0xffff0000
7181 #define WMI_UNIFIED_CHAIN_3_S   16
7182 
7183 #define WMI_UNIFIED_CHAIN_4     0x0000ffff
7184 #define WMI_UNIFIED_CHAIN_4_S   0
7185 #define WMI_UNIFIED_CHAIN_5     0xffff0000
7186 #define WMI_UNIFIED_CHAIN_5_S   16
7187 #define WMI_UNIFIED_CHAIN_6     0x0000ffff
7188 #define WMI_UNIFIED_CHAIN_6_S   0
7189 #define WMI_UNIFIED_CHAIN_7     0xffff0000
7190 #define WMI_UNIFIED_CHAIN_7_S   16
7191 
7192 #define WMI_UNIFIED_CHAIN_0_FIELD   nf_list_1
7193 #define WMI_UNIFIED_CHAIN_1_FIELD   nf_list_1
7194 #define WMI_UNIFIED_CHAIN_2_FIELD   nf_list_2
7195 #define WMI_UNIFIED_CHAIN_3_FIELD   nf_list_2
7196 #define WMI_UNIFIED_CHAIN_4_FIELD   nf_list_3
7197 #define WMI_UNIFIED_CHAIN_5_FIELD   nf_list_3
7198 #define WMI_UNIFIED_CHAIN_6_FIELD   nf_list_4
7199 #define WMI_UNIFIED_CHAIN_7_FIELD   nf_list_4
7200 
7201 #define WMI_UNIFIED_NF_CHAIN_GET(hdr, c)                                    \
7202             ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD,      \
7203               WMI_UNIFIED_CHAIN_##c)))
7204 
7205 #define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf)                                \
7206             WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, (nf) & 0xffff,  \
7207               WMI_UNIFIED_CHAIN_##c);
7208 
7209 /*
7210  * For now, this matches what the underlying hardware is doing.
7211  * Update ar6000ProcRxDesc() to use these macros when populating
7212  * the rx descriptor and then we can just copy the field over
7213  * to the WMI PHY notification without worrying about breaking
7214  * things.
7215  */
7216 #define WMI_UNIFIED_RSSI_CHAN_PRI20     0x000000ff
7217 #define WMI_UNIFIED_RSSI_CHAN_PRI20_S   0
7218 #define WMI_UNIFIED_RSSI_CHAN_SEC20     0x0000ff00
7219 #define WMI_UNIFIED_RSSI_CHAN_SEC20_S   8
7220 #define WMI_UNIFIED_RSSI_CHAN_SEC40     0x00ff0000
7221 #define WMI_UNIFIED_RSSI_CHAN_SEC40_S   16
7222 #define WMI_UNIFIED_RSSI_CHAN_SEC80     0xff000000
7223 #define WMI_UNIFIED_RSSI_CHAN_SEC80_S   24
7224 
7225 #define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi)                         \
7226             WMI_F_RMW((hdr)->rssi_chain##c, (rssi) & 0xff,                  \
7227               WMI_UNIFIED_RSSI_CHAN_##ch);
7228 
7229 #define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch)                               \
7230             ((int8_t) (WMI_F_MS((hdr)->rssi_chain##c,                       \
7231               WMI_UNIFIED_RSSI_CHAN_##ch)))
7232 
7233 #define WMI_UNIFIED_CHAIN_RSSI_GET(tlv, chain_idx, band) \
7234     ((A_INT8) WMI_F_MS((tlv)->chain_rssi[chain_idx], WMI_UNIFIED_RSSI_CHAN_ ## band))
7235 
7236 typedef struct {
7237     /** Phy error event header */
7238     wmi_single_phyerr_rx_hdr hdr;
7239     /** frame buffer */
7240     WMI_VAR_LEN_ARRAY1(A_UINT8, bufp);
7241 } wmi_single_phyerr_rx_event;
7242 
7243 /* PHY ERROR MASK 0 */
7244 /* bits 1:0 defined but not published */
7245 #define WMI_PHY_ERROR_MASK0_RADAR                           (1 <<  2)
7246 /* bits 23:3 defined but not published */
7247 #define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT                 (1 << 24)
7248 /* bits 25:24 defined but not published */
7249 #define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN                   (1 << 26)
7250 /* bits 31:27 defined but not published */
7251 
7252 /* PHY ERROR MASK 1 */
7253 /* bits 13:0 defined but not published */
7254 /* bits 31:14 reserved */
7255 
7256 /* PHY ERROR MASK 2 */
7257 /* bits 31:0 reserved */
7258 
7259 typedef struct {
7260     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr */
7261     /** Phy error phy error count */
7262     A_UINT32 num_phyerr_events;
7263     A_UINT32 tsf_l32;
7264     A_UINT32 tsf_u32;
7265     A_UINT32 buf_len;
7266     union {
7267         A_UINT32 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
7268         /** pdev_id for identifying the MAC
7269          * See macros starting with WMI_PDEV_ID_ for values.
7270          */
7271         A_UINT32 pdev_id;
7272     };
7273     A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
7274     A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
7275     A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
7276 /* This TLV is followed by array of bytes:
7277  *     frame buffer - contains multiple payloads in the order:
7278  *         header - payload, header - payload...
7279  *     (The header is of type: wmi_single_phyerr_rx_hdr)
7280  *   A_UINT8 bufp[];
7281  *     The extension hdr will repeat num_phyerr_events of times
7282  *     and will have 1:1 mapping with above header. i.e the 1st
7283  *     ext_rx_hdr will belong to 1st phyerr_rx_hdr and so on.
7284  *   wmi_single_phyerr_ext_rx_hdr single_phyerr_ext;
7285  */
7286 } wmi_comb_phyerr_rx_hdr;
7287 
7288 /* WMI MGMT TX  */
7289 typedef struct {
7290     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
7291     /** unique id identifying the VDEV, generated by the caller */
7292     A_UINT32 vdev_id;
7293     /** peer MAC address */
7294     wmi_mac_addr peer_macaddr;
7295     /** xmit rate */
7296     A_UINT32 tx_rate;
7297     /** xmit power */
7298     A_UINT32 tx_power;
7299     /** Buffer length in bytes */
7300     A_UINT32 buf_len;
7301 /* This TLV is followed by array of bytes:
7302  *   A_UINT8 bufp[]; <-- management frame buffer
7303  */
7304 } wmi_mgmt_tx_hdr;
7305 
7306 #define WMI_TX_SEND_PARAM_EXT_META_ID_GET(tx_param_ext_dword0) WMI_GET_BITS(tx_param_dword0, 0, 3)
7307 #define WMI_TX_SEND_PARAM_EXT_META_ID_SET(tx_param_ext_dword0, value) WMI_SET_BITS(tx_param_dword0, 0, 3, value)
7308 
7309 #define WMI_TX_SEND_PARAM_EXT_WIN_SIZE_GET(tx_param_ext_dword1) WMI_GET_BITS(tx_param_dword1, 0, 16)
7310 #define WMI_TX_SEND_PARAM_EXT_WIN_SIZE_SET(tx_param_ext_dword1, value) WMI_SET_BITS(tx_param_dword1, 0, 16, value)
7311 
7312 typedef enum {
7313     WMI_TX_SEND_PARAMS_EXT_META_ADDBA = 0x0,
7314     WMI_TX_SEND_PARAMS_EXT_META_DELBA = 0x1,
7315 } wmi_tx_send_params_ext_meta_t;
7316 
7317 typedef struct {
7318     A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_tx_send_params_ext) and len */
7319     union {
7320         struct {
7321             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 */
7322                      reserved_0  : 29; /* Dedicated for commonly used parameters only */
7323         };
7324         A_UINT32 tx_param_ext_dword0;
7325     };
7326     union {
7327         struct {
7328         /* WMI_TX_SEND_PARAMS_EXT_META_ADDBA */
7329             A_UINT32 win_size    : 16,
7330                      reserved_1  : 16;
7331         };
7332         A_UINT32 tx_param_ext_dword1;
7333     };
7334 } wmi_tx_send_params_ext;
7335 
7336 #define WMI_TX_SEND_PARAM_PWR_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 0, 8)
7337 #define WMI_TX_SEND_PARAM_PWR_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 0, 8, value)
7338 
7339 #define WMI_TX_SEND_PARAM_MCS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 8, 12)
7340 #define WMI_TX_SEND_PARAM_MCS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 8, 12, value)
7341 
7342 #define WMI_TX_SEND_PARAM_NSS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 20, 8)
7343 #define WMI_TX_SEND_PARAM_NSS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 20, 8, value)
7344 
7345 #define WMI_TX_SEND_PARAM_RETRY_LIMIT_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 28, 4)
7346 #define WMI_TX_SEND_PARAM_RETRY_LIMIT_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 28, 4, value)
7347 
7348 #define WMI_TX_SEND_PARAM_CHAIN_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 0, 8)
7349 #define WMI_TX_SEND_PARAM_CHAIN_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 0, 8, value)
7350 
7351 #define WMI_TX_SEND_PARAM_BW_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 8, 7)
7352 #define WMI_TX_SEND_PARAM_BW_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 8, 7, value)
7353 
7354 #define WMI_TX_SEND_PARAM_PREAMBLE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 15, 5)
7355 #define WMI_TX_SEND_PARAM_PREAMBLE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 15, 5, value)
7356 
7357 #define WMI_TX_SEND_PARAM_FRAME_TYPE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 20, 1)
7358 #define WMI_TX_SEND_PARAM_FRAME_TYPE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 20, 1, value)
7359 
7360 #define WMI_TX_SEND_PARAM_CFR_CAPTURE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 21, 1)
7361 #define WMI_TX_SEND_PARAM_CFR_CAPTURE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 21, 1, value)
7362 
7363 #define WMI_TX_SEND_PARAM_BEAMFORM_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 22, 1)
7364 #define WMI_TX_SEND_PARAM_BEAMFORM_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 22, 1, value)
7365 
7366 #define WMI_TX_SEND_PARAM_RETRY_LIMIT_EXT_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 23, 3)
7367 #define WMI_TX_SEND_PARAM_RETRY_LIMIT_EXT_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 23, 3, value)
7368 
7369 
7370 /* TX_SEND flags:
7371  * Bit 0: set wrong txkey
7372  *     There is one special WFA test case in STA or AP, setting wrong txkey
7373  *     in disassoc or deauth with PMF enabled to verify if peer disconnected
7374  * Bit 1: set ps buffering for SA query frame
7375  */
7376 #define WMI_TX_SEND_FLAG_SET_WRONG_KEY    0x00000001
7377 #define WMI_TX_SEND_FLAG_SET_WRONG_KEY_GET(tx_flags) WMI_GET_BITS(tx_flags, 0, 1)
7378 #define WMI_TX_SEND_FLAG_SET_WRONG_KEY_SET(tx_flags, value) WMI_SET_BITS(tx_flags, 0, 1, value)
7379 #define WMI_TX_SEND_FLAG_SET_PS_BUFFERING_FOR_SA_QUERY    0x00000002
7380 #define WMI_TX_SEND_FLAG_SET_PS_BUFFERING_FOR_SA_QUERY_GET(tx_flags) WMI_GET_BITS(tx_flags, 1, 1)
7381 #define WMI_TX_SEND_FLAG_SET_PS_BUFFERING_FOR_SA_QUERY_SET(tx_flags, value) WMI_SET_BITS(tx_flags, 1, 1, value)
7382 #define WMI_TX_SEND_FLAG_SET_IS_SA_QUERY    0x00000004
7383 #define WMI_TX_SEND_FLAG_SET_IS_SA_QUERY_GET(tx_flags) WMI_GET_BITS(tx_flags, 2, 1)
7384 #define WMI_TX_SEND_FLAG_SET_IS_SA_QUERY_SET(tx_flags, value) WMI_SET_BITS(tx_flags, 2, 1, value)
7385 #define WMI_TX_SEND_FLAG_SET_P2P_FRAME_ON_STA_VDEV 0x00000008
7386 #define WMI_TX_SEND_FLAG_SET_P2P_FRAME_ON_STA_VDEV_GET(tx_flags) WMI_GET_BITS(tx_flags, 3, 1)
7387 #define WMI_TX_SEND_FLAG_SET_P2P_FRAME_ON_STA_VDEV_SET(tx_flags, value) WMI_SET_BITS(tx_flags, 3, 1, value)
7388 
7389 typedef struct {
7390     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_send_params */
7391 
7392     union {
7393         struct {
7394             /* DWORD 0: tx power, tx rate, retry_limit */
7395             A_UINT32
7396                 /* pwr -
7397                  * Specify what power the tx frame needs to be transmitted at.
7398                  * The power a signed (two's complement) value is in units of 0.5 dBm.
7399                  * The value needs to be appropriately sign-extended when extracting
7400                  * the value from the message and storing it in a variable that is
7401                  * larger than A_INT8.  (fw automatically handles this sign-extension.)
7402                  * If the transmission uses multiple tx chains, this power spec is
7403                  * the total transmit power, assuming incoherent combination of
7404                  * per-chain power to produce the total power.
7405                  */
7406                  pwr: 8,
7407 
7408                 /* mcs_mask -
7409                  * Specify the allowable values for MCS index (modulation and coding)
7410                  * to use for transmitting the frame.
7411                  *
7412                  * For HT / VHT preamble types, this mask directly corresponds to
7413                  * the HT or VHT MCS indices that are allowed.  For each bit N set
7414                  * within the mask, MCS index N is allowed for transmitting the frame.
7415                  * For legacy CCK and OFDM rates, separate bits are provided for CCK
7416                  * rates versus OFDM rates, so the host has the option of specifying
7417                  * that the target must transmit the frame with CCK or OFDM rates
7418                  * (not HT or VHT), but leaving the decision to the target whether
7419                  * to use CCK or OFDM.
7420                  *
7421                  * For CCK and OFDM, the bits within this mask are interpreted as
7422                  * follows:
7423                  *     bit  0 -> CCK 1 Mbps rate is allowed
7424                  *     bit  1 -> CCK 2 Mbps rate is allowed
7425                  *     bit  2 -> CCK 5.5 Mbps rate is allowed
7426                  *     bit  3 -> CCK 11 Mbps rate is allowed
7427                  *     bit  4 -> OFDM BPSK modulation, 1/2 coding rate is allowed
7428                  *     bit  5 -> OFDM BPSK modulation, 3/4 coding rate is allowed
7429                  *     bit  6 -> OFDM QPSK modulation, 1/2 coding rate is allowed
7430                  *     bit  7 -> OFDM QPSK modulation, 3/4 coding rate is allowed
7431                  *     bit  8 -> OFDM 16-QAM modulation, 1/2 coding rate is allowed
7432                  *     bit  9 -> OFDM 16-QAM modulation, 3/4 coding rate is allowed
7433                  *     bit 10 -> OFDM 64-QAM modulation, 2/3 coding rate is allowed
7434                  *     bit 11 -> OFDM 64-QAM modulation, 3/4 coding rate is allowed
7435                  *
7436                  * The MCS index specification needs to be compatible with the
7437                  * bandwidth mask specification.  For example, a MCS index == 9
7438                  * specification is inconsistent with a preamble type == VHT,
7439                  * Nss == 1, and channel bandwidth == 20 MHz.
7440                  *
7441                  * Furthermore, the host has only a limited ability to specify to
7442                  * the target to select from HT + legacy rates, or VHT + legacy rates,
7443                  * since this mcs_mask can specify either HT/VHT rates or legacy rates.
7444                  * If no bits are set, target can choose what MCS type to use.
7445                  */
7446                  mcs_mask: 12,
7447 
7448                 /* nss_mask -
7449                  * Specify which numbers of spatial streams (MIMO factor) are permitted.
7450                  * Each bit in this mask corresponds to a Nss value:
7451                  *     bit 0: if set, Nss = 1 (non-MIMO) is permitted
7452                  *     bit 1: if set, Nss = 2 (2x2 MIMO) is permitted
7453                  *     bit 2: if set, Nss = 3 (3x3 MIMO) is permitted
7454                  *     bit 3: if set, Nss = 4 (4x4 MIMO) is permitted
7455                  *     bit 4: if set, Nss = 5 (5x5 MIMO) is permitted
7456                  *     bit 5: if set, Nss = 6 (6x6 MIMO) is permitted
7457                  *     bit 6: if set, Nss = 7 (7x7 MIMO) is permitted
7458                  *     bit 7: if set, Nss = 8 (8x8 MIMO) is permitted
7459                  * The values in the Nss mask must be suitable for the recipient, e.g.
7460                  * a value of 0x4 (Nss = 3) cannot be specified for a tx frame to a
7461                  * recipient which only supports 2x2 MIMO.
7462                  * If no bits are set, target can choose what NSS type to use.
7463                  */
7464                  nss_mask: 8,
7465 
7466                 /* retry_limit -
7467                  * Specify the maximum number of transmissions, including the
7468                  * initial transmission, to attempt before giving up if no ack
7469                  * is received.
7470                  * If the tx rate is specified, then all retries shall use the
7471                  * same rate as the initial transmission.
7472                  * If no tx rate is specified, the target can choose whether to
7473                  * retain the original rate during the retransmissions, or to
7474                  * fall back to a more robust rate.
7475                  */
7476                  retry_limit: 4;
7477 
7478        };
7479        A_UINT32 tx_param_dword0;
7480     };
7481 
7482     union {
7483         struct {
7484             /* DWORD 1: tx chain mask, preamble_type, tx BW */
7485             A_UINT32
7486                 /* chain_mask - specify which chains to transmit from
7487                  * If not set, target will choose what chain_mask to use.
7488                  */
7489                 chain_mask: 8,
7490 
7491                 /* The bits in this mask correspond to the values as below
7492                  *     bit  0 -> 5MHz
7493                  *     bit  1 -> 10MHz
7494                  *     bit  2 -> 20MHz
7495                  *     bit  3 -> 40MHz
7496                  *     bit  4 -> 80MHz
7497                  *     bit  5 -> 160MHz
7498                  *     bit  6 -> 80_80MHz
7499                  * If no bits are set, target can choose what BW to use.
7500                  */
7501                 bw_mask: 7,
7502 
7503                 /* preamble_type_mask -
7504                  * Specify which preamble types (CCK, OFDM, HT, VHT) the target
7505                  * may choose from for transmitting this frame.
7506                  * Each bit in this mask corresponds to a preamble_type value:
7507                  *     bit 0: if set, OFDM
7508                  *     bit 1: if set, CCK
7509                  *     bit 2: if set, HT
7510                  *     bit 3: if set, VHT
7511                  *     bit 4: if set, HE
7512                  * If no bits are set, target can choose what preamble type to use.
7513                  */
7514                 preamble_type: 5,
7515 
7516                 /* Data:1 Mgmt:0 */
7517                 frame_type: 1,
7518 
7519                 /* Capture CFR when bit is set */
7520                 cfr_capture: 1,
7521 
7522                 /* Enables Beamforming when bit is set */
7523                 en_beamforming: 1,
7524 
7525                 /*
7526                  * Extra 3 bits of retry limit defined in tx_param_dword0,
7527                  * to allow maximum 127 retries for specific frames.
7528                  */
7529                 retry_limit_ext: 3,
7530 
7531                 reserved1_31_26: 6;
7532         };
7533         A_UINT32 tx_param_dword1;
7534     };
7535 } wmi_tx_send_params;
7536 
7537 #define WMI_MLO_MGMT_TID 0xFFFFFFFF
7538 
7539 typedef struct {
7540     A_UINT32 tlv_header; /* TLV tag (WMITLV_TAG_STRUC_wmi_mlo_tx_send_params) and len */
7541     A_UINT32 hw_link_id; /** Unique link id across SOCs, provided by QMI handshake.
7542                            * If WMI_MLO_MGMT_TID then the frame will be queued in the MLO queue
7543                            * If valid hw_link_id
7544                            */
7545 } wmi_mlo_tx_send_params;
7546 
7547 typedef struct {
7548     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param */
7549     A_UINT32 vdev_id;
7550     A_UINT32 desc_id;  /* echoed in tx_compl_event */
7551     A_UINT32 chanfreq; /* MHz units */
7552     /* WMI_MGMT_TX_SEND_CMDID is used for both pass by value and
7553      * pass by reference WMI management frames.
7554      *
7555      * a) If the command is for pass by reference,
7556      *    paddr_lo and padd_hi will hold the address of remote/host buffer
7557      * b) If the command is for pass by value,
7558      *    paddr_lo and paddr_hi will be NULL.
7559      */
7560     A_UINT32 paddr_lo;
7561     A_UINT32 paddr_hi;
7562     A_UINT32 frame_len;
7563     A_UINT32 buf_len;  /** Buffer length in bytes */
7564     /*
7565      * The frame which will have tx_params_valid set will be always be RAW
7566      * frame, as it will be tx'ed on non-pause tid
7567      */
7568     A_UINT32 tx_params_valid;
7569     /* tx_flags:
7570      * Extra flags when tx_params_valid is 0.
7571      * Refer to WMI_TX_SEND_FLAG_xxx defs regarding the meaning of the
7572      * bits within this field.
7573      */
7574     A_UINT32 tx_flags;
7575     /* peer_rssi:
7576      * If non-zero, indicates saved peer beacon/probe resp RSSI (dBm units)
7577      * ONLY for init connection auth/assoc pkt.
7578      */
7579     A_INT32 peer_rssi;
7580 
7581 
7582 /* This TLV is followed by array of bytes: First 64 bytes of management frame
7583  *   A_UINT8 bufp[];
7584  */
7585 /* This TLV is followed by wmi_tx_send_params
7586  * wmi_tx_send_params tx_send_params;
7587  * wmi_mlo_tx_send_params mlo_tx_send_params[];
7588  *     Note: WMI_MLO_MGMT_TID path validated for specific scenario
7589  *     (BTM Usecase). Full support is not available.
7590  * wmi_tx_send_params_ext tx_send_params_ext[0 or 1];
7591  */
7592 } wmi_mgmt_tx_send_cmd_fixed_param;
7593 
7594 typedef struct {
7595     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_send_cmd_fixed_param */
7596     A_UINT32 vdev_id;
7597     A_UINT32 desc_id;  /* echoed in tx_compl_event */
7598     A_UINT32 chanfreq; /* MHz units */
7599     A_UINT32 paddr_lo;
7600     A_UINT32 paddr_hi;
7601     A_UINT32 frame_len;
7602     A_UINT32 buf_len;  /** Buffer length in bytes */
7603     /* The frame which will have tx_params_valid set will be always be RAW
7604      * frame, as it will be tx'ed on non-pause tid
7605      */
7606     A_UINT32 tx_params_valid;
7607 
7608 /* This TLV is followed by array of bytes: First 64 bytes of frame
7609  *   A_UINT8 bufp[];
7610  */
7611 /* This TLV is followed by wmi_tx_send_params
7612  * wmi_tx_send_params tx_send_params;
7613  */
7614 } wmi_offchan_data_tx_send_cmd_fixed_param;
7615 
7616 typedef struct {
7617     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_qos_null_frame_tx_send_cmd_fixed_param */
7618     A_UINT32 vdev_id;
7619     A_UINT32 desc_id;  /* echoed in tx_compl_event */
7620     A_UINT32 paddr_lo; /* paddr_lo and padd_hi will hold the address of remote/host buffer, which is physical address of frame */
7621     A_UINT32 paddr_hi;
7622     A_UINT32 frame_len; /* Actual length of frame in bytes*/
7623     A_UINT32 buf_len;  /** Buffer length in bytes, length of data DMA'ed to FW from host */
7624 
7625 /* This fixed_param TLV is followed by the TLVs listed below:
7626  * 1.  ARRAY_BYTE TLV: First buf_len (expected to be 64) bytes of frame
7627  *     A_UINT8 bufp[];
7628  * 2.  wmi_tx_send_params tx_send_params;
7629  */
7630 } wmi_qos_null_frame_tx_send_cmd_fixed_param;
7631 
7632 typedef struct {
7633     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
7634     A_UINT32 value;
7635 } wmi_echo_event_fixed_param;
7636 
7637 typedef struct {
7638     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
7639     A_UINT32 value;
7640 } wmi_echo_cmd_fixed_param;
7641 
7642 typedef struct {
7643     A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to WMITLV_TAG_STRUC_wmi_mlo_link_disable_request_event_fixed_param  */
7644     /** AP MLD address request to be disabled some set of link */
7645     wmi_mac_addr mld_addr;
7646     /** Request link id set to disable */
7647     A_UINT32 linkid_bitmap;
7648 } wmi_mlo_link_disable_request_event_fixed_param;
7649 
7650 typedef enum {
7651     /**
7652      * Projects support to offload regulatory database by default.
7653      * If don`t offload regulatory database, host can set this bit.
7654      */
7655     WMI_REGDOMAIN_DATABASE_NO_OFFLOAD_BITMASK = 0x00000001,
7656 } WMI_REGDOMAIN_BITMASK;
7657 
7658 typedef struct {
7659     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param */
7660 
7661     /** pdev_id for identifying the MAC
7662      * See macros starting with WMI_PDEV_ID_ for values.
7663      */
7664     A_UINT32 pdev_id;
7665     /** reg domain code */
7666     A_UINT32 reg_domain;
7667     A_UINT32 reg_domain_2G; /* fulfil 2G domain ID */
7668     A_UINT32 reg_domain_5G; /* fulfil 5G domain ID */
7669     A_UINT32 conformance_test_limit_2G; /* 2G whole band CTL index */
7670     A_UINT32 conformance_test_limit_5G; /* 5G whole band CTL index */
7671     A_UINT32 dfs_domain;
7672 
7673     /**
7674      * The below conformance_test_limit index fields are for supporting the
7675      * 5G sub-band CTL feature.
7676      * Conformance test limits (CTLs) are the product-specific
7677      * regulatory-compliant powers stored in the board data file (BDF).
7678      * These CTLs within the BDF are identified by CTL index values.
7679      * For example, the BDF file is expected to contain CTL data for
7680      * FCC (CTL index = 0x10), ETSI (CTL index = 0x30),
7681      * Japan/MKK (CTL index = 0x40), Korea (CTL index = 0x50),
7682      * and China (CTL index = 0x60) CTL regions.
7683      * The target FW will use the CTL indices specified in this message to
7684      * find a BDF CTL entry with a matching CTL index value, and then use
7685      * that CTL as one of the inputs into the tx power limit computation.
7686      * A CTL index value of 0x0 is invalid, and will be ignored by the FW.
7687      */
7688     A_UINT32 conformance_test_limit_5G_subband_UNII1;
7689     A_UINT32 conformance_test_limit_5G_subband_UNII2a;
7690     A_UINT32 conformance_test_limit_5G_subband_UNII2c;
7691     A_UINT32 conformance_test_limit_5G_subband_UNII3;
7692     A_UINT32 conformance_test_limit_5G_subband_UNII4;
7693     /**
7694      * The below conformance_test_limit index fields are like the above,
7695      * but are for supporting the 6G sub-band CTL feature.
7696      */
7697     A_UINT32 conformance_test_limit_6G_subband_UNII5;
7698     A_UINT32 conformance_test_limit_6G_subband_UNII6;
7699     A_UINT32 conformance_test_limit_6G_subband_UNII7;
7700     A_UINT32 conformance_test_limit_6G_subband_UNII8;
7701 
7702     /**
7703      * In 6G sub-band CTL, fulfil 6G domain id and whole band CTL index firstly.
7704      * Unlike 5G sub-band CTL index fields, role ap and role client have
7705      * different indices.
7706      * Each role has 3 sub-band indices due to different power_mode type.
7707      * Below 3 represent for power_mode types: 0-LPI, 1-SP, 2-VLP
7708      * Below 2 represent for client_max: 0-default, 1-subordinate
7709      */
7710 
7711     A_UINT32 reg_domain_6G;  /* fulfil 6G domain id */
7712     A_UINT32 conformance_test_limit_6G; /* 6G whole band CTL index */
7713 
7714     A_UINT32 conformance_test_limit_6G_subband_UNII5_ap[3];
7715     A_UINT32 conformance_test_limit_6G_subband_UNII6_ap[3];
7716     A_UINT32 conformance_test_limit_6G_subband_UNII7_ap[3];
7717     A_UINT32 conformance_test_limit_6G_subband_UNII8_ap[3];
7718 
7719     A_UINT32 conformance_test_limit_6G_subband_UNII5_client[3][2];
7720     A_UINT32 conformance_test_limit_6G_subband_UNII6_client[3][2];
7721     A_UINT32 conformance_test_limit_6G_subband_UNII7_client[3][2];
7722     A_UINT32 conformance_test_limit_6G_subband_UNII8_client[3][2];
7723 
7724     /** reg domain bitmap */
7725     A_UINT32 regdomain_bitmap;
7726 } wmi_pdev_set_regdomain_cmd_fixed_param;
7727 
7728 typedef struct {
7729     /** TRUE for scan start and flase for scan end */
7730     A_UINT32 scan_start;
7731 } wmi_pdev_scan_cmd;
7732 
7733 /* WMI support for setting ratemask in target */
7734 
7735 typedef struct {
7736     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param */
7737     A_UINT32 vdev_id;
7738     /*
7739      * 0 - cck/ofdm
7740      * 1 - HT
7741      * 2 - VHT
7742      * 3 - HE
7743      * 4 - EHT
7744      *
7745      * Rate Bit mask format:
7746      *     <MCS in NSS MAX> ...
7747      *     <MCS MAX, ..., 2, 1, 0 : NSS2>
7748      *     <MCS MAX, ..., 2, 1, 0 : NSS1>
7749      * EHT Rate Bit Mask format:
7750      *     <MCS in NSS MAX> ...
7751      *     <MCS MAX, ... 2, 1, 0, -1, -2 : NSS2>
7752      *     <MCS MAX, ..., 2, 1, 0, -1(DCM), -2(EHT Dup) : NSS1>
7753      */
7754     A_UINT32 type;
7755 
7756     A_UINT32 mask_lower32;
7757     A_UINT32 mask_higher32;
7758     A_UINT32 mask_lower32_2;
7759     A_UINT32 mask_higher32_2;
7760 } wmi_vdev_config_ratemask_cmd_fixed_param;
7761 
7762 /* nrp action - Filter Neighbor Rx Packets  - add/remove filter */
7763 enum {
7764     WMI_FILTER_NRP_ACTION_ADD        = 0x1,
7765     WMI_FILTER_NRP_ACTION_REMOVE     = 0x2,
7766     WMI_FILTER_NRP_ACTION_GET_LIST   = 0x3,
7767 }; /* nrp - Neighbor Rx Packets */
7768 
7769 /* nrp type - Filter Neighbor Rx Packets  - ap/client addr */
7770 enum {
7771     WMI_FILTER_NRP_TYPE_AP_BSSID     = 0x1,
7772     WMI_FILTER_NRP_TYPE_STA_MACADDR  = 0x2,
7773 };
7774 
7775 /* nrp flag - Filter Neighbor Rx Packets
7776  * (capture flag, 2 & 3 not initially supported)
7777  */
7778 enum {
7779     WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS      = 0x1,
7780     WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS      = 0x2,
7781     WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS    = 0x3,
7782 };
7783 
7784 typedef struct {
7785     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param */
7786     A_UINT32 vdev_id;
7787     /* AP Bssid or Client Mac-addr */
7788     wmi_mac_addr addr;
7789     /* Add/Remove NRF Filter */
7790     A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
7791     /* client/ap filter */
7792     A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
7793     /* optional - tx/rx capture */
7794     A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
7795     /* BSSID index - index of the BSSID register */
7796     A_UINT32 bssid_idx;
7797 } wmi_vdev_filter_nrp_config_cmd_fixed_param; /* Filter for Neighbor Rx Packets */
7798 
7799 /* tx peer filter action - Filter Tx Packets  - add/remove filter */
7800 enum {
7801     WMI_PEER_TX_FILTER_ACTION_ADD                           = 1,
7802     WMI_PEER_TX_FILTER_ACTION_REMOVE                        = 2,
7803     WMI_PEER_TX_FILTER_ACTION_ADD_AND_ENABLE_FILTERING      = 3,
7804     WMI_PEER_TX_FILTER_ACTION_REMOVE_AND_CLEAR_FILTERING    = 4,
7805 };
7806 
7807 typedef struct {
7808     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tx_filter_cmd_fixed_param */
7809     A_UINT32 vdev_id;
7810     /* Client  MAC addr */
7811     wmi_mac_addr addr;
7812     /* Add/Remove monitor_sta Filter */
7813     A_UINT32 action; /* WMI_PEER_TX_FILTER_ACTION enum */
7814 } wmi_peer_tx_filter_cmd_fixed_param; /* Filter for TX Packets */
7815 
7816 /* Command to set/unset chip in quiet mode */
7817 typedef struct {
7818     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param */
7819     A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
7820     A_UINT32 period; /*period in TUs*/
7821     A_UINT32 duration; /*duration in TUs*/
7822     A_UINT32 next_start; /*offset in TUs*/
7823     A_UINT32 enabled; /*enable/disable*/
7824 } wmi_pdev_set_quiet_cmd_fixed_param;
7825 
7826 typedef struct {
7827     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param */
7828     A_UINT32 vdev_id;    /* Virtual interface ID */
7829     A_UINT32 period;     /* period in TUs */
7830     A_UINT32 duration;   /* duration in TUs */
7831     A_UINT32 next_start; /* offset in TUs */
7832     A_UINT32 enabled;    /* enable/disable */
7833 } wmi_vdev_set_quiet_cmd_fixed_param;
7834 
7835 /*
7836  * START_STOP flag value: 1 - Start, 0 - Stop
7837  */
7838 #define WMI_OFFLOAD_QUIET_FLAG_START_STOP              0x00000001
7839 /*
7840  * ONE_SHOT flag value: 1 - One shot, 0 - Repeat
7841  * This flag is only relevant if the START_STOP flag == 1 (start).
7842  */
7843 #define WMI_OFFLOAD_QUIET_FLAG_ONE_SHOT                0x00000002
7844 /*
7845  * Enable/Disable sending Quiet IE info in SWBA event from the target
7846  * 0 - Don't include Quiet IE in WMI SWBA Event
7847  * 1 - Include Quiet IE in WMI SWBA Event
7848  */
7849 #define WMI_OFFLOAD_QUIET_FLAG_INFO_IN_SWBA_START_STOP 0x00000004
7850 
7851 typedef struct {
7852     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_offload_ml_quiet_config_params */
7853     A_UINT32 vdev_id;    /* partner vdev_id */
7854     A_UINT32 hw_link_id; /* hw_link_id: Unique link id across SOCs, got as part of QMI handshake */
7855     A_UINT32 beacon_interval; /* beacon interval in TU from received beacon of the partner link */
7856     A_UINT32 period;     /* period in TUs */
7857     A_UINT32 duration;   /* duration in TUs */
7858     A_UINT32 next_start; /* offset in TUs from beacon */
7859     A_UINT32 flags;      /* STOP or START (and single vs. repeated) Quiet IE
7860                           * See WMI_OFFLOAD_QUIET_FLAG_xxx defs.
7861                           */
7862 } wmi_vdev_bcn_offload_ml_quiet_config_params;
7863 
7864 typedef struct {
7865     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param */
7866     A_UINT32 vdev_id;    /* Virtual interface ID */
7867     A_UINT32 period;     /* period in TUs */
7868     A_UINT32 duration;   /* duration in TUs */
7869     A_UINT32 next_start; /* offset in TUs from beacon */
7870     A_UINT32 flags;      /* STOP or START (and single vs. repeated) Quiet IE
7871                           * See WMI_OFFLOAD_QUIET_FLAG_xxx defs.
7872                           */
7873 /*
7874  * This TLV is optionally followed by array of wmi_vdev_bcn_offload_ml_quiet_config_params struct
7875  * wmi_vdev_bcn_offload_ml_quiet_config_params will have multiple instances equal to num of links in an AP MLD
7876  *   wmi_vdev_bcn_offload_ml_quiet_config_params ml_quiet_param[];
7877  */
7878 } wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param;
7879 
7880 typedef struct {
7881     A_UINT32 tlv_header;   /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param */
7882     A_UINT32 vdev_id;      /* vdev id indicating to which the vdev custom aggregation size will be applied. */
7883     /* Size for tx aggregation for the vdev mentioned in vdev id
7884      * (max MPDUs per A-MPDU or max MSDUs per A-MSDU based on aggr_type field)
7885      */
7886     A_UINT32 tx_aggr_size;
7887 
7888     A_UINT32 rx_aggr_size; /* Size for rx aggregation (block ack window size limit) for the vdev mentioned in vdev id */
7889 
7890     /*
7891      * To set TX aggregation size limits per VDEV per AC
7892      * bits 1:0 (ac):
7893      *     Access Category (0x0=BE, 0x1=BK, 0x2=VI, 0x3=VO)
7894      *     If tx_ac_enable bit is not set, tx_aggr_size is applied
7895      *     for all Access Categories
7896      * bit 2 (aggr_type):             TX Aggregation Type (0=A-MPDU, 1=A-MSDU)
7897      * bit 3 (tx_aggr_size_disable):  If set tx_aggr_size is invalid
7898      * bit 4 (rx_aggr_size_disable):  If set rx_aggr_size is invalid
7899      * bit 5 (tx_ac_enable):          If set, above ac bitmap is valid.
7900      * bit 6 (256 BA support enable)  If set, Default 256 BA size is expected
7901      *                                from host
7902      * bit 7 (1024 BA support enable) If set, Default 1024 BA size is expected
7903      *                                from host
7904      * bits 31:8:                     Reserved bits. should be set to zero.
7905      */
7906     A_UINT32 enable_bitmap;
7907 } wmi_vdev_set_custom_aggr_size_cmd_fixed_param;
7908 
7909 typedef enum {
7910     WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU = 0,
7911     WMI_VDEV_CUSTOM_AGGR_TYPE_AMSDU = 1,
7912     WMI_VDEV_CUSTOM_AGGR_TYPE_MAX,
7913 } wmi_vdev_custom_aggr_type_t;
7914 
7915 #define WMI_VDEV_CUSTOM_AGGR_AC_BITPOS           0
7916 #define WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS         2
7917 #define WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS         2
7918 #define WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS       1
7919 #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS    3
7920 #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS  1
7921 #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS    4
7922 #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS  1
7923 #define WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS          5
7924 #define WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS        1
7925 #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_BITPOS    6
7926 #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_NUM_BITS  1
7927 #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_BITPOS   7
7928 #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_NUM_BITS 1
7929 
7930 #define WMI_VDEV_CUSTOM_AGGR_AC_SET(param, value) \
7931     WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
7932         WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS, value)
7933 #define WMI_VDEV_CUSTOM_AGGR_AC_GET(param)         \
7934     WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
7935         WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS)
7936 
7937 #define WMI_VDEV_CUSTOM_AGGR_TYPE_SET(param, value) \
7938     WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
7939         WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS, value)
7940 #define WMI_VDEV_CUSTOM_AGGR_TYPE_GET(param)         \
7941     WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
7942         WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS)
7943 
7944 #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_SET(param, value) \
7945     WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
7946         WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS, value)
7947 #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_GET(param)         \
7948     WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
7949         WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS)
7950 
7951 #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_SET(param, value) \
7952     WMI_SET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
7953         WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS, value)
7954 #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_GET(param)         \
7955     WMI_GET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
7956         WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS)
7957 
7958 #define WMI_VDEV_CUSTOM_TX_AC_EN_SET(param, value) \
7959     WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
7960         WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS, value)
7961 #define WMI_VDEV_CUSTOM_TX_AC_EN_GET(param)         \
7962     WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
7963         WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS)
7964 
7965 #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_SET(param, value) \
7966     WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_256_BA_EN_BITPOS, \
7967         WMI_VDEV_CUSTOM_AGGR_256_BA_EN_NUM_BITS, value)
7968 #define WMI_VDEV_CUSTOM_AGGR_256_BA_EN_GET(param)         \
7969     WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_256_BA_EN_BITPOS, \
7970         WMI_VDEV_CUSTOM_AGGR_256_BA_EN_NUM_BITS)
7971 
7972 #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_SET(param, value) \
7973     WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_BITPOS, \
7974         WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_NUM_BITS, value)
7975 #define WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_GET(param)         \
7976     WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_BITPOS, \
7977         WMI_VDEV_CUSTOM_AGGR_1024_BA_EN_NUM_BITS)
7978 
7979 typedef enum {
7980     WMI_VDEV_CUSTOM_SW_RETRY_TYPE_NONAGGR = 0,
7981     WMI_VDEV_CUSTOM_SW_RETRY_TYPE_AGGR = 1,
7982     WMI_VDEV_CUSTOM_SW_RETRY_TYPE_MAX,
7983 } wmi_vdev_custom_sw_retry_type_t;
7984 
7985 typedef struct {
7986     A_UINT32 tlv_header;   /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param */
7987     A_UINT32 vdev_id;      /* vdev id indicating to which the vdev custom software retries will be applied. */
7988     A_UINT32 ac_type;      /* access category (VI, VO, BE, BK) enum wmi_traffic_ac */
7989     A_UINT32 sw_retry_type; /* 0 = non-aggr retry, 1 = aggr retry (wmi_vdev_custom_sw_retry_type_t enum) */
7990     A_UINT32 sw_retry_th;   /* max retry count per AC base on ac_type for the vdev mentioned in vdev id*/
7991 } wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param;
7992 
7993 typedef struct {
7994     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_chainmask_config_cmd_fixed_param */
7995     A_UINT32 tlv_header;
7996     /* vdev id indicating to which the vdev, this chainmask configuration will be applied. */
7997     A_UINT32 vdev_id;
7998     /* number of chains to use for transmissions in 2.4 GHz band
7999      * If vdev is MLO vdev, below 2g params apply to all 2.4 GHz band links
8000      * If vdev is MLO vdev, below 5g params apply to all 5/6 GHz band links
8001      */
8002     A_UINT32 num_tx_chains_2g;
8003     /* number of chains to use for reception in 2.4 GHz band */
8004     A_UINT32 num_rx_chains_2g;
8005     /* nss to use for transmissions in 2.4 GHz band */
8006     A_UINT32 tx_nss_2g;
8007     /* nss to use for reception in 2.4 GHz band */
8008     A_UINT32 rx_nss_2g;
8009     /* number of chains to use for 11b transmissions. Valid only in 2.4 GHz */
8010     A_UINT32 num_tx_chains_b;
8011     /* number of chains to use for 11g transmissions. Valid only in 2.4 GHz */
8012     A_UINT32 num_tx_chains_g;
8013     /* number of chains to use for transmissions in 5 GHz band */
8014     A_UINT32 num_tx_chains_5g;
8015     /* number of chains to use for reception in 5 GHz band */
8016     A_UINT32 num_rx_chains_5g;
8017     /* nss to use for transmissions in 5 GHz band */
8018     A_UINT32 tx_nss_5g;
8019     /* nss to use for reception in 5 GHz band */
8020     A_UINT32 rx_nss_5g;
8021     /* number of chains to use for 11a transmissions. Valid only in 5 GHz */
8022     A_UINT32 num_tx_chains_a;
8023     /* If non-zero then use only one chain for TX when connection tx_nss is 1 in 2.4 GHz */
8024     A_UINT32 disable_tx_mrc_2g;
8025     /* If non-zero then use only one chain for RX when connection rx_nss is 1 in 2.4 GHz */
8026     A_UINT32 disable_rx_mrc_2g;
8027     /* If non-zero then use only one chain for TX when connection tx_nss is 1 in 5 GHz */
8028     A_UINT32 disable_tx_mrc_5g;
8029     /* If non-zero then use only one chain for RX when connection rx_nss is 1 in 5 GHz */
8030     A_UINT32 disable_rx_mrc_5g;
8031     /* Whether fast chain selection is needed when TX chain num is 1 */
8032     A_UINT32 fast_chain_selection;
8033     /* RSSI delta threshold to determine better chain, units: dB */
8034     A_UINT32 better_chain_rssi_threshold;
8035 } wmi_vdev_chainmask_config_cmd_fixed_param;
8036 
8037 /*
8038  * Command to enable/disable Green AP Power Save.
8039  * This helps conserve power during AP operation. When the AP has no
8040  * stations associated with it, the host can enable Green AP Power Save
8041  * to request the firmware to shut down all but one transmit and receive
8042  * chains.
8043  */
8044 typedef struct {
8045     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param */
8046     /** pdev_id for identifying the MAC
8047      * See macros starting with WMI_PDEV_ID_ for values.
8048      */
8049     A_UINT32 pdev_id;
8050     A_UINT32 enable; /*1:enable, 0:disable*/
8051 } wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
8052 
8053 
8054 #define MAX_HT_IE_LEN 32
8055 /* DEPRECATED */
8056 typedef struct {
8057     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
8058     A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
8059     A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
8060     A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
8061     A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
8062 /** The TLV for the HT IE follows:
8063  *       A_UINT32 ie_data[];
8064  */
8065 } wmi_pdev_set_ht_ie_cmd_fixed_param;
8066 
8067 #define MAX_VHT_IE_LEN 32
8068 /* DEPRECATED */
8069 typedef struct {
8070     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
8071     A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
8072     A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
8073     A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
8074     A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
8075 /** The TLV for the VHT IE follows:
8076  *       A_UINT32 ie_data[];
8077  */
8078 } wmi_pdev_set_vht_ie_cmd_fixed_param;
8079 
8080 typedef struct {
8081     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param */
8082     /** pdev_id for identifying the MAC
8083      * See macros starting with WMI_PDEV_ID_ for values.
8084      */
8085     A_UINT32 pdev_id;
8086     wmi_mac_addr base_macaddr;
8087 } wmi_pdev_set_base_macaddr_cmd_fixed_param;
8088 
8089 
8090 enum wmi_spectral_scan_mode {
8091     WMI_SPECTRAL_SCAN_NORMAL_MODE,
8092     WMI_SPECTRAL_SCAN_AGILE_MODE,
8093 
8094     WMI_SPECTRAL_SCAN_MAX_MODE /* keep this last */
8095 };
8096 
8097 /*
8098  * For now, the spectral configuration is global rather than
8099  * per-vdev.  The vdev is a placeholder and will be ignored
8100  * by the firmware.
8101  */
8102 typedef struct {
8103     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
8104     A_UINT32 vdev_id;
8105     A_UINT32 spectral_scan_count;
8106     A_UINT32 spectral_scan_period;
8107     A_UINT32 spectral_scan_priority;
8108     A_UINT32 spectral_scan_fft_size;
8109     A_UINT32 spectral_scan_gc_ena;
8110     A_UINT32 spectral_scan_restart_ena;
8111     A_UINT32 spectral_scan_noise_floor_ref;
8112     A_UINT32 spectral_scan_init_delay;
8113     A_UINT32 spectral_scan_nb_tone_thr;
8114     A_UINT32 spectral_scan_str_bin_thr;
8115     A_UINT32 spectral_scan_wb_rpt_mode;
8116     A_UINT32 spectral_scan_rssi_rpt_mode;
8117     A_UINT32 spectral_scan_rssi_thr;
8118     A_UINT32 spectral_scan_pwr_format;
8119     A_UINT32 spectral_scan_rpt_mode;
8120     A_UINT32 spectral_scan_bin_scale;
8121     A_UINT32 spectral_scan_dBm_adj;
8122     A_UINT32 spectral_scan_chn_mask;
8123     /* See enum wmi_spectral_scan_mode */
8124     A_UINT32 spectral_scan_mode;
8125     union {
8126         /**
8127          * Two center frequencies are required for agile channel switch
8128          * supporting True 160 and Restricted 160 ((80+80) or 165) MHz.
8129          * This parameter specifies the center frequency for cases with a
8130          * contiguous channel, and the center frequency of the primary
8131          * portion of a non-contiguous (80+80 or 165 MHz) channel.
8132          */
8133         A_UINT32 spectral_scan_center_freq;
8134         A_UINT32 spectral_scan_center_freq1;
8135     };
8136     /* agile span primary channel frequency (MHz), 0 for normal scan*/
8137     A_UINT32 spectral_scan_chan_freq;
8138     /* agile scan bandwidth (20, 40, 80, 80+80, 160), enum wmi_channel_width */
8139     A_UINT32 spectral_scan_chan_width;
8140     /**
8141      * Adding freq2 to support True 160 and restricted 160 ((80+80) or 165) MHz.
8142      * agile span center frequency2 (MHz), 0 for normal scan.
8143      */
8144     A_UINT32 spectral_scan_center_freq2;
8145     /**
8146      * Flag to enable re-capture of FFT sample if the previous sample has
8147      * AGC gain change bit set.
8148      * Re-capture will be enabled only if scan period is greater than 50us.
8149      */
8150     A_UINT32 recapture_sample_on_gain_change;
8151 } wmi_vdev_spectral_configure_cmd_fixed_param;
8152 
8153 /*
8154  * Enabling, disabling and triggering the spectral scan
8155  * is a per-vdev operation.  That is, it will set channel
8156  * flags per vdev rather than globally; so concurrent scan/run
8157  * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
8158  */
8159 typedef struct {
8160     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
8161     A_UINT32 vdev_id;
8162     /* 0 - ignore; 1 - trigger, 2 - clear trigger */
8163     A_UINT32 trigger_cmd;
8164     /* 0 - ignore; 1 - enable, 2 - disable */
8165     A_UINT32 enable_cmd;
8166     /* See enum wmi_spectral_scan_mode */
8167     A_UINT32 spectral_scan_mode;
8168 } wmi_vdev_spectral_enable_cmd_fixed_param;
8169 
8170 typedef struct {
8171     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_tx_power_cmd_fixed_param */
8172     A_UINT32 vdev_id;
8173 } wmi_vdev_get_tx_power_cmd_fixed_param;
8174 
8175 /* Primary 80 bin values */
8176 #define WMI_SSCAN_PRI80_START_BIN_GET(pri80_bins)        WMI_GET_BITS(pri80_bins, 0, 16)
8177 #define WMI_SSCAN_PRI80_START_BIN_SET(pri80_bins, value) WMI_SET_BITS(pri80_bins, 0, 16, value)
8178 #define WMI_SSCAN_PRI80_END_BIN_GET(pri80_bins)          WMI_GET_BITS(pri80_bins, 16, 16)
8179 #define WMI_SSCAN_PRI80_END_BIN_SET(pri80_bins, value)   WMI_SET_BITS(pri80_bins, 16, 16, value)
8180 
8181 /* Secondary 80 bin values */
8182 #define WMI_SSCAN_SEC80_START_BIN_GET(sec80_bins)        WMI_GET_BITS(sec80_bins, 0, 16)
8183 #define WMI_SSCAN_SEC80_START_BIN_SET(sec80_bins, value) WMI_SET_BITS(sec80_bins, 0, 16, value)
8184 #define WMI_SSCAN_SEC80_END_BIN_GET(sec80_bins)          WMI_GET_BITS(sec80_bins, 16, 16)
8185 #define WMI_SSCAN_SEC80_END_BIN_SET(sec80_bins, value)   WMI_SET_BITS(sec80_bins, 16, 16, value)
8186 
8187 /* 5MHz bin values */
8188 #define WMI_SSCAN_MID_5MHZ_START_BIN_GET(mid_5mhz_bins)        WMI_GET_BITS(mid_5mhz_bins, 0, 16)
8189 #define WMI_SSCAN_MID_5MHZ_START_BIN_SET(mid_5mhz_bins, value) WMI_SET_BITS(mid_5mhz_bins, 0, 16, value)
8190 #define WMI_SSCAN_MID_5MHZ_END_BIN_GET(mid_5mhz_bins)          WMI_GET_BITS(mid_5mhz_bins, 16, 16)
8191 #define WMI_SSCAN_MID_5MHZ_END_BIN_SET(mid_5mhz_bins, value)   WMI_SET_BITS(mid_5mhz_bins, 16, 16, value)
8192 
8193 typedef struct {
8194     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_fw_cmd_fixed_param */
8195     A_UINT32 pdev_id;
8196 
8197     /* See enum wmi_spectral_scan_mode */
8198     A_UINT32 spectral_scan_mode;
8199 
8200     /**
8201       * This fixed_param TLV is followed by the below TLVs:
8202       *
8203       * wmi_pdev_sscan_fft_bin_index fft_bin_index[]; // array len = 0 or 1
8204       *     If present (array length is 1) this TLV specifies the primary
8205       *     and secondary channels FFT bin indices for True 160 and
8206       *     Restricted 160 (80+80 or 165) MHz BW cases.
8207       */
8208 } wmi_pdev_sscan_fw_cmd_fixed_param;
8209 
8210 /**
8211  * The below structure is used only to send the FFT bin numbers for
8212  * True 160 and Restricted 160(80+80 or 165) MHz from FW to HOST
8213  */
8214 typedef struct {
8215     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_fft_bin_index */
8216 
8217     /**
8218      * Bit 15 -  0 : primary 80 start bin number
8219      * Bit 31 - 16 : primary 80 end bin number
8220      * Refer to WMI_SSCAN_PRI80_[START,END]_BIN_[GET,SET] macros.
8221      * Only for True 160 and Restricted 160(80+80 or 165) MHz this
8222      * will be filled.
8223      */
8224     A_UINT32 pri80_bins;
8225 
8226     /**
8227      * Bit 15 -  0 : secondary 80 start bin number
8228      * Bit 31 - 16 : secondary 80 end bin number
8229      * Refer to WMI_SSCAN_SEC80_[START,END]_BIN_[GET,SET] macros.
8230      * Only for True 160 and Restricted 160(80+80 or 165) MHz this
8231      * will be filled.
8232      */
8233     A_UINT32 sec80_bins;
8234 
8235     /**
8236      * Bit 15 -  0 : 5Mhz start bin number
8237      * Bit 31 - 16 : 5Mhz end bin number
8238      * Refer to WMI_SSCAN_MID_5MHZ_[START,END]_BIN_[GET,SET] macros.
8239      * Only for Restricted 160(80+80 or 165), otherwise 0.
8240      */
8241     A_UINT32 mid_5mhz_bins;
8242 } wmi_pdev_sscan_fft_bin_index;
8243 
8244 #define WMI_SPECTRAL_CHAN_PUNCTURE_BMAP_GET(puncture_bmap) WMI_GET_BITS(puncture_bmap, 0, 16)
8245 #define WMI_SPECTRAL_CHAN_PUNCTURE_BMAP_SET(puncture_bmap, value) WMI_SET_BITS(puncture_bmap, 0 , 16, value)
8246 
8247 typedef struct {
8248     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_chan_info */
8249     /*
8250      *  For contiguous channels, cfreq1 should be represent the center of the entire span and
8251      *  cfreq2 should be 0 whereas for non-contiguous channels, cfreq1 should represent the
8252      *  center of primary segment whereas cfreq2 should represent the center of secondary segment
8253     */
8254     /* Information corresponding to operating channel */
8255     A_UINT32 operating_pri20_freq; /* In MHz */
8256     A_UINT32 operating_cfreq1;     /* In MHz */
8257     A_UINT32 operating_cfreq2;     /* In MHz */
8258     A_UINT32 operating_bw;         /* as per enum wmi_channel_width */
8259     /*
8260      * bits [15:0] are used to represent puncture modes where each bit indicates
8261      * whether that 20MHz channel is punctured.
8262      * bits [31:16] are reserved.
8263      */
8264     A_UINT32 operating_puncture_20mhz_bitmap;
8265 
8266     /* Information corresponding to channel in which spectral scan is done */
8267     A_UINT32 sscan_cfreq1; /* In MHz */
8268     A_UINT32 sscan_cfreq2; /* In MHz */
8269     A_UINT32 sscan_bw; /*  as per enum wmi_channel_width */
8270     /*
8271      * bits [15:0] are used to represent puncture modes where each bit indicates
8272      * whether that 20MHz channel is punctured.
8273      * bits [31:16] are reserved.
8274      */
8275     A_UINT32 sscan_puncture_20mhz_bitmap;
8276 } wmi_pdev_sscan_chan_info;
8277 
8278 typedef struct
8279 {
8280      A_UINT32 tlv_header;  /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sscan_per_detector_info */
8281      A_UINT32 detector_id; /** ID of the detector involved in the spectral scan */
8282      /*
8283       * Start/End frequency (in MHz) to indicate the frequency range to which the detector is listening
8284      */
8285      A_UINT32 start_freq;       /* in MHz */
8286      A_UINT32 end_freq;         /* in MHz */
8287 } wmi_pdev_sscan_per_detector_info;
8288 
8289 typedef enum {
8290     /** Enum to indicate bmsk of spectral scan stop evt on scan count max out */
8291     WMI_SSCAN_EVT_BMSK_SCAN_STOP_SCOUNT = 0X00000001,
8292 
8293 
8294     /** Add more event code bmsks above this */
8295     WMI_SSCAN_EVT_BMSK_MAX = 0Xffffffff,
8296 } wmi_sscan_evt_message_code;
8297 
8298 /**
8299  * The below structure is used to send the start/stop triggers
8300  * for events related to spectral scan activity from
8301  * FW to host
8302  */
8303 typedef struct {
8304     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sscan_evt_message_fixed_param */
8305     A_UINT32 pdev_id;
8306 
8307     /** Refer Enum wmi_sscan_evt_message_code */
8308     A_UINT32 sscan_evt_code;
8309 } wmi_sscan_evt_message_fixed_param;
8310 
8311 #define WMI_BEACON_CTRL_TX_DISABLE  0
8312 #define WMI_BEACON_CTRL_TX_ENABLE   1
8313 #define WMI_BEACON_CTRL_SWBA_EVENT_DISABLE  2
8314 #define WMI_BEACON_CTRL_SWBA_EVENT_ENABLE   3
8315 
8316 typedef struct {
8317     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_offload_ctrl_cmd_fixed_param */
8318     /** unique id identifying the VDEV, generated by the caller */
8319     A_UINT32 vdev_id;
8320     A_UINT32 bcn_ctrl_op; /* fw default 1 (see WMI_BEACON_CTRL defs) */
8321 } wmi_bcn_offload_ctrl_cmd_fixed_param;
8322 
8323 /** common structure used for wmi_vedv_get_tx_power_event */
8324 typedef struct {
8325     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_tx_power_event_fixed_param */
8326     A_UINT32 tx_power; /** units: 0.5 dBm, per-chain tx power */
8327     A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller */
8328 } wmi_vdev_get_tx_power_event_fixed_param;
8329 
8330 typedef enum {
8331     /** Limit the offchannel duration */
8332     WMI_VDEV_LIMIT_OFFCHAN_ENABLE   = 0x1,
8333     /** Skip DFS channels from Scan channel list.
8334      *  valid for both host scans and FW scans */
8335     WMI_VDEV_LIMIT_OFFCHAN_SKIP_DFS = 0x2,
8336 } wmi_vdev_limit_offchan_flags;
8337 
8338 typedef struct {
8339     A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_vdev_limit_offchan_cmd_fixed_param */
8340     /** Limit the duration of offchannel events requested by the vdev corresponding to the specified vdev_id */
8341     A_UINT32 vdev_id;
8342     /** see enum wmi_vdev_limit_offchan_flags */
8343     A_UINT32 flags;
8344     /** max offchannel time allowed in msec when WMI_VDEV_LIMIT_OFFCHAN_ENABLE flag is set */
8345     A_UINT32 max_offchan_time;
8346     /** rest time in msec on the BSS channel */
8347     A_UINT32 rest_time;
8348 } wmi_vdev_limit_offchan_cmd_fixed_param;
8349 
8350 #define WMI_CSA_EVENT_QSBW_ISE_ID_MASK    0x000000FF /* information sub element id for QSBW, expected value is 0x02 */
8351 #define WMI_CSA_EVENT_QSBW_ISE_LEN_MASK   0x0000FF00 /* length of QSBW ISE data, expected value is 0x02 */
8352 #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) */
8353 #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) */
8354 
8355 #define WMI_CSA_EVENT_QSBW_ISE_ID 0x02
8356 #define WMI_CSA_EVENT_QSBW_ISE_LEN 0x02
8357 
8358 #define WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK  0x01
8359 #define WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK  0x02
8360 
8361 #define WMI_CSA_EVENT_QSBW_ISE_CAP_5M(qsbw_ise) \
8362     (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
8363 #define WMI_CSA_EVENT_QSBW_ISE_CAP_10M(qsbw_ise) \
8364     (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
8365 #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_5M(qsbw_ise) \
8366     (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
8367 #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_10M(qsbw_ise) \
8368     (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
8369 
8370 typedef enum {
8371     WMI_CSA_IE_PRESENT    = 0x00000001,
8372     WMI_XCSA_IE_PRESENT   = 0x00000002,
8373     WMI_WBW_IE_PRESENT    = 0x00000004,
8374     WMI_CSWRAP_IE_PRESENT = 0x00000008,
8375     WMI_CSWARP_IE_PRESENT = WMI_CSWRAP_IE_PRESENT, /* deprecated: typo */
8376     WMI_QSBW_ISE_PRESENT  = 0x00000010,
8377     WMI_CSWRAP_IE_EXTENDED_PRESENT = 0x00000020, /* Added bitmask to verify if the additional information is filled in */
8378     WMI_CSWRAP_IE_EXT_VER_2_PRESENT = 0x00000040 /* Added bitmask to see if additional info is present in CS wrap IE */
8379 } WMI_CSA_EVENT_IES_PRESENT_FLAG;
8380 
8381 /* wmi CSA receive event from beacon frame */
8382 typedef struct {
8383     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
8384     A_UINT32 i_fc_dur; /* Bit 0-15: FC, Bit 16-31: DUR */
8385     wmi_mac_addr i_addr1;
8386     wmi_mac_addr i_addr2;
8387     /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
8388      * changed in the future without breaking WMI compatibility */
8389     A_UINT32 csa_ie[2];
8390     A_UINT32 xcsa_ie[2];
8391     A_UINT32 wb_ie[2];
8392     union {
8393         A_UINT32 cswrap_ie; /* use this */
8394         A_UINT32 cswarp_ie; /* deprecated (typo) */
8395     };
8396     A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
8397     A_UINT32 qsbw_ise;
8398     /* cswrap_ie_extended:
8399      * Stores full IEEE80211_ELEMID_CHAN_SWITCH_WRAP information element.
8400      * The first two octets host the Element ID and Length fields.
8401      * The IE comprises New Country Subelement (optional and max length 6),
8402      * Wide Bandwidth Channel Subelement (optional and max length 5) and
8403      * New Transmit Power Envelope subelement (optional and max length 7)
8404      * The 4-byte words within cswrap_ie_extended[] use little endian ordering;
8405      * the first octect of the IE resides in bits 7:0 of cswrap_ie_extended[0],
8406      * the second octet resides in bits 15:8 of cswrap_ie_extended[0] and so on.
8407      */
8408     A_UINT32 cswrap_ie_extended[5];
8409 
8410     /* num_bytes_valid_in_cswrap_ie_ext_ver2:
8411      * This fixed_param TLV can be followed by a VAR length TLV
8412      * variable-length byte-array TLV for CS WRAP IE.
8413      * Since the variable-length byte-array TLVs are always padded, if needed,
8414      * to contain a multiple of 4 bytes, this field shows how many of the bytes
8415      * contain valid data, versus how many are only for alignment padding.
8416      */
8417     A_UINT32 num_bytes_valid_in_cswrap_ie_ext_ver2;
8418 
8419     /*
8420      * Add link id, mld address and link address
8421      * fields for N link CSA support
8422      */
8423     A_UINT32 link_id; /* Link id associated with AP */
8424     wmi_mac_addr mld_mac_address; /* AP mld mac address */
8425     wmi_mac_addr link_mac_address; /* AP link mac address */
8426     A_UINT32 mld_mac_address_present :1,
8427              link_mac_address_present :1,
8428              link_id_present :1,
8429              reserved :29;
8430 /*
8431  * This initial fixed_param TLV may be followed by the below TLVs:
8432  *   - cs_wrap_ie variable-length byte-array TLV
8433  */
8434 } wmi_csa_event_fixed_param;
8435 
8436 #define WMI_GET_MLD_MAC_ADDRESS_PRESENT(mld_mac_address_present) \
8437     WMI_GET_BITS(mld_mac_address_present, 0, 1)
8438 #define WMI_SET_MLD_MAC_ADDRESS_PRESENT(mld_mac_address_present, value) \
8439     WMI_SET_BITS(mld_mac_address_present, 0, 1, value)
8440 
8441 #define WMI_GET_LINK_ADDRESS_PRESENT(link_mac_address_present) \
8442     WMI_GET_BITS(link_mac_address_present, 1, 1)
8443 #define WMI_SET_LINK_ADDRESS_PRESENT(link_mac_address_present, value) \
8444     WMI_SET_BITS(link_mac_address_present, 1, 1, value)
8445 
8446 #define WMI_GET_LINK_ID_PRESENT(link_id_present) \
8447     WMI_GET_BITS(link_id_present, 2, 1)
8448 #define WMI_SET_LINK_ID_PRESENT(link_id_present, value) \
8449     WMI_SET_BITS(link_id_present, 2, 1, value)
8450 
8451 typedef enum {
8452     WMI_QUIET_EVENT_START = 0,
8453     WMI_QUIET_EVENT_STOP  = 1,
8454 } WMI_QUIET_EVENT_FLAG;
8455 
8456 /* WMI Quiet receive event from beacon frame */
8457 typedef struct {
8458     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_quiet_event_fixed_param */
8459     wmi_mac_addr mld_mac_address; /* AP mld mac address */
8460     wmi_mac_addr link_mac_address; /* AP link mac address */
8461     A_UINT32 linkid; /* Link id associated with AP */
8462     A_UINT32 mld_mac_address_present :1,
8463              link_mac_address_present :1,
8464              linkid_present :1,
8465              reserved :29;
8466     A_UINT32 quiet_status; /* WMI_QUIET_EVENT_FLAG: quiet start or stop */
8467 } wmi_quiet_event_fixed_param;
8468 
8469 typedef enum {
8470     WAL_PEER_MCAST2UCAST_DISABLED    = 0,
8471     WAL_PEER_MCAST2UCAST_DROP_EMPTY  = 1, /* Drop the frames if match is not found */
8472     WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2, /* Send as mcast if match is not found */
8473 } WMI_PEER_MCAST2UCAST_MODE;
8474 
8475 typedef enum {
8476     PKT_PWR_SAVE_NAP_ENABLE     = 0x00000001,
8477     PKT_PWR_SAVE_LS_ENABLE      = 0x00000002,
8478     PKT_PWR_SAVE_DS_ENABLE      = 0x00000004,
8479 
8480     PKT_PWR_SAVE_BTCOEX_ENABLE  = 0x00000008,
8481 
8482     PKT_PWR_SAVE_FSM_ENABLE     = 0x80000000,
8483 } WMI_PDEV_PKT_PWR_SAVE_LEVEL;
8484 
8485 /** MACROs to get user setting for enabling/disabling Secondary Rate Feature set
8486  * Bit-0    : Enable/Disable Control for "PPDU Secondary Retry Support"
8487  * Bit-1    : Enable/Disable Control for "RTS Black/White-listing Support"
8488  * Bit-2    : Enable/Disable Control for "Higher MCS retry restriction on XRETRY failures"
8489  * Bit 3-5  : "Xretry threshold" to use
8490  * Bit 6~31 : reserved for future use.
8491  */
8492 #define WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT_S      0
8493 #define WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT        0x00000001
8494 #define WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT_S           1
8495 #define WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT             0x00000002
8496 #define WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION_S  2
8497 #define WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION    0x00000004
8498 #define WMI_PDEV_PARAM_XRETRY_THRESHOLD_S               3
8499 #define WMI_PDEV_PARAM_XRETRY_THRESHOLD                 0x00000038
8500 
8501 #define WMI_PDEV_PARAM_IS_SECONDARY_RATE_ENABLED(word32)            WMI_F_MS(word32, WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT)
8502 #define WMI_PDEV_PARAM_IS_RTS_BL_WL_ENABLED(word32)                 WMI_F_MS(word32, WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT)
8503 #define WMI_PDEV_PARAM_IS_HIGHER_MCS_XRETRY_RESTRICTION_SET(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION)
8504 #define WMI_PDEV_PARAM_GET_XRETRY_THRESHOLD(word32)                 WMI_F_MS(word32, WMI_PDEV_PARAM_XRETRY_THRESHOLD)
8505 
8506 /*
8507  * The WMI_SCHED_MODE_FLAGS enum is used by the following WMI commands:
8508  *
8509  *     WMI_VDEV_PARAM_SET_DISABLED_SCHED_MODES
8510  *     WMI_PDEV_PARAM_SET_DISABLED_SCHED_MODES
8511  *     WMI_PEER_SCHED_MODE_DISABLE_CMDID
8512  *     WMI_SAWF_SVC_CLASS_CFG_CMDID
8513  */
8514 typedef enum {
8515     WMI_SCHED_MODE_DL_MU_MIMO = 0x00000001,
8516     WMI_SCHED_MODE_UL_MU_MIMO = 0x00000002,
8517     WMI_SCHED_MODE_DL_OFDMA   = 0x00000004,
8518     WMI_SCHED_MODE_UL_OFDMA   = 0x00000008,
8519 } WMI_SCHED_MODE_FLAGS;
8520 
8521 typedef enum {
8522     /** TX chain mask */
8523     WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
8524     /** RX chain mask */
8525     WMI_PDEV_PARAM_RX_CHAIN_MASK,                     /* 0x2 */
8526     /** TX power limit for 2G Radio */
8527     WMI_PDEV_PARAM_TXPOWER_LIMIT2G,                   /* 0x3 */
8528     /** TX power limit for 5G Radio */
8529     WMI_PDEV_PARAM_TXPOWER_LIMIT5G,                   /* 0x4 */
8530     /** TX power scale */
8531     WMI_PDEV_PARAM_TXPOWER_SCALE,                     /* 0x5 */
8532     /** Beacon generation mode . 0: host, 1: target   */
8533     WMI_PDEV_PARAM_BEACON_GEN_MODE,                   /* 0x6 */
8534     /** Beacon generation mode . 0: staggered 1: bursted   */
8535     WMI_PDEV_PARAM_BEACON_TX_MODE,                    /* 0x7 */
8536     /** Resource manager off chan mode .
8537      * 0: turn off off chan mode. 1: turn on offchan mode
8538      */
8539     WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,               /* 0x8 */
8540     /** Protection mode  0: no protection 1:use CTS-to-self 2: use RTS/CTS */
8541     WMI_PDEV_PARAM_PROTECTION_MODE,                   /* 0x9 */
8542     /** Dynamic bandwidth 0: disable 1: enable */
8543     WMI_PDEV_PARAM_DYNAMIC_BW,                        /* 0xa */
8544     /** Non aggregrate/ 11g sw retry threshold.0-disable */
8545     WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,               /* 0xb */
8546     /** aggregrate sw retry threshold. 0-disable*/
8547     WMI_PDEV_PARAM_AGG_SW_RETRY_TH,                   /* 0xc */
8548     /** Station kickout threshold (non of consecutive failures).0-disable */
8549     WMI_PDEV_PARAM_STA_KICKOUT_TH,                    /* 0xd */
8550     /** Aggerate size scaling configuration per AC */
8551     WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,               /* 0xe */
8552     /** LTR enable */
8553     WMI_PDEV_PARAM_LTR_ENABLE,                        /* 0xf */
8554     /** LTR latency for BE, in us */
8555     WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,                 /* 0x10 */
8556     /** LTR latency for BK, in us */
8557     WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,                 /* 0x11 */
8558     /** LTR latency for VI, in us */
8559     WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,                 /* 0x12 */
8560     /** LTR latency for VO, in us  */
8561     WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,                 /* 0x13 */
8562     /** LTR AC latency timeout, in ms */
8563     WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,            /* 0x14 */
8564     /** LTR platform latency override, in us */
8565     WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,                /* 0x15 */
8566     /** LTR-M override, in us */
8567     WMI_PDEV_PARAM_LTR_RX_OVERRIDE,                   /* 0x16 */
8568     /** Tx activity timeout for LTR, in us */
8569     WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,           /* 0x17 */
8570     /** L1SS state machine enable */
8571     WMI_PDEV_PARAM_L1SS_ENABLE,                       /* 0x18 */
8572     /** Deep sleep state machine enable */
8573     WMI_PDEV_PARAM_DSLEEP_ENABLE,                     /* 0x19 */
8574     /** RX buffering flush enable */
8575     WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,                /* 0x1a */
8576     /** RX buffering matermark */
8577     WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,            /* 0x1b */
8578     /** RX buffering timeout enable */
8579     WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,               /* 0x1c */
8580     /** RX buffering timeout value */
8581     WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,            /* 0x1d */
8582     /** pdev level stats update period in ms */
8583     WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,          /* 0x1e */
8584     /** vdev level stats update period in ms */
8585     WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,          /* 0x1f */
8586     /** peer level stats update period in ms */
8587     WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,          /* 0x20 */
8588     /** beacon filter status update period */
8589     WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,        /* 0x21 */
8590     /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
8591     WMI_PDEV_PARAM_PMF_QOS,                           /* 0x22 */
8592     /** Access category on which ARP frames are sent */
8593     WMI_PDEV_PARAM_ARP_AC_OVERRIDE,                   /* 0x23 */
8594     /** DCS configuration */
8595     WMI_PDEV_PARAM_DCS,                               /* 0x24 */
8596     /** Enable/Disable ANI on target */
8597     WMI_PDEV_PARAM_ANI_ENABLE,                        /* 0x25 */
8598     /** configure the ANI polling period */
8599     WMI_PDEV_PARAM_ANI_POLL_PERIOD,                   /* 0x26 */
8600     /** configure the ANI listening period */
8601     WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,                 /* 0x27 */
8602     /** configure OFDM immunity level */
8603     WMI_PDEV_PARAM_ANI_OFDM_LEVEL,                    /* 0x28 */
8604     /** configure CCK immunity level */
8605     WMI_PDEV_PARAM_ANI_CCK_LEVEL,                     /* 0x29 */
8606     /** Enable/Disable CDD for 1x1 STAs in rate control module */
8607     WMI_PDEV_PARAM_DYNTXCHAIN,                        /* 0x2a */
8608     /** Enable/Disable proxy STA */
8609     WMI_PDEV_PARAM_PROXY_STA,                         /* 0x2b */
8610     /** Enable/Disable low power state when all VDEVs are inactive/idle. */
8611     WMI_PDEV_PARAM_IDLE_PS_CONFIG,                    /* 0x2c */
8612     /** Enable/Disable power gating sleep */
8613     WMI_PDEV_PARAM_POWER_GATING_SLEEP,                /* 0x2d */
8614     /** Enable/Disable Rfkill */
8615     WMI_PDEV_PARAM_RFKILL_ENABLE,                     /* 0x2e */
8616     /** Set Bursting DUR */
8617     WMI_PDEV_PARAM_BURST_DUR,                         /* 0x2f */
8618     /** Set Bursting ENABLE */
8619     WMI_PDEV_PARAM_BURST_ENABLE,                      /* 0x30 */
8620     /** HW rfkill config */
8621     WMI_PDEV_PARAM_HW_RFKILL_CONFIG,                  /* 0x31 */
8622     /** Enable radio low power features */
8623     WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE,               /* 0x32 */
8624    /** L1SS entry and residency time track */
8625     WMI_PDEV_PARAM_L1SS_TRACK,                        /* 0x33 */
8626     /** set hyst at runtime, requirement from SS */
8627     WMI_PDEV_PARAM_HYST_EN,                           /* 0x34 */
8628     /** Enable/ Disable POWER COLLAPSE */
8629     WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE,             /* 0x35 */
8630    /** configure LED system state */
8631     WMI_PDEV_PARAM_LED_SYS_STATE,                     /* 0x36 */
8632    /** Enable/Disable LED */
8633     WMI_PDEV_PARAM_LED_ENABLE,                        /* 0x37 */
8634     /** set DIRECT AUDIO time latency */
8635     WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */ /* 0x38 */
8636     /** set DIRECT AUDIO Feature ENABLE */
8637     WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */  /* 0x39 */
8638     /** pdev level whal mib stats update enable */
8639     WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE,      /* 0x3a */
8640     /** ht/vht info based on vdev */
8641     WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD,     /* 0x3b */
8642     /** Set CTS channel BW for dynamic BW adjustment feature */
8643     WMI_PDEV_PARAM_CTS_CBW,                           /* 0x3c */
8644     /** Set GPIO pin info used by WNTS */
8645     WMI_PDEV_PARAM_WNTS_CONFIG,                       /* 0x3d */
8646     /** Enable/Disable hardware adaptive early rx feature */
8647     WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE,          /* 0x3e */
8648     /** The minimum early rx duration, to ensure early rx duration is non-zero */
8649     WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP,  /* 0x3f */
8650     /** Increasing/decreasing step used by hardware */
8651     WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP,    /* 0x40 */
8652     /** The fixed early rx duration when adaptive early rx is disabled */
8653     WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP,           /* 0x41 */
8654     /** Enable/Disable bmiss based adaptive beacon timeout feature */
8655     WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE,   /* 0x42 */
8656     /** The minimum beacon timeout duration, to ensure beacon timeout duration is non-zero */
8657     WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT,         /* 0x43 */
8658     /** Increasing/decreasing step used by hardware */
8659     WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP,            /* 0x44 */
8660     /** The fixed beacon timeout duration when bmiss based adaptive beacon timeout is disabled */
8661     WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT,               /* 0x45 */
8662     /** Enable/Disable Congestion Estimator based adaptive beacon timeout feature */
8663     WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE,      /* 0x46 */
8664     /** combo value of ce_id, ce_threshold, ce_time, refer to WMI_CE_BTO_CE_ID_MASK */
8665     WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE,             /* 0x47 */
8666     /** 2G TX chain mask */
8667     WMI_PDEV_PARAM_TX_CHAIN_MASK_2G,                  /* 0x48 */
8668     /** 2G RX chain mask */
8669     WMI_PDEV_PARAM_RX_CHAIN_MASK_2G,                  /* 0x49 */
8670     /** 5G TX chain mask */
8671     WMI_PDEV_PARAM_TX_CHAIN_MASK_5G,                  /* 0x4a */
8672     /** 5G RX chain mask */
8673     WMI_PDEV_PARAM_RX_CHAIN_MASK_5G,                  /* 0x4b */
8674     /* Set tx chain mask for CCK rates */
8675     WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK,                 /* 0x4c */
8676     /* Set tx chain mask for 1SS stream */
8677     WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS,                 /* 0x4d */
8678     /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected */
8679     WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG,        /* 0x4e */
8680     /** TX power backoff in dB: tx power -= param value
8681      * Host passes values(DB) to Halphy, Halphy reduces the power table by
8682      * the values. Safety check will happen in Halphy
8683      */
8684     WMI_PDEV_PARAM_TXPOWER_DECR_DB,                   /* 0x4f */
8685     /** enable and disable aggregate burst along with duration */
8686     WMI_PDEV_PARAM_AGGR_BURST,                        /* 0x50 */
8687     /** Set the global RX decap mode */
8688     WMI_PDEV_PARAM_RX_DECAP_MODE,                     /* 0x51 */
8689     /** Enable/Disable Fast channel reset */
8690     WMI_PDEV_PARAM_FAST_CHANNEL_RESET,                /* 0x52 */
8691     /** Default antenna for Smart antenna */
8692     WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA,     /* 0x53 */
8693     /** Set the user-specified antenna gain */
8694     WMI_PDEV_PARAM_ANTENNA_GAIN,                      /* 0x54 */
8695     /** Set the user-specified RX filter */
8696     WMI_PDEV_PARAM_RX_FILTER,                         /* 0x55 */
8697     /** configure the user-specified MCAST tid for managed mcast feature
8698      *  0-15 is the valid range. 0xff will clear the tid setting */
8699     WMI_PDEV_SET_MCAST_TO_UCAST_TID,                  /* 0x56 */
8700     /** Enable/Disable Proxy sta mode */
8701     WMI_PDEV_PARAM_PROXY_STA_MODE,                    /* 0x57 */
8702     /** configure the mcast2ucast mode for the pdev->peer_mcast.
8703      *  See WMI_PEER_MCAST2UCAST_MODE for possible values */
8704     WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE,              /* 0x58 */
8705     /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
8706     WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER,            /* 0x59 */
8707     /** Remove the Mcast buffers added by host */
8708     WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER,         /* 0x5a */
8709     /** En/disable station power save state indication */
8710     WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE,             /* 0x5b */
8711     /** Access category on which ARP frames are sent */
8712     WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE,               /* 0x5c */
8713     /** allow or disallow interbss frame forwarding */
8714     WMI_PDEV_PARAM_BLOCK_INTERBSS,                    /* 0x5d */
8715     /** Enable/Disable reset */
8716     WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID,           /* 0x5e */
8717     /** Enable/Disable/Set MSDU_TTL in milliseconds. */
8718     WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID,                /* 0x5f */
8719     /** Set global PPDU duration limit (usec). */
8720     WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID,           /* 0x60 */
8721     /** set txbf sounding period of vap in milliseconds */
8722     WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID,           /* 0x61 */
8723     /** Set promiscuous mode */
8724     WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID,            /* 0x62 */
8725     /** Set burst mode */
8726     WMI_PDEV_PARAM_SET_BURST_MODE_CMDID,              /* 0x63 */
8727     /** enable enhanced stats */
8728     WMI_PDEV_PARAM_EN_STATS,                          /* 0x64 */
8729     /** Set mu-grouping policy */
8730     WMI_PDEV_PARAM_MU_GROUP_POLICY,                   /* 0x65 */
8731     /** Channel Hopping Enable */
8732     WMI_PDEV_PARAM_NOISE_DETECTION,                   /* 0x66 */
8733     /** Set Channel Hopping NF threshold in dBm */
8734     WMI_PDEV_PARAM_NOISE_THRESHOLD,                   /* 0x67 */
8735     /** Set PAPRD policy */
8736     WMI_PDEV_PARAM_DPD_ENABLE,                        /* 0x68 */
8737     /** Enable/disable mcast/bcast echo, used by ProxySTA */
8738     WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO,              /* 0x69 */
8739     /** ATF enable/disable strict schedule */
8740     WMI_PDEV_PARAM_ATF_STRICT_SCH,                    /* 0x6a */
8741     /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
8742     WMI_PDEV_PARAM_ATF_SCHED_DURATION,                /* 0x6b */
8743     /** Default antenna polarization */
8744     WMI_PDEV_PARAM_ANT_PLZN,                          /* 0x6c */
8745     /** Set mgmt retry limit */
8746     WMI_PDEV_PARAM_MGMT_RETRY_LIMIT,                  /* 0x6d */
8747     /** Set CCA sensitivity level in dBm */
8748     WMI_PDEV_PARAM_SENSITIVITY_LEVEL,                 /* 0x6e */
8749     /** Set 2G positive and negative Tx power in 0.5dBm units */
8750     WMI_PDEV_PARAM_SIGNED_TXPOWER_2G,                 /* 0x6f */
8751     /** Set 5G positive and negative Tx power in 0.5dBm
8752      *  units */
8753     WMI_PDEV_PARAM_SIGNED_TXPOWER_5G,                 /* 0x70 */
8754     /** Enable/disable AMSDU for tids */
8755     WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU,              /* 0x71 */
8756     /** Enable/disable AMPDU for tids */
8757     WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU,              /* 0x72 */
8758     /** Set CCA threshold in dBm */
8759     WMI_PDEV_PARAM_CCA_THRESHOLD,                     /* 0x73 */
8760     /** RTS Fixed rate setting */
8761     WMI_PDEV_PARAM_RTS_FIXED_RATE,                    /* 0x74 */
8762     /** Pdev reset */
8763     WMI_PDEV_PARAM_PDEV_RESET,                        /* 0x75 */
8764     /** wapi mbssid offset **/
8765     WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET,                /* 0x76 */
8766     /** ARP DEBUG source address*/
8767     WMI_PDEV_PARAM_ARP_DBG_SRCADDR,                   /* 0x77 */
8768     /** ARP DEBUG destination address*/
8769     WMI_PDEV_PARAM_ARP_DBG_DSTADDR,                   /* 0x78 */
8770     /** ATF enable/disable obss noise scheduling */
8771     WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH,                /* 0x79 */
8772     /** ATF obss noise scaling factor */
8773     WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR,     /* 0x7a */
8774     /**
8775      * TX power reduction scaling exponent - final tx power is the
8776      * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
8777      * 2^(scale exponent).  For example:
8778      * If this scale exponent is  0, the power is unchanged (divided by 2^0)
8779      * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
8780      * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
8781      * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
8782      */
8783     WMI_PDEV_PARAM_CUST_TXPOWER_SCALE,                /* 0x7b */
8784     /** ATF enabe/disable dynamically */
8785     WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE,                /* 0x7c */
8786     /** Set tx retry limit for control frames. 0 = disable, 31 = max */
8787     WMI_PDEV_PARAM_CTRL_RETRY_LIMIT,                  /* 0x7d */
8788     /** Set propagation delay for 2G / 5G band.
8789      * The propagation delay is fundamentally a per-peer property, but
8790      * the target may not support per-peer settings for ack timeouts.
8791      * This pdev parameter allows the MAC-level ack timeout to be set to
8792      * a value suitable for the worst-case propagation delay of any peer
8793      * within that pdev.
8794      * Units are microseconds.
8795      */
8796     WMI_PDEV_PARAM_PROPAGATION_DELAY,                 /* 0x7e */
8797     /**
8798      * Host can enable/disable ANT DIV feature
8799      * if it's been enabled in BDF
8800      */
8801     WMI_PDEV_PARAM_ENA_ANT_DIV,                       /* 0x7f */
8802     /** Host can force one chain to select a specific ANT */
8803     WMI_PDEV_PARAM_FORCE_CHAIN_ANT,                   /* 0x80 */
8804     /**
8805      * Start a cycle ANT self test periodically.
8806      * In the test, the FW would select each ANT pair
8807      * one by one, the cycle time could be configured
8808      * via WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL
8809      */
8810     WMI_PDEV_PARAM_ANT_DIV_SELFTEST,                  /* 0x81 */
8811     /**
8812      * Configure the cycle time of ANT self test,
8813      * the unit is micro second. Per the timer
8814      * limitation, too small value could be not so
8815      * accurate.
8816      */
8817     WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL,            /* 0x82 */
8818     /**
8819      * wlan stats observation period, the unit is millisecond.
8820      * The value of 0 is used to turn off periodic stats report.
8821      */
8822     WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD,          /* 0x83 */
8823     /**
8824      * Set tx_ppdu_delay[] bin size to specify how many
8825      * milliseconds each bin of the wmi_tx_stats.tx_ppdu_delay[]
8826      * histogram represents.
8827      */
8828     WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS,         /* 0x84 */
8829     /** set wmi_tx_stats.tx_ppdu_delay[] array length */
8830     WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN,           /* 0x85 */
8831     /** set wmi_tx_stats.tx_mpdu_aggr[] array length */
8832     WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN,            /* 0x86 */
8833     /** set wmi_rx_stats.rx_mpdu_aggr[] array length */
8834     WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN,            /* 0x87 */
8835     /** Set TX delay value in TX sch module, unit is microseconds */
8836     WMI_PDEV_PARAM_TX_SCH_DELAY,                      /* 0x88 */
8837     /** Set RTS enable for SIFS bursting */
8838     WMI_PDEV_PARAM_ENABLE_RTS_SIFS_BURSTING,          /* 0x89 */
8839     /** Set Maximum number of MPDUs in an AMPDU*/
8840     WMI_PDEV_PARAM_MAX_MPDUS_IN_AMPDU,                /* 0x8a */
8841 
8842     /** Enable/disable peer stats info mechanism
8843      * A zero value disables; a non-zero value enables.
8844      */
8845     WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE,            /* 0x8b */
8846 
8847     /** Configure Fast PWR Transition mode
8848      * 0x0 -> inidcates Fast PWR transition disabled
8849      * 0x1 -> indicates Static mode enabled
8850      * 0x2 -> indicates Dynamic mode enabled
8851      */
8852     WMI_PDEV_PARAM_FAST_PWR_TRANSITION,               /* 0x8c */
8853 
8854     /** Enable/disable radio channel stats mechanism
8855      *  A zero value disables; a non-zero value enables.
8856      */
8857     WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE,           /* 0x8d */
8858     /** Enable/disable radio diagnosis feature
8859      *  which allows retrieving the status of radio.
8860      *  A zero value disables; a non-zero value enables.
8861      */
8862     WMI_PDEV_PARAM_RADIO_DIAGNOSIS_ENABLE,            /* 0x8e */
8863     /** Enable/Disable mesh mcast traffic
8864      * 1 - Allow mesh mcast traffic
8865      * 0 - Disallow mesh mcast traffic
8866      */
8867     WMI_PDEV_PARAM_MESH_MCAST_ENABLE,                 /* 0x8f */
8868     /** Enable/Disable smart chainmask scheme
8869       * 1 - Enable smart chainmask scheme
8870       * 0 - Disable smart chainmask scheme
8871       */
8872     WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME,            /* 0x90 */
8873     /** Enable/Disable alternate chainmask scheme
8874      * 1 - Enable alternate chainmask scheme
8875      * 0 - Disable alternate chainmask scheme
8876      */
8877     WMI_PDEV_PARAM_ALTERNATIVE_CHAINMASK_SCHEME,      /* 0x91 */
8878     /** User configured parameters for antenna diversity algorithm
8879      *  BIT[25..13]: Probe period (milliseconds units)
8880      *  BIT[12..0]: Stay period (milliseconds units)
8881      */
8882     WMI_PDEV_PARAM_ANT_DIV_USRCFG,                    /* 0x92 */
8883     /** pdev packet power save levels,
8884      *  refer to WMI_PDEV_PKT_PWR_SAVE_LEVEL
8885      */
8886     WMI_PDEV_PARAM_PACKET_POWER_SAVE_LEVEL,           /* 0x93 */
8887     /** Define IOT pattern to be enabled/disabled
8888       * bit values: 0 - disable, 1 - enable
8889       * BIT[0..31]: each bit represents an IOT pattern
8890       * -----
8891       * Bit 0 - avoid SMPS with certain APs
8892       * Bits 31:1 - reserved
8893       */
8894     WMI_PDEV_PARAM_SET_IOT_PATTERN,                   /* 0x94 */
8895     /** ACK timeout - change wireless packet ack timeout configuration,
8896      *  units are microseconds
8897      */
8898     WMI_PDEV_PARAM_ACK_TIMEOUT,                       /* 0x95 */
8899     /** Number of TX chains to use for a/b/g rates.
8900      *  bit 0~15  : 11b mode TX chain number.
8901      *  bit 16~31 : 11ag mode TX chain number.
8902      */
8903     WMI_PDEV_PARAM_ABG_MODE_TX_CHAIN_NUM,             /* 0x96 */
8904     /** Enable/Disable cck txfir override
8905      *  bit 0 - enable (1) or disable (0) CCK tx FIR
8906      *  bits 31:1 - unused / reserved (set to 0)
8907      */
8908     WMI_PDEV_PARAM_ENABLE_CCK_TXFIR_OVERRIDE,         /* 0x97 */
8909     /** Enable/Disable DTIM Synth
8910      *   1- Enable DTIM Synth
8911      *   0- Disable DTIM Synth
8912      */
8913     WMI_PDEV_PARAM_DTIM_SYNTH,                        /* 0x98 */
8914     /** Configure auto detect power failure feature.
8915      *   0 - FW will trigger crash if power failure happens.
8916      *   1 - FW will send a failure notification to host, and the host
8917      *       framework determines how to respond to the power failure
8918      *   2 - Silently rejuvenate if power failure occurs.
8919      *   3 - Feature disabled.
8920      */
8921     WMI_PDEV_AUTO_DETECT_POWER_FAILURE,               /* 0x99 */
8922     /** Configure operating voltage corner mode based on phymode and bw.
8923      * bit 0-1 -   operating voltage corner mode for 11a/b.
8924      * bit 2-3 -   operating voltage corner mode for 11g.
8925      * bit 4-5 -   operating voltage corner mode for 11n, 20MHz, 1x1.
8926      * bit 6-7 -   operating voltage corner mode for 11n, 20MHz, 2x2.
8927      * bit 8-9 -   operating voltage corner mode for 11n, 40MHz, 1x1.
8928      * bit 10-11 - operating voltage corner mode for 11n, 40MHz, 2x2.
8929      * bit 12-13 - operating voltage corner mode for 11ac, 20MHz, 1x1.
8930      * bit 14-15 - operating voltage corner mode for 11ac, 20MHz, 2x2.
8931      * bit 16-17 - operating voltage corner mode for 11ac, 40MHz, 1x1.
8932      * bit 18-19 - operating voltage corner mode for 11ac, 40MHz, 2x2.
8933      * bit 20-21 - operating voltage corner mode for 11ac, 80MHz, 1x1.
8934      * bit 22-23 - operating voltage corner mode for 11ac, 80MHz, 2x2.
8935      * bit 24-25 - operating voltage corner mode for 11ac, 160MHz, 1x1.
8936      * bit 26-27 - operating voltage corner mode for 11ac, 160MHz, 2x2.
8937      * ---------------------------------------------
8938      * 00 - Static voltage corner SVS
8939      * 01 - static voltage corner LOW SVS
8940      * 10 - Dynamic voltage corner selection based on TPUT
8941      * 11 - Dynamic voltage corner selection based on TPUT and Tx Flush counters
8942      */
8943     WMI_PDEV_UPDATE_WDCVS_ALGO,                       /* 0x9a */
8944 
8945     /* Enable/Disable data stall detection */
8946     WMI_PDEV_PARAM_DATA_STALL_DETECT_ENABLE,          /* 0x9b */
8947     /* GCMP Support indication to FW */
8948     WMI_PDEV_PARAM_GCMP_SUPPORT_ENABLE,               /* 0x9c */
8949     /** Enable/Disable chain selection optimization for one chain dtim
8950      *   non-zero - Enable optimization and use this non-zero value as the
8951      *              chain imbalance threshold for optimization to kick in
8952      *              (units = dB)
8953      *   0- Disable optimization
8954      */
8955     WMI_PDEV_PARAM_1CH_DTIM_OPTIMIZED_CHAIN_SELECTION,/* 0x9d */
8956     /*
8957      * Override default FW behavior and explicitly enable / disable
8958      * the use of CCK for PPDU transmissions.
8959      *
8960      * When CCK transmissions are disabled, the default OFDM legacy
8961      * rate will be used instead.
8962      */
8963     WMI_PDEV_PARAM_CCK_TX_ENABLE,                     /* 0x9e */
8964     /*
8965      * Set the user-specified antenna gain, but in 0.5 dB units.
8966      * This is a finer-granularity version of WMI_PDEV_PARAM_ANTENNA_GAIN.
8967      * E.g. to set a gain of 15.5 dB, a value of 31 could be provided as the
8968      * value accompanying the PDEV_PARAM_ANTENNA_GAIN_HALF_DB parameter type.
8969      */
8970     WMI_PDEV_PARAM_ANTENNA_GAIN_HALF_DB,              /* 0x9f */
8971     /*
8972      * Global Enable/Disable control for Secondary Retry Feature Set
8973      *
8974      * Bit-0  : Enable/Disable Control for "PPDU Secondary Retry Support"
8975      * Bit-1  : Enable/Disable Control for "RTS Black/White-listing Support"
8976      * Bit-2  : Enable/Disable Control for "Higher MCS retry restriction on XRETRY failures"
8977      * Bit 3-5: "Xretry threshold" to use
8978      */
8979     WMI_PDEV_PARAM_SECONDARY_RETRY_ENABLE,            /* 0xA0 */
8980     /** Set global uplink triggered PPDU duration limit (usec). */
8981     WMI_PDEV_PARAM_SET_UL_PPDU_DURATION,              /* 0xA1 */
8982     /** Set target buffer status report trigger interval (ms) */
8983     WMI_PDEV_PARAM_SET_UL_BSR_TRIG_INTERVAL,          /* 0xA2 */
8984     /** Use simplified equal RU allocation for DL and UL OFDMA */
8985     WMI_PDEV_PARAM_EQUAL_RU_ALLOCATION_ENABLE,        /* 0xA3 */
8986     /** Enable/disable MWS-COEX 4G (LTE) Quick FTDM.
8987      * 0 - Don't allow quick FTDM Policy (Default)
8988      * 1 - Allow quick FTDM policy.
8989      */
8990     WMI_PDEV_PARAM_MWSCOEX_4G_ALLOW_QUICK_FTDM,       /* 0xA4 */
8991     /** Set MWS-COEX 5G-NR power limit.
8992      * 0:    Don't apply user specific power limit,
8993      *       use internal power limit (Default)
8994      * 1-2:  invalid value (ignored)
8995      * 3-21: apply the specified value as the external power limit, in dBm
8996      * >21:  invalid value (ignored)
8997      */
8998     WMI_PDEV_PARAM_MWSCOEX_SET_5GNR_PWR_LIMIT,        /* 0xA5 */
8999     /** Set max msdus available for cong ctrl in target */
9000     WMI_PDEV_PARAM_SET_CONG_CTRL_MAX_MSDUS,           /* 0xA6 */
9001     /*
9002      * Configures the Estimated Throughput Calculation indication (802.11mc) settings.
9003      * The accompanying A_UINT32 parameter, in units of seconds, specifies how often FW needs to send the ESP estimation indication to the host.
9004      * Value 0: Disable this feature
9005      * Non zero Value: Periodicity (seconds)
9006      */
9007     WMI_PDEV_PARAM_ESP_INDICATION_PERIOD,             /* 0xA7 */
9008 
9009     /*
9010      * Enable/Disable periodic peer CFR capture
9011      * WMI_PEER_CFR_CAPTURE_ENABLE - Enable per peer periodic CFR capture
9012      * WMI_PEER_CFR_CAPTURE_DISABLE - Disable per peer periodic CFR capture
9013      */
9014     WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE,
9015 
9016     /*
9017      * Set the base timer for the periodic CFR capture. By default this is 10ms.
9018      * The period ('periodicity' param in wmi_peer_cfr_capture_cmd) of
9019      * CFR measurement of other peers will be in multiples of this base timer.
9020      * The unit is in milliseconds.
9021      */
9022     WMI_PDEV_PARAM_PERIODIC_CFR_BASE_TIMER,
9023 
9024     /*
9025      * Once the periodic capture is enabled using
9026      * WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE, the timer starts running in
9027      * the target. This parameter will ensure that the timer stops if there are
9028      * no active peers in the capture list. Once the peers are added again to
9029      * the capture list, the timer will not start again. The timer has to be
9030      * started again using WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE.
9031      * Value 1: Enable this feature
9032      * Value 0: Disable this feature
9033      */
9034     WMI_PDEV_PARAM_ENABLE_OPTIMIZED_PERIODIC_CFR_TIMER,
9035 
9036     /*
9037      * Configures a portion of the Estimated Service Params indication
9038      * (802.11mc) settings, which together specify estimated throughput.
9039      * The accompanying A_UINT32 parameter is the ESP BA WINDOW size advertised
9040      * Value 0: Disable this feature
9041      * Non zero Value: ESP BA WINDOW size
9042      */
9043     WMI_PDEV_PARAM_ESP_BA_WINDOW,
9044 
9045     /*
9046      * Configures a portion of the Estimated Service Params indication
9047      * (802.11mc) settings, which together specify estimated throughput.
9048      * The accompanying A_UINT32 parameter is the air time fraction to be
9049      * advertised in the ESP IE
9050      * Value 0: Disable this feature
9051      * Non zero Value: Air time fraction in percentage
9052      */
9053     WMI_PDEV_PARAM_ESP_AIRTIME_FRACTION,
9054 
9055     /*
9056      * Configures a portion of the Estimated Service Params indication
9057      * (802.11mc) settings, which together specify estimated throughput.
9058      * The accompanying A_UINT32 parameter specifies PPDU duration in units
9059      * of milliseconds.
9060      * Value 0: Disable this feature
9061      * Non zero Value: PPDU duration in milliseconds
9062      */
9063     WMI_PDEV_PARAM_ESP_PPDU_DURATION,
9064 
9065     /*
9066      * Enable/Disable NOL(Non Occupancy list) in firmware
9067      *   1- Use NOL in firmware
9068      *   0- Don't use NOL in firmware
9069      */
9070     WMI_PDEV_PARAM_USE_NOL,
9071 
9072     /*
9073      * Allow / Not Allow RU26 in any user's RU allocation field in UL OFDMA
9074      * trigger frames sent by AP
9075      *  1 - Allow RU26
9076      *  0 - Do not allow RU26
9077      */
9078     WMI_PDEV_PARAM_UL_RU26_ALLOWED,
9079 
9080     /*
9081      * Enable/Disable sub channel marking
9082      *  1 - Enable sub channel marking
9083      *  0 - Disable sub channel marking (default value)
9084      */
9085     WMI_PDEV_PARAM_SUB_CHANNEL_MARKING,
9086 
9087     /*
9088      * Enable/Disable/Set MGMT_TTL in milliseconds.
9089      * non_zero - Enable, with the specified value
9090      * 0 - Disable
9091      */
9092     WMI_PDEV_PARAM_SET_MGMT_TTL,
9093 
9094     /*
9095      * Enable/Disable/Set PROBE_RESP_TTL in milliseconds.
9096      * non_zero - Enable, with the specified value
9097      * 0 - Disable
9098      */
9099     WMI_PDEV_PARAM_SET_PROBE_RESP_TTL,
9100 
9101     /*
9102      * TBTT_CTRL_CFG
9103      * BITS 0 - 2 (refer to WMI_TBTT_CTRL_CFG enum)
9104      *   0  - DEFAULT -> HW_TBTT
9105      *   1  - SW_TBTT -> HW_TBTT disabled,
9106      *        software would truncate BURST near TBTT
9107      *   2  - IGNORE_TBTT
9108      *
9109      * BITS 3 - 31 Reserved, must be set to 0x0
9110      */
9111     WMI_PDEV_PARAM_SET_TBTT_CTRL,
9112 
9113     /*
9114      * BITS0 ~1 (refer to enum)
9115      * 0 - default --> always update
9116      * 1 - ignore to update
9117      * 2 - update if larger than threshould
9118      * 3 - update if less or equal than threshould
9119      *
9120      * BITS 2 ~ 31 Threshould
9121      */
9122     WMI_PDEV_PARAM_NAV_OVERRIDE_CONFIG,
9123 
9124     /* Set global MU PPDU duration for DL (usec units) */
9125     WMI_PDEV_PARAM_SET_MU_PPDU_DURATION,
9126 
9127     /*
9128      * Enable / disable test mode configuration.
9129      * By default FW will always send triggers dynamically (mix of BSR/Basic).
9130      * The below testmode are only used for certain tests.
9131      * A value of 1 in a given bit enables corresponding test mode.
9132      * bit | test mode
9133      * ---------------
9134      *  0  | FW only sends BSR triggers.
9135      *  1  | FW only sends Basic triggers.
9136      *  2  | If set, FW enables MU-RTS trigger.
9137      *     | If cleared, FW uses implementation-specific internal default setting.
9138      *  3  | FW enables unicast embedded trigger in HE MU PPDU.
9139      * 4-31| reserved.
9140      */
9141     WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_TYPE_ENABLE,
9142 
9143     /*
9144      * Configure test command to set LSIG len.
9145      * Value 0: Dynamic LSIG based on STA's qdepth.
9146      * Non zero Value: LSIG length to be configured
9147      *                 as part of trigger frame.
9148      *   bit   |
9149      * ---------------
9150      *  0 - 30 | Bits storing the host supplied <value>.
9151      *  31     | If set: The legitimate value closest to the value specified in
9152      *         |   in bits 30:0 is directly set in UL len in trigger frame.
9153      *         |   The FW performs calculations to determine which legitimate
9154      *         |   value is closest to the specified value, if the specified
9155      *         |   value is not already legitimate.
9156      *         | If not set: The value in lower bits is the duration (in ms),
9157      *         |   from which the UL len is derived.
9158      *         |   Example: if host sets 2000 (2ms), then UL Len in trigger
9159      *         |   will be derived to accommodate the given duration.
9160      */
9161     WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_LSIG_LEN,
9162 
9163     /*
9164      * Configure test cmd for fixed rate setting used for UL Trigger
9165      * (only Basic/BSR triggers).
9166      * The top nibble is used to select which format to use for encoding
9167      * the rate specification: 0xVXXXXXXX, V must be 1 for the UL
9168      * format.
9169      * If V == 0b0001: format is: 0x1000RRRR.
9170      *                 This will be output of WMI_ASSEMBLE_RATECODE_V1
9171      *
9172      */
9173     WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_FIXED_RATE,
9174 
9175     /*
9176      * Configure test command to set the mac padding duration.
9177      *  0 - FW set Mac Padding to 0us
9178      *  1 - FW set Mac Padding to 8us
9179      *  2 - FW set Mac Padding to 16us
9180      */
9181     WMI_PDEV_PARAM_SET_TEST_CMD_UL_MAC_PADDING,
9182 
9183     /*
9184      * Configure test command to set the fc duration in BSR trigger frame.
9185      *  value 0 - FW calculates the duration (default).
9186      *  Non zero Value: Duration to be configured.
9187      */
9188     WMI_PDEV_PARAM_SET_TEST_CMD_UL_BSR_FC_DURATION,
9189 
9190     /* Parameter used for configuring TWT scheduling properties
9191      * bit | config_mode
9192      * -----------------
9193      *  0  | Disables DL MU for TWT peers within TWT SP
9194      *  1  | Disables UL MU for TWT peers within TWT SP
9195      *  2  | Disables scheduling from WMM sched context for TWT peers
9196      *  3  | If set, FW only sends Basic triggers in TWT SP.
9197      * 4-31| reserved.
9198      */
9199     WMI_PDEV_PARAM_SET_TEST_CMD_TWT_SCHED_CONFIG,
9200 
9201     /* Parameter used to configure OBSS Packet Detect threshold
9202      * for Non-SRG / SRG based Spatial Reuse feature.
9203      * (SRG = Spatial Reuse Group)
9204      * The accepted values are in between 0x00 and 0xFF, inclusive.
9205      * The parameter value is programmed into the appropriate spatial reuse
9206      * register, to specify how low the background signal strength from
9207      * neighboring BSS cells must be, for this AP to employ spatial reuse.
9208      *
9209      * The value of the parameter is compared against the OBSS RSSI in dB.
9210      * It is a 8-bit value whose
9211      * range is -128 to 127 (after two's complement operation).
9212      * For example, if the parameter value is 0xF5, the target will
9213      * allow spatial reuse if the RSSI detected from other BSS
9214      * is below -10 dB.
9215      * Similarly, if the parameter value is 0x0A, the target will
9216      * allow spatial reuse only if the RSSI detected from neighboring
9217      * BSS cells is no more than 10 dB.
9218      *
9219      * If Bit 29 is set, then input value will be in dBm. This is used
9220      * for chipsets that uses dBm for comparison across MAC/Phy blocks.
9221      * Older chipsets support input in dB units. For newer chipsets, dBm
9222      * units will be used.
9223      * The host will use the WMI_SERVICE_SRG_SRP_SPATIAL_REUSE_SUPPORT
9224      * service ready bit to differentiate between providing input as dB or dBm.
9225      *
9226      * bit    | purpose
9227      * -----------------
9228      * 0  - 7 | Param Value for non-SRG based Spatial Reuse
9229      * 8  - 15| Param value for SRG based Spatial Reuse
9230      * 16 - 28| Reserved
9231      * 29     | Param value is in dBm units rather than dB units
9232      * 30     | Enable/Disable SRG based spatial reuse.
9233      *        | If set to 0, ignore bits 8-15.
9234      * 31     | Enable/Disable Non-SRG based spatial reuse.
9235      *        | If set to 0, ignore bits 0-7.
9236      */
9237     WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD,
9238 
9239     /* Parameter used for enabling/disabling non wlan coex from boot */
9240     WMI_PDEV_PARAM_ENABLE_NON_WLAN_COEX_FROM_BOOT,
9241 
9242     /* Parameter used to configure OBSS Packet Detection per Access Category
9243      * for SRP based and OBSS_PD based spatial reuse feature.
9244      * (SRP = Spatial Reuse Parameter)
9245      * Based on the bits set, the corresponding Access Category Queues will have
9246      * spatial reuse enabled / disabled.
9247      * bit     | AC
9248      * ------------
9249      * 0       | BK for SRG/Non-SRG
9250      * 1       | BE for SRG/Non-SRG
9251      * 2       | VI for SRG/Non-SRG
9252      * 3       | VO for SRG/Non-SRG
9253      * 4 - 15  | Reserved
9254      * 16      | BK for SRP
9255      * 17      | BE for SRP
9256      * 18      | VI for SRP
9257      * 19      | VO for SRP
9258      * 20 - 31 | Reserved
9259      */
9260     WMI_PDEV_PARAM_SET_CMD_OBSS_PD_PER_AC,
9261 
9262     /*
9263      * Parameter used to enable/disable FW control of MU-EDCA and AP back-off
9264      * parameters.
9265      * If set to zero, FW mode is disabled; if set to 1, FW mode is enabled.
9266      * Default setting is to have it enabled, and user can disable it in
9267      * favor of manual mode or host control mode.
9268      */
9269     WMI_PDEV_PARAM_ENABLE_FW_DYNAMIC_HE_EDCA,
9270 
9271     /*
9272      * Parameter used to set default 6 GHz rate.
9273      * Applies to all non data transmissions in 6 GHz unless
9274      * overwritten by respective VDEV params.
9275      */
9276     WMI_PDEV_PARAM_DEFAULT_6GHZ_RATE,
9277 
9278     /*
9279      * Configures the duration (in seconds) to delay the channel avoidance
9280      * indication at WLAN firmware before indicating it to WLAN host,
9281      * when WWAN (LTE/5GNR) PCC is in conflict due to WWAN-WLAN coexistence.
9282      * Default value is 60 seconds.
9283      * If set to zero, FW sends channel avoidance indcation immediately to Host.
9284      */
9285     WMI_PDEV_PARAM_MWSCOEX_PCC_CHAVD_DELAY,
9286 
9287     /*
9288      * Configures the duration (in seconds) to delay the channel avoidance
9289      * indication at WLAN firmware before indicating it to WLAN host,
9290      * when WWAN (LTE/5GNR) SCC is in conflict due to WWAN-WLAN coexistence.
9291      * Default value is 120 seconds.
9292      * If set to zero, FW sends channel avoidance indcation immediately to Host.
9293      */
9294     WMI_PDEV_PARAM_MWSCOEX_SCC_CHAVD_DELAY,
9295 
9296     /*
9297      * Parameter used to set ageout timer value from host (units = seconds).
9298      * If not set, FW use default value 2 seconds.
9299      * ageout time: the time upto which DFS channel information such as
9300      * beacon found is remembered
9301      */
9302     WMI_PDEV_PARAM_SET_DFS_CHAN_AGEOUT_TIME,
9303 
9304     /* Parameter used for enabling/disabling xlna bypass for SAP mode*/
9305     WMI_PDEV_PARAM_SET_SAP_XLNA_BYPASS,
9306 
9307     /* Parameter used to enable/disable SRP feature */
9308     WMI_PDEV_PARAM_ENABLE_SRP,
9309 
9310     /* Parameter used to enable/disable SR prohibit feature */
9311     WMI_PDEV_PARAM_ENABLE_SR_PROHIBIT,
9312 
9313     /*
9314      * Parameter used to enable/disable UL OFDMA mBSSID support for
9315      * trigger frames. It is disabled by default.
9316      * bit | config_mode
9317      * -----------------
9318      *  0  | Enable/Disable mBSSID trigger support for basic triggers.
9319      *  1  | Enable/Disable mBSSID trigger support for BSR triggers.
9320      *  2  | Enable/Disable mBSSID trigger support for MU RTS.
9321      *  3  | Enable/Disable mBSSID trigger support for UL MUMIMO triggers.
9322      */
9323     WMI_PDEV_PARAM_ENABLE_MBSSID_CTRL_FRAME,
9324 
9325     /*
9326      * Parameter to set preamble punctured band as a bitmask, i.e.
9327      * which 20MHz in the 80MHz bandwidth or 40MHz in 160MHz bandwidth.
9328      * E.g. if first 20MHz is the primary and preamble puncturing is
9329      * desired for 3rd 20Mhz, then the host will send 0x0100.
9330      * FW doesn't expect the primary 20MHz to be punctured.
9331      * This param is required only for 11ax release.
9332      */
9333     WMI_PDEV_PARAM_SET_PREAM_PUNCT_BW,
9334 
9335     /*
9336      * Parameter used to set the Margin dB value to be included for calculating
9337      * the spatial reuse value in common info field of the UL Trigger frame.
9338      * Accepted value as per Spec are 0 to 5 dB (inclusive).
9339      */
9340     WMI_PDEV_PARAM_SR_TRIGGER_MARGIN,
9341 
9342     /* Param to enable/disable PCIE HW ILP */
9343     WMI_PDEV_PARAM_PCIE_HW_ILP,
9344 
9345     /*
9346      * Configure the TXTD_START_TIMESTAMP parameters
9347      * The timestamp units are nanoseconds.
9348      * This parameter can be used to adjust at what point the TXTD module
9349      * will start operating after the STA connects to an AP.
9350      */
9351     WMI_PDEV_PARAM_SET_TXTD_START_TIMESTAMP,
9352 
9353     /*
9354      * Parameter to configure and enable/disable features for mesh usecases
9355      * bit    | config_mode
9356      * -----------------
9357      *  0     | Set to 1 to disable BSSID based spatial reuse.
9358      *  1-31  | Reserved.
9359      */
9360     WMI_PDEV_PARAM_SET_MESH_PARAMS,
9361 
9362     /* Param to enable low latency mode */
9363     WMI_PDEV_PARAM_LOW_LATENCY_SCHED_MODE,
9364 
9365     /* Param to enable per USERPD SSR - for MultiPD enabled chips */
9366     WMI_PDEV_PARAM_MPD_USERPD_SSR,
9367 
9368     /*
9369      * Param to disable Hardware Assist feature,
9370      * i.e. Disables HW feature that reconstructs the PPDU
9371      * by picking failing MPDUs from prior FES attempt.
9372      */
9373     WMI_PDEV_PARAM_DISABLE_HW_ASSIST,
9374 
9375     /*
9376      * Param to Enable/Disable Tx on DFS for Scan Radio RDP
9377      * Send MGMT frames on the DFS channel before Tx on the said channel
9378      * when in monitor mode.
9379      * Scan Radio RDP should do Tx on DFS channel based on available
9380      * Tx frame on DFS without doing CAC.
9381      * Host should ensure to send this param only for Scan Radio RDP.
9382      * This param used to inform Scan Radio Supports Tx on DFS channel.
9383      */
9384     WMI_PDEV_PARAM_SCAN_RADIO_TX_ON_DFS,
9385 
9386     /*
9387      * Param to configure Minimum OBSS ppdu time below which
9388      * spatial reuse will not happen over the TXOP duration of the OBSS frame.
9389      * If the incoming OBSS frame ppdu duration is greater then the value
9390      * configured, then spatial reuse can happen over the OBSS PPDU.
9391      * The value is configured in microseconds.
9392      */
9393     WMI_PDEV_PARAM_OBSS_MIN_DURATION_CHECK_FOR_SR,
9394 
9395     /*
9396      * Param to Enable/Disable Truncate SR feature.
9397      * PPDUs transmitted using SR opportunity will be truncated at the end
9398      * of OBSS frame duration and will not extend beyond.
9399      */
9400     WMI_PDEV_PARAM_TRUNCATE_SR,
9401 
9402     /* Parameter used to configure separate NON_SRG/SRG OBSS PD threshold for
9403      * for Control Frame.
9404      * (SRG = Spatial Reuse Group)
9405      * The accepted values are in between 0x00 and 0xFF, inclusive.
9406      * The parameter value is checked against the RSSI of the OBSS Control
9407      * frame. If RSSI is below the parameter value, then the Control frame is
9408      * aborted and NAV is ignored. Separate OBSS PD threshold for Control frame
9409      * is added to account for the higher TX power used for such control frames
9410      * when compared with data frames.
9411      *
9412      * The input value will be interpreted as a signed value in dBm units.
9413      *
9414      * The values will be reflected in the registers only if
9415      * SRG / non-srg based spatial reuse is enabled via
9416      * WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD cmd.
9417      * bit    | purpose
9418      * -----------------
9419      * 0  - 7 | Param Value for non-srg OBSS PD threshold for non-SRG
9420      *        | control frames
9421      * 8  - 15| Param Value for srg OBSS PD threshold for SRG control frames
9422      * 16 - 29| Reserved
9423      * 30     | Enable/Disable separate SRG based spatial reuse for OBSS
9424      *        | control frames.
9425      *        | If set to 0, ignore bits 8-15.
9426      * 31     | Enable/Disable separate non-SRG based spatial reuse for OBSS
9427      *        | control frames.
9428      *        | If set to 0, ignore bits 0-7.
9429      */
9430     WMI_PDEV_PARAM_CTRL_FRAME_OBSS_PD_THRESHOLD,
9431 
9432     /* Param to configure the access category for the TWT queue */
9433     WMI_PDEV_PARAM_TWT_AC_CONFIG,
9434 
9435     /*
9436      * TX xretry extension parameter to allow product specific adjustment.
9437      * I.e. multiply the xretry counter by N% for a requirement from framework.
9438      */
9439     WMI_PDEV_PARAM_PDEV_STATS_TX_XRETRY_EXT,
9440 
9441     /*
9442      * Per PDEV level, set the highest rate cap allowed.
9443      * The accepted input values NSS are between 1-8, inclusive.
9444      * The accepted input values MCS are between 0-15, inclusive.
9445      * FW will use the input values as is.
9446      * The rate cap is specified in NSS, MCS format each 4bits.
9447      * i.e., NSS and MCS combined as shown below:
9448      * b'0-b'7  indicate the NSS (NSS value can be from 1-8)
9449      * b'8-b'15 indicate the MCS (MCS value can be from 0-15)
9450      * b'16 Enable or disable nss cap
9451      * b'17 Enable or disable mcs cap
9452      * b'18 To determine the direction for caping DL_direction
9453      * b'19 To determine the direction for caping UL_direction
9454      *
9455      * For backwards compatibility, if bits 18+19 are both
9456      * cleared, then the rate cap applies to both DL and UL.
9457      * To summarize:
9458      *     bit 19 | bit 18 | rate cap applied
9459      *     -------+--------+------------------
9460      *        0   |    0   | cap rates only for DL
9461      *        0   |    1   | cap rates only for DL
9462      *        1   |    0   | cap rates only for UL
9463      *        1   |    1   | cap rates for both UL and DL
9464      */
9465     WMI_PDEV_PARAM_RATE_UPPER_CAP,
9466 
9467     /*
9468      * Per PDEV level, set number of MCS to be dropped based
9469      * on configured retries.
9470      *  bit | config_mode
9471      *  -----------------
9472      *  0-7 | param value for number MCS to be dropped
9473      *  8-15| param value for excess retries
9474      *  16  | If set to 0, number of MCS to be dropped is disabled, i.e.
9475      *      | fall back to default mode.
9476      *      | The default value of MCS to be dropped is 1.
9477      *  17  | if set to 0, retries is disabled/use default retries.
9478      *      | The default value of retries is 3.
9479      */
9480     WMI_PDEV_PARAM_SET_RATE_DROP_DOWN_RETRY_THRESH,
9481 
9482     /*
9483      * Param value to configure min/max probe interval for MCS of current NSS.
9484      * If probe interval expired, ratectrl will probe for MCS of current NSS.
9485      * If probe was successful, rate control updates the probe time with a
9486      * min of probe interval.
9487      * If probe failed for MCS of current NSS, rate control updates the probe
9488      * time by multiplying the probe period with 2, which is not greater than
9489      * max probe interval.
9490      * units = milliseconds
9491      *  bits | config_mode
9492      *  0-15 | minimum probe time for MCS
9493      *  16-31| maximum probe time for MCS
9494      */
9495     WMI_PDEV_PARAM_MIN_MAX_MCS_PROBE_INTERVAL,
9496 
9497     /* Param value to configure min/max probe interval for NSS.
9498      * Rate control will probe for alternate NSS if probe time is expired.
9499      * If probe for an alternate NSS was successful, rate control updates
9500      * the probe time with a min of probe interval.
9501      * If probe failed for alternate NSS, rate control updates the probe time
9502      * by multiplying the probe period with 2, which is not greater than
9503      * max probe interval.
9504      * units = milliseconds
9505      *  bits | config_mode
9506      *  0-15 | minimum probe time for alternate NSS
9507      *  16-32| maximum probe time for alternate NSS
9508      */
9509     WMI_PDEV_PARAM_MIN_MAX_NSS_PROBE_INTERVAL,
9510 
9511     /* Param to enable/disable probing on all BW */
9512     WMI_PDEV_PARAM_EN_PROBE_ALL_BW,
9513 
9514     /* Param to enable/disable updating scrambler seed feature */
9515     WMI_PDEV_PARAM_EN_UPDATE_SCRAM_SEED,
9516 
9517     /*
9518      * Param to set the GPIO Drive Configuration value for
9519      * Smart Antenna Parallel Mode
9520      */
9521     WMI_PDEV_PARAM_SA_PARALLEL_MODE_GPIO_DRIVE_CFG,
9522 
9523     /*
9524      * Param to disable LPI antenna optimizations
9525      * In 6G LPI mode, additional antenna optimizations are done to
9526      * improve range. Param is provided to disable the added
9527      * optimizations.
9528      */
9529     WMI_PDEV_PARAM_DISABLE_LPI_ANT_OPTIMIZATION,
9530 
9531     /*
9532      * Param to configure exclusive RSID range for 11az TB ranging.
9533      * RSID's are subset of total AID space and must not be used
9534      * for any other purpose by Host. FW uses these IDs for trigger
9535      * based ranging.
9536      */
9537     WMI_PDEV_PARAM_RTT_11AZ_RSID_RANGE,
9538 
9539     /*
9540      * Disable the indicated DL and UL scheduler for the PDEV.
9541      *
9542      * This command is not supported in STA mode.
9543      *
9544      * A value of 1 in a given bit position disables the corresponding mode,
9545      * and a value of 0 enables the mode. The WMI_SCHED_MODE_FLAGS enum defines
9546      * the bit positions for each mode.
9547      *
9548      * A single 32 bit value is used to store the following configuration
9549      * bitmap.
9550      *
9551      * This command differs from WMI_VDEV_PARAM_SET_HEMU_MODE and
9552      * WMI_VDEV_PARAM_SET_EHT_MU_MODE in that it is intended for use during
9553      * normal AP operation, and will never cause a VAP restart or other
9554      * capability bit modification. It simply controls the scheduler
9555      * behavior.
9556      *
9557      * bit   | sched mode
9558      * ---------------
9559      *   0   | DL MU-MIMO
9560      *   1   | UL MU-MIMO
9561      *   2   | DL OFDMA
9562      *   3   | UL OFDMA
9563      * 4..31 | RESERVED
9564      */
9565     WMI_PDEV_PARAM_SET_DISABLED_SCHED_MODES,
9566 
9567     /*
9568      * Override default FW behavior and explicitly enable / disable
9569      * to allow frames without encryption when no encryption is set.
9570      *
9571      */
9572     WMI_PDEV_PARAM_BYPASS_ENCRYPTION,
9573 
9574     /*
9575      * Param to Enable/Disable scan blanking feature on the Scan Radio
9576      * Host should ensure to send this param only for Scan Radio
9577      * The WMI_SCAN_BLANKING_MODE enum specifies the possible values for this parameter.
9578      * Based on the received input, the scan blanking feature will be carried out as explained in the enum WMI_SCAN_BLANKING_MODE
9579      */
9580     WMI_PDEV_PARAM_SET_SCAN_BLANKING_MODE,
9581 
9582     /*
9583      * Parameter to enable/disable Multi-Channel Concurrency low latency mode
9584      * bit    | config_mode
9585      * -----------------
9586      *  0     | 0:disable, 1:enable.
9587      *  1-31  | Reserved.
9588      */
9589     WMI_PDEV_PARAM_SET_CONC_LOW_LATENCY_MODE,
9590 
9591     /*
9592      * Parameter to enable/disable low power listen mode
9593      * bit    | config_mode
9594      * -----------------
9595      *  0     | 0:disable, 1:enable.
9596      *  1-31  | Reserved.
9597      */
9598     WMI_PDEV_PARAM_LPL_SETTING,
9599 
9600     /** Set Probe Resp retry limit */
9601     WMI_PDEV_PARAM_PROBE_RESP_RETRY_LIMIT,
9602 
9603     /*
9604      * Parameter for configure PCIE
9605      *
9606      *  0 - Default Value(FW Control).
9607      *  1 - Force PCIE Gen Speed and Lane Width to maximum supported value.
9608      */
9609     WMI_PDEV_PARAM_PCIE_CONFIG,
9610 
9611     /** CTS timeout - change wireless packet cts timeout configuration,
9612      *  units are microseconds
9613      */
9614     WMI_PDEV_PARAM_CTS_TIMEOUT,
9615 
9616     /** Slot time - change wireless packet slot time value dynamically,
9617      *  units are microseconds
9618      */
9619     WMI_PDEV_PARAM_SLOT_TIME,
9620 
9621     /** VO dedicated time -
9622      * allocate dedicated time slots for VO access category across all
9623      * ATF groups in a pdev.
9624      *   Note :
9625      *   1.  Per AC airtime per group is already available through
9626      *       ATF WMM WMI commands
9627      *   2.  The dedicated time slot is applicable per second
9628      *   3.  Units are in milli-seconds
9629      */
9630     WMI_PDEV_PARAM_ATF_VO_DEDICATED_TIME,
9631 
9632     /** VI dedicated time -
9633      * allocate dedicated time slots for VI access category across all
9634      * ATF groups in a pdev.
9635      *   Note :
9636      *   1.  Per AC airtime per group is already given through ATF WMM WMI cmds
9637      *   2.  The dedicated time slot is applicable per second
9638      *   3.  Units are in milli-seconds
9639      */
9640     WMI_PDEV_PARAM_ATF_VI_DEDICATED_TIME,
9641 
9642     /** Parameter used for enabling/disabling RFA toggle for SAP mode */
9643     WMI_PDEV_PARAM_SET_SAP_RFA_TOGGLE,
9644 
9645     /** Parameter to set PDEV level UL OFDMA RTD */
9646     WMI_PDEV_PARAM_UL_OFDMA_RTD,
9647 
9648     /** Parameter to enable/disable tid0 and tid3 mapping to work 3 Link MLO */
9649     WMI_PDEV_PARAM_TID_MAPPING_3LINK_MLO,
9650 
9651     /** Parameter to enable/disable small OFDMA M-RUs **/
9652     WMI_PDEV_PARAM_ENABLE_SMALL_MRU,
9653 
9654     /** Parameter to enable/disable large OFDMA M-RUs **/
9655     WMI_PDEV_PARAM_ENABLE_LARGE_MRU,
9656 
9657     /** Parameter to enable/disable delayed LMR feedback.
9658      * Note: Delayed LMR feedback is supported only up to two ranging peers to
9659      * enable Location certification
9660      * 0 - Immediate LMR feedback is enabled for all ranging peers.
9661      * 1 (non zero) - delayed LMR feedback is enabled. Third peer onward will
9662      *     default to immediate LMR feedback.
9663      **/
9664     WMI_PDEV_PARAM_ENABLE_DELAYED_LMR_FEEDBACK,
9665 
9666     /* DFS_RADAR_MASK: Radar mask setting programmed in HW registers.
9667      *     bit   | config_mode
9668      * -----------------------
9669      *   0  - 15 | Each bit represents a 20 MHz portion of the channel.
9670      *           | 0-Unmasked 1-Masked
9671      *   16 - 31 | Reserved.
9672      * Bit 0 represents the highest 20 MHz portion within the channel.
9673      * For example...
9674      * For a 80 MHz channel, bit0 = highest 20 MHz, bit3 = lowest 20 MHz
9675      * For a 320 MHz channel, bit0 = highest 20 MHz, bit15 = lowest 20 MHz
9676      */
9677     WMI_PDEV_PARAM_DFS_RADAR_MASK,
9678 
9679     /** PWR_REDUCTION_IN_QUARTER_DB:
9680      * Reduce final Tx power (derived after all considerations)
9681      * by specified value in units of 0.25 dB.
9682      * E.g. a value of 4 will result in a 1.0 dB tx power reduction.
9683      */
9684     WMI_PDEV_PARAM_PWR_REDUCTION_IN_QUARTER_DB,
9685 
9686     WMI_PDEV_PARAM_ENABLE_CHIPSET_LOGGING,
9687 
9688     /** SCAN MODE:
9689      *  bit   | scan_mode
9690      * -----------------
9691      *  0     | SISO SCAN - 1x1 scan
9692      *        |     If this bit is 0, then use default scan (NxN).
9693      *  1-31  | Reserved.
9694      */
9695     WMI_PDEV_PARAM_SCAN_MODE,
9696 
9697     /** configure datastall consecutive no ack interval (units = ms) */
9698     WMI_PDEV_PARAM_DSTALL_CONSECUTIVE_TX_NO_ACK_INTERVAL,
9699     /** configure datastall consecutive no ack threshold */
9700     WMI_PDEV_PARAM_DSTALL_CONSECUTIVE_TX_NO_ACK_THRESHOLD,
9701 
9702     WMI_PDEV_PARAM_MGMT_SRNG_REAP_EVENT_THRESHOLD,
9703 } WMI_PDEV_PARAM;
9704 
9705 #define WMI_PDEV_ONLY_BSR_TRIG_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 0, 1)
9706 #define WMI_PDEV_ONLY_BSR_TRIG_ENABLE(trig_type) WMI_SET_BITS(trig_type, 0, 1, 1)
9707 #define WMI_PDEV_ONLY_BSR_TRIG_DISABLE(trig_type) WMI_SET_BITS(trig_type, 0, 1, 0)
9708 
9709 #define WMI_PDEV_ONLY_BASIC_TRIG_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 1, 1)
9710 #define WMI_PDEV_ONLY_BASIC_TRIG_ENABLE(trig_type) WMI_SET_BITS(trig_type, 1, 1, 1)
9711 #define WMI_PDEV_ONLY_BASIC_TRIG_DISABLE(trig_type) WMI_SET_BITS(trig_type, 1, 1, 0)
9712 
9713 #define WMI_PDEV_MU_RTS_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 2, 1)
9714 #define WMI_PDEV_MU_RTS_ENABLE(trig_type) WMI_SET_BITS(trig_type, 2, 1, 1)
9715 #define WMI_PDEV_MU_RTS_DISABLE(trig_type) WMI_SET_BITS(trig_type, 2, 1, 0)
9716 
9717 #define WMI_PDEV_EMBEDDED_TRIGGER_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 3, 1)
9718 #define WMI_PDEV_EMBEDDED_TRIGGER_ENABLE(trig_type) WMI_SET_BITS(trig_type, 3, 1, 1)
9719 #define WMI_PDEV_EMBEDDED_TRIGGER_DISABLE(trig_type) WMI_SET_BITS(trig_type, 3, 1, 0)
9720 
9721 #define WMI_PDEV_TWT_SCHED_CFG_IS_DL_MU_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 0, 1)
9722 #define WMI_PDEV_TWT_SCHED_CFG_DL_MU_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 0, 1, 1)
9723 #define WMI_PDEV_TWT_SCHED_CFG_DL_MU_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 0, 1, 0)
9724 
9725 #define WMI_PDEV_TWT_SCHED_CFG_IS_UL_MU_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 1, 1)
9726 #define WMI_PDEV_TWT_SCHED_CFG_UL_MU_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 1, 1, 1)
9727 #define WMI_PDEV_TWT_SCHED_CFG_UL_MU_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 1, 1, 0)
9728 
9729 #define WMI_PDEV_TWT_SCHED_CFG_IS_WMM_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 2, 1)
9730 #define WMI_PDEV_TWT_SCHED_CFG_WMM_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 2, 1, 1)
9731 #define WMI_PDEV_TWT_SCHED_CFG_WMM_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 2, 1, 0)
9732 
9733 #define WMI_PDEV_TWT_SCHED_CFG_IS_USE_ONLY_BASIC_TRIGGER_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 3, 1)
9734 #define WMI_PDEV_TWT_SCHED_CFG_USE_ONLY_BASIC_TRIGGER_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 3, 1, 1)
9735 #define WMI_PDEV_TWT_SCHED_CFG_USE_ONLY_BASIC_TRIGGER_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 3, 1, 0)
9736 
9737 #define WMI_PDEV_LSIG_LEN_DURATION_ENABLE(lsig_len) WMI_SET_BITS(lsig_len, 0, 31, 1)
9738 #define WMI_PDEV_LSIG_LEN_DURATION_DISABLE(lsig_len) WMI_SET_BITS(lsig_len, 0, 31, 0)
9739 #define WMI_PDEV_LSIG_LEN_DURATION_GET(lsig_len) WMI_GET_BITS(lsig_len, 0, 30)
9740 #define WMI_PDEV_LSIG_LEN_DURATION_SET(lsig_len, value) WMI_SET_BITS(lsig_len, 0, 30, value)
9741 
9742 #define WMI_PDEV_IS_NON_SRG_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 31, 1)
9743 #define WMI_PDEV_NON_SRG_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 1)
9744 #define WMI_PDEV_NON_SRG_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 0)
9745 #define WMI_PDEV_NON_SRG_PD_THRESHOLD_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 0, 8, value)
9746 #define WMI_PDEV_NON_SRG_PD_THRESHOLD_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 0, 8)
9747 
9748 #define WMI_PDEV_IS_SRG_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 30, 1)
9749 #define WMI_PDEV_SRG_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 1)
9750 #define WMI_PDEV_SRG_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 0)
9751 #define WMI_PDEV_SRG_PD_THRESHOLD_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 8, 8, value)
9752 #define WMI_PDEV_SRG_PD_THRESHOLD_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 8, 8)
9753 
9754 #define WMI_PDEV_IS_PD_THRESHOLD_IN_DBM(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 29, 1)
9755 #define WMI_PDEV_SET_PD_THRESHOLD_IN_DBM(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 29, 1, 1)
9756 
9757 #define WMI_PDEV_OBSS_PD_ENABLE_PER_AC_SET(per_ac_cfg, value) WMI_SET_BITS(per_ac_cfg, 0, 4, value)
9758     #define WMI_PDEV_OBSS_PD_ENABLE_PER_AC_GET(per_ac_cfg) WMI_GET_BITS(per_ac_cfg, 0, 4)
9759 #define WMI_PDEV_SRP_ENABLE_PER_AC_SET(per_ac_cfg, value) WMI_SET_BITS(per_ac_cfg, 16, 4, value)
9760     #define WMI_PDEV_SRP_ENABLE_PER_AC_GET(per_ac_cfg) WMI_GET_BITS(per_ac_cfg, 16, 4)
9761 
9762 #define WMI_PDEV_IS_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 31, 1)
9763 #define WMI_PDEV_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 1)
9764 #define WMI_PDEV_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 31, 1, 0)
9765 #define WMI_PDEV_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 0, 8, value)
9766 #define WMI_PDEV_NON_SRG_SEP_PD_THRESH_CTRL_FRAME_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 0, 8)
9767 
9768 #define WMI_PDEV_IS_SRG_SEP_PD_THRESH_CTRL_FRAME_ENABLED(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 30, 1)
9769 #define WMI_PDEV_SRG_SEP_PD_THRESH_CTRL_FRAME_ENABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 1)
9770 #define WMI_PDEV_SRG_SEP_PD_THRESH_CTRL_FRAME_DISABLE(pd_threshold_cfg) WMI_SET_BITS(pd_threshold_cfg, 30, 1, 0)
9771 #define WMI_PDEV_SRG_SEP_PD_THRESH_CTRL_FRAME_SET(pd_threshold_cfg, value) WMI_SET_BITS(pd_threshold_cfg, 8, 8, value)
9772 #define WMI_PDEV_SRG_SEP_PD_THRESH_CTRL_FRAME_GET(pd_threshold_cfg) WMI_GET_BITS(pd_threshold_cfg, 8, 8)
9773 
9774 
9775 #define WMI_PDEV_UPPER_CAP_NSS_GET(value) WMI_GET_BITS(value, 0, 8)
9776 #define WMI_PDEV_UPPER_CAP_NSS_SET(_value, value) WMI_SET_BITS(_value, 0, 8, value)
9777 #define WMI_PDEV_UPPER_CAP_MCS_GET(value) WMI_GET_BITS(value, 8, 8)
9778 #define WMI_PDEV_UPPER_CAP_MCS_SET(_value, value) WMI_SET_BITS(_value, 8, 8, value)
9779 #define WMI_PDEV_UPPER_CAP_NSS_VALID_GET(value) WMI_GET_BITS(value, 16, 1)
9780 #define WMI_PDEV_UPPER_CAP_NSS_VALID_SET(_value, value) WMI_SET_BITS(_value, 16, 1, value)
9781 #define WMI_PDEV_UPPER_CAP_MCS_VALID_GET(value) WMI_GET_BITS(value, 17, 1)
9782 #define WMI_PDEV_UPPER_CAP_MCS_VALID_SET(_value, value) WMI_SET_BITS(_value, 17, 1, value)
9783 #define WMI_PDEV_UPPER_CAP_DL_DIR_GET(value) WMI_GET_BITS(value, 18, 1)
9784 #define WMI_PDEV_UPPER_CAP_DL_DIR_SET(_value, value) WMI_SET_BITS(_value, 18, 1, value)
9785 #define WMI_PDEV_UPPER_CAP_UL_DIR_GET(value) WMI_GET_BITS(value, 19, 1)
9786 #define WMI_PDEV_UPPER_CAP_UL_DIR_SET(_value, value) WMI_SET_BITS(_value, 19, 1, value)
9787 
9788 #define WMI_PDEV_RATE_DROP_NUM_MCS_GET(value) WMI_GET_BITS(value, 0, 8)
9789 #define WMI_PDEV_RATE_DROP_NUM_MCS_SET(_value, value) WMI_SET_BITS(_value, 0, 8, value)
9790 #define WMI_PDEV_RATE_DROP_RETRY_THRSH_GET(value) WMI_GET_BITS(value, 8, 8)
9791 #define WMI_PDEV_RATE_DROP_RETRY_THRSH_SET(_value, value) WMI_SET_BITS(_value, 8, 8, value)
9792 #define WMI_PDEV_RATE_DROP_NUM_MCS_VALID_GET(value) WMI_GET_BITS(value, 16, 1)
9793 #define WMI_PDEV_RATE_DROP_NUM_MCS_VALID_SET(_value, value) WMI_SET_BITS(_value, 16, 1, value)
9794 #define WMI_PDEV_RATE_DROP_RETRY_THRSH_VALID_GET(value) WMI_GET_BITS(value, 17, 1)
9795 #define WMI_PDEV_RATE_DROP_RETRY_THRSH_VALID_SET(_value, value) WMI_SET_BITS(_value, 17, 1, value)
9796 
9797 #define WMI_PDEV_RATE_MIN_MCS_PROBE_INTERVAL_GET(value) WMI_GET_BITS(value, 0, 16)
9798 #define WMI_PDEV_RATE_MIN_MCS_PROBE_INTERVAL_SET(_value, value) WMI_SET_BITS(_value, 0, 16, value)
9799 #define WMI_PDEV_RATE_MAX_MCS_PROBE_INTERVAL_GET(value) WMI_GET_BITS(value, 16, 16)
9800 #define WMI_PDEV_RATE_MAX_MCS_PROBE_INTERVAL_SET(_value, value) WMI_SET_BITS(_value, 16, 16, value)
9801 
9802 #define WMI_PDEV_RATE_MIN_NSS_PROBE_INTERVAL_GET(value) WMI_GET_BITS(value, 0, 16)
9803 #define WMI_PDEV_RATE_MIN_NSS_PROBE_INTERVAL_SET(_value, value) WMI_SET_BITS(_value, 0, 16, value)
9804 #define WMI_PDEV_RATE_MAX_NSS_PROBE_INTERVAL_GET(value) WMI_GET_BITS(value, 16, 16)
9805 #define WMI_PDEV_RATE_MAX_NSS_PROBE_INTERVAL_SET(_value, value) WMI_SET_BITS(_value, 16, 16, value)
9806 
9807 #define WMI_MBSSID_CTRL_FRAME_BASIC_TRIGGER ((A_UINT32) 1 << 0)
9808 #define WMI_MBSSID_CTRL_FRAME_BSR_TRIGGER ((A_UINT32) 1 << 1)
9809 #define WMI_MBSSID_CTRL_FRAME_MU_RTS_TRIGGER ((A_UINT32) 1 << 2)
9810 #define WMI_MBSSID_CTRL_FRAME_UL_MU_MIMO_TRIGGER ((A_UINT32) 1 << 3)
9811 
9812 typedef struct {
9813     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param */
9814     /** pdev_id for identifying the MAC
9815      * See macros starting with WMI_PDEV_ID_ for values.
9816      */
9817     A_UINT32 pdev_id;
9818     /** parameter id   */
9819     A_UINT32 param_id; /* WMI_PDEV_PARAM */
9820     /** parameter value */
9821     A_UINT32 param_value;
9822 } wmi_pdev_set_param_cmd_fixed_param;
9823 
9824 /* param values for WMI_PDEV_PARAM_SET_TBTT_CTRL's TBTT_CTRL_CFG bit-field */
9825 typedef enum {
9826     WMI_TBTT_CTRL_HW_TRUNCATE = 0,
9827     WMI_TBTT_CTRL_SW_TRUNCATE,
9828     WMI_TBTT_CTRL_IGNORE_TBTT,
9829 
9830     WMI_TBTT_CTRL_MAX = 0x7,
9831 } WMI_TBTT_CTRL_CFG;
9832 
9833 /** MACRO to set / get TBTT_CTRL_CFG bit-field within
9834  *  WMI_PDEV_PARAM_SET_TBTT_CTRL:
9835  *      bits 0~2 : TBTT_CTRL_CFG
9836  *      bits 3~31: Reserved (set to 0x0)
9837  */
9838 #define WMI_PDEV_PARAM_TBTT_CTRL_CFG_S  0
9839 #define WMI_PDEV_PARAM_TBTT_CTRL_CFG    0x00000007
9840 
9841 #define WMI_PDEV_PARAM_GET_TBTT_CTRL_CFG(word32) \
9842     WMI_F_MS(word32, WMI_PDEV_PARAM_TBTT_CTRL_CFG)
9843 #define WMI_PDEV_PARAM_SET_TBTT_CTRL_CFG(word32, value) \
9844     WMI_F_RMW(word32,value,WMI_PDEV_PARAM_TBTT_CTRL_CFG)
9845 
9846 /** MACRO define to set / get 11b and 11ag mode TX chain number:
9847  *  bit 0~15 : 11b mode TX chain number.
9848  *  bit 16~31: 11ag mode TX chain number.
9849  */
9850 #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM_S  0
9851 #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM    0x0000FFFF
9852 #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM_S 16
9853 #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM   0xFFFF0000
9854 
9855 #define WMI_PDEV_PARAM_GET_11B_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
9856 #define WMI_PDEV_PARAM_SET_11B_TX_CHAIN_NUM(word32, value)  WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
9857 
9858 #define WMI_PDEV_PARAM_GET_11AG_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
9859 #define WMI_PDEV_PARAM_SET_11AG_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
9860 
9861 /* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
9862 typedef enum {
9863     WMI_CTS_CBW_INVALID = 0,
9864     WMI_CTS_CBW_20,
9865     WMI_CTS_CBW_40,
9866     WMI_CTS_CBW_80,
9867     WMI_CTS_CBW_80_80,
9868     WMI_CTS_CBW_160,
9869 } WMI_CTS_CBW;
9870 
9871 typedef struct {
9872     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param */
9873     /** pdev_id for identifying the MAC
9874      * See macros starting with WMI_PDEV_ID_ for values.
9875      */
9876     A_UINT32 pdev_id;
9877     /** parameter   */
9878     A_UINT32 param;
9879 } wmi_pdev_get_tpc_config_cmd_fixed_param;
9880 
9881 typedef struct {
9882     A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_div_get_rssi_antid_fixed_param */
9883     /** pdev_id for identifying the MAC */
9884     A_UINT32 pdev_id;
9885     /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
9886     A_UINT32 chain_rssi[WMI_MAX_CHAINS];
9887     /** index of the last-used antenna for each chain */
9888     A_UINT32 ant_id[WMI_MAX_CHAINS];
9889     /** mac address of diversity peer */
9890     wmi_mac_addr macaddr;
9891 } wmi_pdev_div_get_rssi_antid_fixed_param;
9892 
9893 typedef enum {
9894     WMI_TPC_STATS_EVENT_SEND_REG          = 0x00000001,
9895     WMI_TPC_STATS_EVENT_SEND_RATE         = 0x00000002,
9896     WMI_TPC_STATS_EVENT_SEND_CTL          = 0x00000004,
9897     WMI_TPC_STATS_EVENT_SEND_REG_RATE_CTL = 0x00000007, /* REG | RATE | CTL */
9898 } WMI_PDEV_TPC_STATS_PARAMS;
9899 
9900 typedef enum {
9901     WMI_HALPHY_TPC_STATS_SUPPORT_160 = 0,
9902     WMI_HALPHY_TPC_STATS_SUPPORT_320,
9903     WMI_HALPHY_TPC_STATS_SUPPORT_AX,
9904     WMI_HALPHY_TPC_STATS_SUPPORT_AX_EXTRA_MCS,
9905     WMI_HALPHY_TPC_STATS_SUPPORT_BE,
9906     WMI_HALPHY_TPC_STATS_SUPPORT_BE_PUNC,
9907     WMI_HALPHY_TPC_STATS_SUPPORT_CTL_DESIGN_1,
9908 } WMI_HALPHY_TPC_STATS_SUPPORT_BITF; /* support bit fields */
9909 
9910 typedef struct {
9911     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_stats_cmd_fixed_param */
9912     /** pdev_id for identifying the MAC
9913      * See macros starting with WMI_PDEV_ID_ for values.
9914      */
9915     A_UINT32 pdev_id;
9916     /** parameter -
9917      * This is to specify whether we want only the target power
9918      * information (rates array) or the CTL power or the regulatory
9919      * power information. At present, we send all of them.
9920      */
9921     A_UINT32 param; /* Currently expect WMI_TPC_STATS_EVENT_SEND_REG_RATE_CTL
9922                      * as a host specification that rates array, regulatory
9923                      * power array, and ctl power array are all to be sent.
9924                      * See WMI_PDEV_TPC_STATS_PARAMS.
9925                      */
9926 } wmi_pdev_get_tpc_stats_cmd_fixed_param;
9927 
9928 typedef struct {
9929     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_stats_event_fixed_param */
9930     A_UINT32 pdev_id; /* pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values */
9931     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  */
9932     A_UINT32 event_count; /* Incremented for every event chunk for Host to know the sequence */
9933     /* wmi_tpc_configs TLV to optionally follow */
9934     /* wmi_max_reg_power_allowed TLVs to optionally follow */
9935     /* wmi_tpc_rates_array TLVs to optionally follow */
9936     /* wmi_tpc_ctl_pwr_table TLVs to optionally follow */
9937 } wmi_pdev_get_tpc_stats_event_fixed_param;
9938 
9939 typedef struct {
9940     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tpc_configs */
9941     A_UINT32 regDomain;
9942     A_UINT32 chanFreq; /* current channel in MHz */
9943     A_UINT32 phyMode;  /* current phy mode - See WLAN_PHY_MODE for the different phy modes */
9944     A_UINT32 maxAntennaGain; /* Maximum antenna gain for the current regulatory in 0.25 dBm steps */
9945     A_UINT32 twiceMaxRDPower; /* Maximum transmit power allowed in the regulatory domain in 0.25 dBm steps */
9946     A_INT32 userAntennaGain; /* User specified antenna gain in 0.25 dBm steps */
9947     A_UINT32 powerLimit; /* The overall power limit in 0.25 dBm steps */
9948     A_UINT32 rateMax; /* The total number of rates supported */
9949     A_UINT32 numTxChain; /* The total number of active chains */
9950     A_UINT32 ctl; /* See CONFORMANCE_TEST_LIMITS enumeration */
9951     A_UINT32 flags; /* See WMI_TPC_CONFIG_EVENT_FLAG */
9952 
9953     /* support_bits:
9954      * Tells info about BE, HE, HE_EXTRA_MCS, 160, 320, 11BE PUNC.
9955      * Refer to enum WMI_HALPHY_TPC_STATS_SUPPORT_BITF.
9956      */
9957     A_UINT32 support_bits;
9958     A_UINT32 nss; /* target specific NUM_SPATIAL_STREAM flag */
9959 } wmi_tpc_configs;
9960 
9961 typedef struct {
9962     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_max_reg_power_allowed */
9963     A_UINT32 reg_power_type; /* 0: maxRegAllowedPower (1D array),
9964                               * 1: maxRegAllowedPowerAGCDD (2D array),
9965                               * 2: maxRegAllowedPowerAGSTBC (2D array),
9966                               * 3: maxRegAllowedPowerAGTXBF (2D array)
9967                               */
9968     A_UINT32 reg_power_array_len; /* Length of the regulatory power array being sent in bytes */
9969     A_UINT32 d1;  /* the length of 1st (innermost) dimension array */
9970     A_UINT32 d2;  /* the length of 2nd dimension array */
9971     A_UINT32 d3;  /* the length of 3rd dimension array (for future use) */
9972     A_UINT32 d4;  /* the length of 4th dimension array (for future use) */
9973     /*
9974      * This TLV is followed by an A_INT16 TLV-array that will carry
9975      * one of the four types of regulatory power arrays.
9976      *
9977      * The multi-dimensional regulatory power array will be communicated
9978      * as a flat array: Host to stitch it back as 2D array.
9979      * For an array[a][b][c][d], d1 = d, d2 = c, d3 = b, d4 = a
9980      * For a 2D array, array[a][b], d1 = b, d2 = a, d3 = 1, d4 = 1
9981      * The possible types of following A_INT16 TLV arrays are
9982      * 1. A_INT16  maxRegAllowedPower[WHAL_TPC_TX_NUM_CHAIN];
9983      * 2. A_INT16  maxRegAllowedPowerAGCDD[WHAL_TPC_TX_NUM_CHAIN - 1][WHAL_TPC_TX_NUM_CHAIN - 1];
9984      * 3. A_INT16  maxRegAllowedPowerAGSTBC[WHAL_TPC_TX_NUM_CHAIN - 1][WHAL_TPC_TX_NUM_CHAIN - 1];
9985      * 4. A_INT16  maxRegAllowedPowerAGTXBF[WHAL_TPC_TX_NUM_CHAIN - 1][WHAL_TPC_TX_NUM_CHAIN - 1];
9986      * where WHAL_TPC_TX_NUM_CHAIN=2 for CYP and 8 for HK.
9987      */
9988 } wmi_max_reg_power_allowed;
9989 
9990 typedef struct {
9991     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tpc_rates_array */
9992     A_UINT32 rate_array_type; /* 0: ratesArray,
9993                                * 1: ratesArray2 (for chain > 4),
9994                                * 2: dl_ofdma rate array
9995                                */
9996     A_UINT32 rate_array_len;
9997     /* This TLV will be followed by an A_UINT16 TLV array that will
9998      * carry one of the types of TPC rate arrays.
9999      * All the rates arrays are 1D arrays.
10000      * The possible types of following A_UINT16 TLV arrays are
10001      * 1. A_UINT16 ratesArray[WHAL_TPC_RATE_MAX];
10002      *    This array has to be referred when number of active chains is < 4
10003      * 2. A_UINT16 ratesArray2[WHAL_TPC_RATE_MAX];
10004      *    This array has to be referred when number of active chains is > 4
10005      * 3. A_UINT16 ratesArray_DL_OFDMA[72];
10006      * WHAL_TPC_RATE_MAX is 748 for HK (considering PHY A0 8x8)
10007      * WHAL_TPC_RATE_MAX is 188 for CYP (considering PHY A0 2x2)
10008      * Each 16 bit value in the rates array carries both SU and MU
10009      * target power information.
10010      * Bits 0:7 contained the SU target power (signed value, 0.25 dBm units),
10011      * bits 8:15 denote the MU target power (signed value, 0.25 dBm units).
10012      */
10013 } wmi_tpc_rates_array;
10014 
10015 typedef struct {
10016     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tpc_ctl_pwr_table */
10017     A_UINT32 ctl_array_type; /* 0: ctl_array,
10018                               * 1: ctl_160 array,
10019                               * 2: ctl_dlOfdma array,
10020                               * 3: ctl_ulOfdma array
10021                               */
10022     A_UINT32 ctl_array_len; /* Length of the CTL array being sent in bytes */
10023     A_UINT32 end_of_ctl_pwr; /* Message MAY be split into smaller chunks
10024                               * to fit in the WMI svc msg size limit:
10025                               * 0 indicates more chunks of CTL info to follow,
10026                               * 1 indicates end of CTL info.
10027                               */
10028     A_UINT32 ctl_pwr_count; /* Incremented for every CTL info chunk
10029                              * for Host to know the sequence.
10030                              */
10031     A_UINT32 d1;  /* the length of 1st (innermost) dimension array */
10032     A_UINT32 d2;  /* the length of 2nd dimension array */
10033     A_UINT32 d3;  /* the length of 3rd dimension array */
10034     A_UINT32 d4;  /* the length of 4th dimension array */
10035     /* This TLV will be followed by an A_INT8 TLV-array that will
10036      * carry one the types of CTL power arrays.
10037      * The CTL array will be multi-dimensional, but will be communicated as
10038      * a flat array; the host has to stitch it back into a 4D array.
10039      * The possible types of following A_INT8 arrays are
10040      * 1. A_INT8 ctlEdgePwrBF[WHAL_MAX_NUM_CHAINS][2][10][8];
10041      * 2. A_INT8 ctlEdgePwr160[WHAL_MAX_NUM_CHAINS/2][2][2][4];
10042      * 3. A_INT8 ctlEdgePwrBF_dlOFDMA[WHAL_MAX_NUM_CHAINS][2][3][8];
10043      * For e.g., in ctlEdgePwrBF
10044      * D4 = WHAL_MAX_NUM_CHAINS = 8 for HK, 2 for CYP, 4 for Pine
10045      * D3 = BF on/off = 2
10046      * D2 = 10 which the number of different tx modes,
10047      *      like cck, legacy, HT20, HT40, VHT80, etc.
10048      * D1 = NSS = 8, number of spatial streams
10049      * Total number of elements = D4*D3*D2*D1
10050      * The same will apply for ctl_dlOfdma array, except that the values
10051      * of d1,d2,d3,d4 will be different.
10052      */
10053 } wmi_tpc_ctl_pwr_table;
10054 
10055 typedef struct {
10056     A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_request_fixed_param */
10057     A_UINT32 param;   /* 1 = read only, 2= read and clear */
10058     A_UINT32 pdev_id; /* pdev_id for identifying mac */
10059 } wmi_pdev_bss_chan_info_request_fixed_param;
10060 
10061 typedef struct {
10062     A_UINT32 tlv_header;    /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_request_fixed_param */
10063     A_UINT32 total_len;     /* the total number of ctl table bytes to be transferred */
10064     A_UINT32 len;           /* the number of ctltable bytes in current payload */
10065     A_UINT32 seq;           /* the number of current transfers */
10066 /*
10067  * This TLV is followed by the following additional TLVs:
10068  * ARRAY_BYTE TLV of ctltable_data
10069  */
10070 } wmi_pdev_update_ctltable_request_fixed_param;
10071 
10072 #define WMI_ESP_ESTIMATE_GET_BE(airtime)         WMI_GET_BITS(airtime, 0, 8)
10073 #define WMI_ESP_ESTIMATE_SET_BE(airtime, value)  WMI_SET_BITS(airtime, 0, 8, value)
10074 
10075 #define WMI_ESP_ESTIMATE_GET_BK(airtime)         WMI_GET_BITS(airtime, 8, 8)
10076 #define WMI_ESP_ESTIMATE_SET_BK(airtime, value)  WMI_SET_BITS(airtime, 8, 8, value)
10077 
10078 #define WMI_ESP_ESTIMATE_GET_VI(airtime)         WMI_GET_BITS(airtime, 16, 8)
10079 #define WMI_ESP_ESTIMATE_SET_VI(airtime, value)  WMI_SET_BITS(airtime, 16, 8, value)
10080 
10081 #define WMI_ESP_ESTIMATE_GET_VO(airtime)         WMI_GET_BITS(airtime, 24, 8)
10082 #define WMI_ESP_ESTIMATE_SET_VO(airtime, value)  WMI_SET_BITS(airtime, 24, 8, value)
10083 
10084 typedef struct {
10085     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_esp_estimate_event_fixed_param */
10086     /** pdev_id for identifying the MAC
10087      * See macros starting with WMI_PDEV_ID_ for values.
10088      * In non-DBDC case host should set it to 0
10089      */
10090     A_UINT32 pdev_id;
10091     /*
10092      * Percentage of air time available for each AC
10093      * BIT[0-7]   : AC_BE
10094      * BIT[8-15]  : AC_BK
10095      * BIT[16-23] : AC_VI
10096      * BIT[24-31] : AC_VO
10097      */
10098     A_UINT32 ac_airtime_percentage;
10099 } wmi_esp_estimate_event_fixed_param;
10100 
10101 #define WMI_FAST_DIVERSITY_BIT_OFFSET 0
10102 #define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
10103 
10104 #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT 2
10105 #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
10106 #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_GET_BITS(word32) \
10107     (((word32) & WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
10108 #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SET_BITS(word32, value) \
10109     do { \
10110         (word32) &= ~WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
10111         (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) & \
10112             WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
10113     } while (0)
10114 
10115 #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT 6
10116 #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
10117 #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_GET_BITS(word32) \
10118     (((word32) & WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
10119 #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SET_BITS(word32, value) \
10120     do { \
10121         (word32) &= ~WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
10122         (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) & \
10123             WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
10124     } while (0)
10125 
10126 typedef struct {
10127     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param */
10128     union {
10129         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
10130         /** pdev_id for identifying the MAC
10131          * See macros starting with WMI_PDEV_ID_ for values.
10132          */
10133         A_UINT32 pdev_id;
10134     };
10135     /**
10136      * The following "value" field is divided into bit fields as follows:
10137      *     bits | purpose
10138      *     -----+---------------------------------------
10139      *        0 | enable/disable FAST diversity
10140      *        1 | enable/disable SLOW diversity
10141      *      5:2 | chain0 slow-diversity weighting factor
10142      *      9:6 | chain1 slow-diversity weighting factor
10143      *     31:10| currently unused (set to 0x0)
10144      * Refer to the above WMI_[FAST/SLOW]_DIVERSITY constants.
10145      */
10146     A_UINT32 value;
10147 } wmi_pdev_set_antenna_diversity_cmd_fixed_param;
10148 
10149 #define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
10150 
10151 typedef struct {
10152     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param */
10153     A_UINT32 vdev_id; /* vdev_id, where RSSI monitoring will take place */
10154     A_UINT32 request_id; /* host will configure request_id and firmware echo this id in RSSI_BREACH_EVENT */
10155     A_UINT32 enabled_bitmap; /* bit [0-2] = low_rssi_breach_enabled[0-2] enabled, bit [3-5] = hi_rssi_breach_enabled[0-2] */
10156     A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] > [1] > [2] */
10157     A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] < [1] < [2] */
10158     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] */
10159     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] */
10160     A_UINT32 min_report_interval; /* After last event is generated, we wait until this interval to generate next event  */
10161     A_UINT32 max_num_report; /* this is to suppress number of event to be generated */
10162 } wmi_rssi_breach_monitor_config_fixed_param;
10163 
10164 typedef struct {
10165     /** parameter   */
10166     A_UINT32 param;
10167 } wmi_pdev_dump_cmd;
10168 
10169 typedef enum {
10170     PAUSE_TYPE_CHOP =           0x1, /** for MCC (switch channel), only vdev_map is valid */
10171     PAUSE_TYPE_PS =             0x2, /** for peer station sleep in sap mode, only peer_id is valid */
10172     PAUSE_TYPE_UAPSD =          0x3, /** for uapsd, only peer_id and tid_map are valid. */
10173     PAUSE_TYPE_P2P_CLIENT_NOA = 0x4, /** only vdev_map is valid, actually only one vdev id is set at one time */
10174     PAUSE_TYPE_P2P_GO_PS =      0x5, /** only vdev_map is valid, actually only one vdev id is set at one time */
10175     PAUSE_TYPE_STA_ADD_BA =     0x6, /** only peer_id and tid_map are valid, actually only one tid is set at one time */
10176     PAUSE_TYPE_AP_PS =          0x7, /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
10177     PAUSE_TYPE_IBSS_PS =        0x8, /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
10178     PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9, /** for TDLS offchannel MCC (switch channel), only vdev_map is valid, TDLS connection tracker needs to be notified */
10179 
10180     PAUSE_TYPE_HOST =           0x15, /* host is requesting vdev pause */
10181 } wmi_tx_pause_type;
10182 
10183 typedef enum {
10184     ACTION_PAUSE =     0x0,
10185     ACTION_UNPAUSE =   0x1,
10186 } wmi_tx_pause_action;
10187 
10188 typedef struct {
10189     A_UINT32 tlv_header;
10190     A_UINT32 pause_type;
10191     A_UINT32 action;
10192     A_UINT32 vdev_map;
10193     A_UINT32 peer_id;
10194     A_UINT32 tid_map;
10195 } wmi_tx_pause_event_fixed_param;
10196 
10197 typedef enum {
10198     WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
10199     WMI_MGMT_TX_COMP_TYPE_DISCARD,
10200     WMI_MGMT_TX_COMP_TYPE_INSPECT,
10201     WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
10202     WMI_MGMT_TX_COMP_TYPE_MAX,
10203 } WMI_MGMT_TX_COMP_STATUS_TYPE;
10204 
10205 #define WMI_VDEV_ID_VALID_FROM_INFO_GET(info) \
10206     WMI_GET_BITS(info, 3, 1)
10207 #define WMI_VDEV_ID_VALID_FROM_INFO_SET(info,val) \
10208     WMI_SET_BITS(info, 3, 1, val)
10209 
10210 #define WMI_VDEV_ID_FROM_INFO_GET(info) \
10211     WMI_GET_BITS(info, 4, 8)
10212 #define WMI_VDEV_ID_FROM_INFO_SET(info,val) \
10213     WMI_SET_BITS(info, 4, 8, val)
10214 
10215 typedef struct {
10216     A_UINT32    tlv_header;
10217     A_UINT32    desc_id; /* from tx_send_cmd */
10218     A_UINT32    status;  /* WMI_MGMT_TX_COMP_STATUS_TYPE */
10219     /** pdev_id for identifying the MAC that transmitted the mgmt frame
10220      * See macros starting with WMI_PDEV_ID_ for values.
10221      */
10222     A_UINT32    pdev_id;
10223     /* ppdu_id
10224      * Hardware PPDU ID for tracking the completion stats
10225      * A ppdu_id value of 0x0 is invalid, and should be ignored.
10226      */
10227     A_UINT32    ppdu_id;
10228     /* ack_rssi
10229      * TX mgmt ack RSSI report to host.
10230      * Only valid when status == COMPLETE_OK and the ACK_RSSI report is enabled
10231      * ACK RSSI is reported as SNR dB, i.e. how many dB the RSSI is above
10232      * the noise floor.
10233      */
10234     A_UINT32    ack_rssi;
10235     /* xmit rate in kbps */
10236     A_UINT32 tx_rate;
10237     /* phy mode WLAN_PHY_MODE of the channel defined in wlan_defs.h */
10238     A_UINT32 peer_phymode;
10239     A_UINT32 retries_count;
10240     /* current 64 bit TSF timestamp */
10241     A_UINT32 tx_tsf_l32;
10242     A_UINT32 tx_tsf_u32;
10243     /* info:
10244      * Bit[0:2]   - band on which frame is sent, band value will be
10245      *              one of the wmi_mlo_band_info_t enum constants.
10246      *              Macros WMI_ROAM_BTM_RESP_MLO_BAND_INFO_GET,SET
10247      *              can be reused for setting mlo band info.
10248      * Bit[3]     - set when vdev_id_info is populated in Bit[4:11]
10249      *              macros WMI_VDEV_ID_VALID_FROM_INFO_GET,SET can be used
10250      * Bit[4:11]  - vdev_id on which frame is sent,
10251      *              Macros WMI_VDEV_ID_FROM_INFO_GET,SET can be used
10252      * Bit[12:31] - reserved
10253      */
10254     A_UINT32 info;
10255 } wmi_mgmt_tx_compl_event_fixed_param;
10256 
10257 typedef struct {
10258     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_compl_event_fixed_param */
10259     A_UINT32    desc_id; /* from tx_send_cmd */
10260     A_UINT32    status;  /* same status as WMI_MGMT_TX_COMP_STATUS_TYPE */
10261     /** pdev_id for identifying the MAC that transmitted the mgmt frame
10262      * See macros starting with WMI_PDEV_ID_ for values.
10263      */
10264     A_UINT32    pdev_id;
10265     /* ppdu_id
10266      * Hardware PPDU ID for tracking the completion stats
10267      * A ppdu_id value of 0x0 is invalid, and should be ignored.
10268      */
10269     A_UINT32    ppdu_id;
10270 } wmi_offchan_data_tx_compl_event_fixed_param;
10271 
10272 typedef struct {
10273     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_qos_null_frame_tx_compl_event_fixed_param */
10274     A_UINT32    desc_id; /* echoed from tx_send_cmd */
10275     A_UINT32    status;  /* same status as WMI_MGMT_TX_COMP_STATUS_TYPE */
10276     /** pdev_id for identifying the MAC that transmitted the QoS NULL frame
10277      * See macros starting with WMI_PDEV_ID_ for values.
10278      */
10279     A_UINT32    pdev_id;
10280     /* ppdu_id
10281      * Hardware PPDU ID for tracking the completion stats
10282      * A ppdu_id value of 0x0 is invalid, and should be ignored.
10283      */
10284     A_UINT32    ppdu_id;
10285     /* ack_rssi
10286      * TX mgmt ack RSSI report to host.
10287      * Only valid when status == COMPLETE_OK and the ACK_RSSI report is enabled
10288      * ack_rssi is reported in dBm.
10289      */
10290     A_INT32    ack_rssi;
10291 } wmi_qos_null_frame_tx_compl_event_fixed_param;
10292 
10293 typedef struct {
10294     A_UINT32    tlv_header;
10295     A_UINT32    num_reports;
10296     /* tlv for completion
10297      * A_UINT32 desc_ids[num_reports]; <- from tx_send_cmd
10298      * A_UINT32 status[num_reports];   <- WMI_MGMT_TX_COMP_STATUS_TYPE
10299      * A_UINT32 ppdu_id[num_reports];  <- list of PPDU IDs
10300      * A_UINT32 ack_rssi[num_reports]; <- list of ack RSSI
10301      *                                    RSSI units = dB w.r.t. noise floor
10302      */
10303 } wmi_mgmt_tx_compl_bundle_event_fixed_param;
10304 
10305 #define WMI_TPC_RATE_MAX            160
10306 /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
10307 #define WMI_TPC_TX_NUM_CHAIN        4
10308 
10309 typedef enum {
10310     /* bits 0-7 for table flags */
10311     WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD  = 0x1,
10312     WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
10313     WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
10314 
10315     /* bits 8-11 for interface version flags */
10316     WMI_TPC_CONFIG_EVENT_FLAG_IF_MASK = 0x0F00,
10317     WMI_TPC_CONFIG_EVENT_FLAG_IF_V1   = 0x0100,
10318 } WMI_TPC_CONFIG_EVENT_FLAG;
10319 
10320 typedef struct {
10321     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param  */
10322     A_UINT32 regDomain;
10323     A_UINT32 chanFreq;
10324     A_UINT32 phyMode;
10325     A_UINT32 twiceAntennaReduction;
10326     A_UINT32 twiceMaxRDPower;
10327     A_INT32 twiceAntennaGain;
10328     A_UINT32 powerLimit;
10329     A_UINT32 rateMax;
10330     A_UINT32 numTxChain;
10331     A_UINT32 ctl;
10332     A_UINT32 flags;
10333     /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
10334     A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
10335     A_INT8 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
10336     A_INT8 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
10337     A_INT8 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
10338      /** pdev_id for identifying the MAC
10339       * See macros starting with WMI_PDEV_ID_ for values.
10340       */
10341     A_UINT32 pdev_id;
10342 /* This TLV is followed by further TLVs:
10343  * 1.  byte array:
10344  *      A_UINT8 ratesArray[];
10345  * 2a. multi-dimensional array dimension spec:
10346  *      wmi_tlv_arrays_len_param ctlPwrTbl_param[0 or 1]
10347  *
10348  * 2b. ctl power table
10349  *      A_UINT8 ctlPwrTbl_buf[bf][modes][nss], i.e.
10350  *      A_UINT8 ctlPwrTbl_buf[d3_len * d2_len * d1_len]
10351  *      bf is [0 or 1] for [on or off].
10352  *      For 2G, modes is [0,   1,      2,       or 3] for
10353  *                       [cck, legacy, (v)ht20, or (v)ht40]
10354  *      For 5G, modes is [0,      1,       2,       or 3] for
10355  *                       [legacy, (v)ht20, (v)ht40, or vht80]
10356  *      nss is [0, 1, 2, or 3] for the number of streams 1~4.
10357  */
10358 } wmi_pdev_tpc_config_event_fixed_param;
10359 
10360 typedef struct {
10361     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_div_rssi_antid_event_fixed_param */
10362     A_UINT32 tlv_header;
10363     /** how many elements in the MAX_CHAINS arrays below contain valid info */
10364     A_UINT32 num_chains_valid;
10365     /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
10366     A_UINT32 chain_rssi[WMI_MAX_CHAINS];
10367     /** index of the last-used antenna for each chain */
10368     A_UINT32 ant_id[WMI_MAX_CHAINS];
10369     /** mac address of diversity peer */
10370     wmi_mac_addr macaddr;
10371     /* EVM value for stream0 and stream1 20Mhz, dB units */
10372     A_INT32 chain_evm[WMI_MAX_CHAINS];
10373 } wmi_pdev_div_rssi_antid_event_fixed_param;
10374 
10375 typedef struct {
10376     A_UINT32 tlv_header;                /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_event_fixed_param */
10377     A_UINT32 freq;                      /* Units in MHz */
10378     A_INT32 noise_floor;                /* units are dBm */
10379 
10380     /* rx clear - how often the channel was unused */
10381     A_UINT32 rx_clear_count_low;        /* low 31 bits of rx_clear cnt in 64bits format */
10382     A_UINT32 rx_clear_count_high;       /* high 31 bits of rx_clear cnt in 64bits format */
10383 
10384     /* cycle count - elapsed time during the measured period, in clock ticks */
10385     A_UINT32 cycle_count_low;           /* low 31 bits of cycle cnt in 64bits format */
10386     A_UINT32 cycle_count_high;          /* high 31 bits of cycle cnt in 64bits format */
10387 
10388     /* tx cycle count - elapsed time spent in tx, in clock ticks */
10389     A_UINT32 tx_cycle_count_low;        /* low 31 bits of tx_cycle cnt in 64bits format */
10390     A_UINT32 tx_cycle_count_high;       /* high 31 bits of tx_cycle cnt in 64bits format */
10391 
10392     /* rx cycle count - elapsed time spent in rx, in clock ticks */
10393     A_UINT32 rx_cycle_count_low;        /* low 31 bits of rx_cycle cnt in 64bits format */
10394     A_UINT32 rx_cycle_count_high;       /* high 31 bits of rx_cycle cnt in 64bits format */
10395 
10396     A_UINT32 rx_bss_cycle_count_low;    /* low 31 bits of rx cycle cnt for my bss in 64bits format */
10397     A_UINT32 rx_bss_cycle_count_high;   /* high 31 bits of rx_cycle cnt for my bss in 64bits format */
10398     A_UINT32 pdev_id;                   /* pdev_id for identifying the MAC */
10399 } wmi_pdev_bss_chan_info_event_fixed_param;
10400 
10401 typedef struct {
10402     /* WMI event response update ctltable request to host */
10403     A_UINT32 tlv_header;                /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_event_fixed_param */
10404     A_UINT32 total_len;                 /* the total number of bytes to be transferred */
10405     A_UINT32 len;                       /* the number of FW received bytes from host */
10406     A_UINT32 seq;                       /* the number of current transfers */
10407 } wmi_pdev_update_ctltable_event_fixed_param;
10408 
10409 typedef struct {
10410     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param  */
10411     A_UINT32 periodCnt;
10412     A_UINT32 L1Cnt;
10413     A_UINT32 L11Cnt;
10414     A_UINT32 L12Cnt;
10415     A_UINT32 L1Entry;
10416     A_UINT32 L11Entry;
10417     A_UINT32 L12Entry;
10418      /** pdev_id for identifying the MAC
10419       * See macros starting with WMI_PDEV_ID_ for values.
10420       */
10421     A_UINT32 pdev_id;
10422 } wmi_pdev_l1ss_track_event_fixed_param;
10423 
10424 typedef struct {
10425     A_UINT32 len;
10426     A_UINT32 msgref;
10427     A_UINT32 segmentInfo;
10428 } wmi_pdev_seg_hdr_info;
10429 
10430 
10431 /*
10432  * Transmit power scale factor.
10433  *
10434  */
10435 typedef enum {
10436     WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
10437     WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
10438     WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
10439     WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
10440     WMI_TP_SCALE_MIN = 4, /* min, but still on   */
10441     WMI_TP_SCALE_SIZE = 5, /* max num of enum     */
10442 } WMI_TP_SCALE;
10443 
10444 #define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
10445 
10446 typedef struct {
10447     /** message buffer, NULL terminated */
10448     char bufp[WMI_MAX_DEBUG_MESG];
10449 } wmi_debug_mesg_event;
10450 
10451 enum {
10452     /** P2P device */
10453     VDEV_SUBTYPE_P2PDEV = 0,
10454     /** P2P client */
10455     VDEV_SUBTYPE_P2PCLI,
10456     /** P2P GO */
10457     VDEV_SUBTYPE_P2PGO,
10458     /** BT3.0 HS */
10459     VDEV_SUBTYPE_BT,
10460 };
10461 
10462 typedef struct {
10463     /** idnore power , only use flags , mode and freq */
10464     wmi_channel chan;
10465 } wmi_pdev_set_channel_cmd;
10466 
10467 typedef struct {
10468     A_UINT32 tlv_header;
10469     /* DBW puncture bitmap */
10470     A_UINT32 dbw_puncture_20mhz_bitmap;
10471 } wmi_dbw_chan_info;
10472 
10473 typedef enum {
10474     WMI_PKTLOG_EVENT_RX =  0x00000001,
10475     WMI_PKTLOG_EVENT_TX =  0x00000002,
10476     WMI_PKTLOG_EVENT_RCF = 0x00000004, /* Rate Control Find */
10477     WMI_PKTLOG_EVENT_RCU = 0x00000008, /* Rate Control Update */
10478     /* 0x10 used by deprecated DBG_PRINT */
10479     WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x00000020, /* To support Smart Antenna */
10480     WMI_PKTLOG_EVENT_SW =  0x00000040, /* To support SW defined events */
10481     WMI_PKTLOG_EVENT_PHY = 0x00000080, /* To support PHY stats */
10482     WMI_PKTLOG_EVENT_CBF = 0x00000100, /* To support CBF's filter in */
10483     /* To support hybrid of events from FW and tx monitor status ring */
10484     WMI_PKTLOG_EVENT_HYBRID_TX = 0x00000200,
10485 } WMI_PKTLOG_EVENT;
10486 
10487 typedef enum {
10488     WMI_PKTLOG_ENABLE_AUTO  = 0, /* (default) FW will decide under what conditions to enable pktlog */
10489     WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
10490 } WMI_PKTLOG_ENABLE;
10491 
10492 typedef enum {
10493     WMI_PKTLOG_FILTER_IN  = 0, /* capture only for the MAC addresses in pktlog_mac_addr_list*/
10494     WMI_PKTLOG_FILTER_OUT = 1, /* capture for all MAC addresses except those in pktlog_mac_addr_list */
10495 } WMI_PKTLOG_FILTER_TYPE;
10496 
10497 typedef struct {
10498     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param */
10499     /** pdev_id for identifying the MAC
10500      * See macros starting with WMI_PDEV_ID_ for values.
10501      */
10502     A_UINT32 pdev_id;
10503     A_UINT32 evlist; /* WMI_PKTLOG_EVENT */
10504     A_UINT32 enable; /* WMI_PKTLOG_ENABLE */
10505 } wmi_pdev_pktlog_enable_cmd_fixed_param;
10506 
10507 typedef struct {
10508     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param */
10509     /** pdev_id for identifying the MAC
10510      * See macros starting with WMI_PDEV_ID_ for values.
10511      */
10512     A_UINT32 pdev_id;
10513 } wmi_pdev_pktlog_disable_cmd_fixed_param;
10514 
10515 typedef struct {
10516     /** TLV tag and len; tag equals
10517     *  WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_info */
10518     A_UINT32 tlv_header;
10519     /** mac addr of the peer to be filtered */
10520     wmi_mac_addr peer_mac_address;
10521 } wmi_pdev_pktlog_filter_info;
10522 
10523 typedef struct {
10524     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_cmd_fixed_param */
10525     /** pdev_id for identifying the MAC
10526      * See macros starting with WMI_PDEV_ID_ for values.
10527      */
10528     A_UINT32 pdev_id;
10529     /** 0 - disable filtering, 1 - enable filtering */
10530     A_UINT32 enable;
10531     A_UINT32 filter_type; /* WMI_PKTLOG_FILTER_TYPE */
10532     A_UINT32 num_of_mac_addresses;
10533     /* This TLV is followed by another TLV of array of structs
10534      * wmi_pdev_pktlog_filter_info pdev_pktlog_filter_info[];
10535      */
10536 } wmi_pdev_pktlog_filter_cmd_fixed_param;
10537 
10538 /**
10539  * WMI event to send packet log decode information to Host.
10540  * This sends the metadata which will be embedded by Host in the file-level
10541  * header of the pktlog trace file (i.e. the ath_pktlog_bufhdr struct).
10542  * This will be later used by the pktlog post-processing scripts to get
10543  * prerequisite pktlog_defs*.JSON files for decoding the trace.
10544  */
10545 typedef struct {
10546     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_decode_info_evt_fixed_param */
10547     /** pdev_id for identifying the MAC
10548      * See macros starting with WMI_PDEV_ID_ for values.
10549      */
10550     A_UINT32 pdev_id;
10551     /** Forty byte field for storing software image as null terminated string */
10552     A_UINT8  software_image[40];
10553     /** Forty byte field for storing chip info as null terminated string */
10554     A_UINT8  chip_info[40];
10555     /** Four byte field for storing JSON version */
10556     A_UINT32 pktlog_defs_json_version;
10557 } wmi_pdev_pktlog_decode_info_evt_fixed_param;
10558 
10559 typedef enum {
10560     WMI_ROGUE_AP_ON_STA_PS  = 1, /* rogue ap on sta ps module */
10561 } WMI_ROGUE_AP_TYPE;
10562 
10563 typedef struct {
10564     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rap_config_fixed_param */
10565     /** pdev_id for identifying the MAC, the default value is WMI_PDEV_ID_SOC
10566      * See macros starting with WMI_PDEV_ID_ for values.
10567      */
10568     A_UINT32 pdev_id;
10569     /** rogue ap type, see WMI_ROGUE_AP_TYPE */
10570     A_UINT32 type;
10571     /** Enable detection of rogue ap in the ps module
10572      *
10573      * 0 -> disabled
10574      * 1 -> enabled (default)
10575      */
10576     A_UINT32 sta_ps_detection_enabled;
10577 /* This TLV is followed by rap_param for each rogue ap:
10578  *     wmi_pdev_set_rap_config_on_sta_ps_tlv_param rap_param[];
10579  */
10580 } wmi_pdev_set_rap_config_fixed_param;
10581 
10582 typedef struct {
10583     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rap_config_on_sta_ps_tlv_param */
10584     /** bssid of rogue ap */
10585     wmi_mac_addr bssid;
10586 } wmi_pdev_set_rap_config_on_sta_ps_tlv_param;
10587 
10588 typedef struct {
10589     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param */
10590     /** pdev_id for identifying the MAC
10591      * See macros starting with WMI_PDEV_ID_ for values.
10592      */
10593     A_UINT32 pdev_id;
10594     A_UINT32 enable_Mib; /** enable for mib stats collection. Stats are delivered to host in wmi_mib_stats structure.
10595                           * If enable_Mib=1, stats collection is enabled. If enable_Mib=0, stats collection does not happen */
10596 } wmi_mib_stats_enable_cmd_fixed_param;
10597 
10598 /** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
10599  *  NOTE: This constant cannot be changed without breaking
10600  *  WMI Compatibility. */
10601 
10602 #define WMI_DSCP_MAP_MAX    (64)
10603 /*
10604  * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
10605  * @details
10606  * Create an API for sending the custom DSCP-to-TID map to the target
10607  * If this is a request from the user space or from above the UMAC
10608  * then the best place to implement this is in the umac_if_offload of the OL path.
10609  * Provide a place holder for this API in the ieee80211com (ic).
10610  *
10611  * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
10612  * in the target should be directed to the function pointer in the ic.
10613  *
10614  * Implementation details of the API to send the map to the target are as described-
10615  *
10616  * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
10617  *    DSCP-to-TID map is a one dimensional u_int32_t array of length 64 to
10618  *    accommodate 64 TID values for 2^6 (64) DSCP ids.
10619  *    Example:
10620  *      A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
10621  *                                  0, 0, 0, 0, 0, 0, 0, 0,
10622  *                                  1, 1, 1, 1, 1, 1, 1, 1,
10623  *                                  2, 2, 2, 2, 2, 2, 2, 2,
10624  *                                  3, 3, 3, 3, 3, 3, 3, 3,
10625  *                                  4, 4, 4, 4, 4, 4, 4, 4,
10626  *                                  5, 5, 5, 5, 5, 5, 5, 5,
10627  *                                  6, 6, 6, 6, 6, 6, 6, 6,
10628  *                                  7, 7, 7, 7, 7, 7, 7, 7,
10629  *                                };
10630  *
10631  * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
10632  *
10633  * 3. Copy the DSCP-to-TID map into the WMI buffer.
10634  *
10635  * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
10636  *    WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
10637  *    (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
10638  *    the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
10639  *
10640  */
10641 /* DEPRECATED - use VDEV level command instead
10642  * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param)
10643  */
10644 typedef struct {
10645     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
10646     A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
10647     /* map indicating DSCP to TID conversion */
10648     A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
10649 } wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
10650 
10651 typedef struct {
10652     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param */
10653     A_UINT32 vdev_id;
10654     /** map indicating DSCP to TID conversion */
10655     A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
10656     A_UINT32 enable_override;
10657 } wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
10658 
10659 enum WMI_WAKE_GPIO_TYPE {
10660     WMI_WAKE_GPIO_LOW = 1,
10661     WMI_WAKE_GPIO_HIGH = 2,
10662     WMI_WAKE_GPIO_RISING_EDGE = 3,
10663     WMI_WAKE_GPIO_FALLING_EDGE = 4,
10664 };
10665 
10666 /**
10667  * Set GPIO numbers used to wakeup host and wakeup target.
10668  */
10669 typedef struct {
10670     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param */
10671     A_UINT32 host_wakeup_gpio; /* gpio num used to wakeup host, 0xff disable wakeup gpio */
10672     A_UINT32 host_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
10673     A_UINT32 target_wakeup_gpio; /* gpio num used to wakeup target, 0xff disable wakeup gpio */
10674     A_UINT32 target_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
10675 } WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param;
10676 
10677 /** Fixed rate (rate-code) for broadcast/ multicast data frames */
10678 /* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
10679  * @details
10680  * Create an API for setting the custom rate for the MCAST and BCAST frames
10681  * in the target. If this is a request from the user space or from above the UMAC
10682  * then the best place to implement this is in the umac_if_offload of the OL path.
10683  * Provide a place holder for this API in the ieee80211com (ic).
10684  *
10685  * Implementation details of the API to set custom rates for MCAST and BCAST in
10686  * the target are as described-
10687  *
10688  * 1. The function will have 3 arguments-
10689  *    vap structure,
10690  *    MCAST/ BCAST identifier code,
10691  *    8 bit rate code
10692  *
10693  * The rate-code is a 1-byte field in which:for given rate, nss and preamble
10694  * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
10695  * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
10696  * b'3-b'0 indicate the rate, which is indicated as follows:
10697  *          OFDM :     0: OFDM 48 Mbps
10698  *                     1: OFDM 24 Mbps
10699  *                     2: OFDM 12 Mbps
10700  *                     3: OFDM 6 Mbps
10701  *                     4: OFDM 54 Mbps
10702  *                     5: OFDM 36 Mbps
10703  *                     6: OFDM 18 Mbps
10704  *                     7: OFDM 9 Mbps
10705  *         CCK (pream == 1)
10706  *                     0: CCK 11 Mbps Long
10707  *                     1: CCK 5.5 Mbps Long
10708  *                     2: CCK 2 Mbps Long
10709  *                     3: CCK 1 Mbps Long
10710  *                     4: CCK 11 Mbps Short
10711  *                     5: CCK 5.5 Mbps Short
10712  *                     6: CCK 2 Mbps Short
10713  *         HT/VHT (pream == 2/3)
10714  *                     0..7: MCS0..MCS7 (HT)
10715  *                     0..9: MCS0..MCS9 (VHT)
10716  *
10717  * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
10718  *    to the target.
10719  *    Arguments to the API are-
10720  *    wmi handle,
10721  *    VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
10722  *    WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
10723  *    rate value.
10724  */
10725 typedef enum {
10726     WMI_SET_MCAST_RATE,
10727     WMI_SET_BCAST_RATE
10728 } MCAST_BCAST_RATE_ID;
10729 
10730 typedef struct {
10731     MCAST_BCAST_RATE_ID rate_id;
10732     A_UINT32 rate;
10733 } mcast_bcast_rate;
10734 
10735 typedef struct {
10736     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
10737     A_UINT32 cwmin;
10738     A_UINT32 cwmax;
10739     A_UINT32 aifs;
10740     A_UINT32 txoplimit;
10741     A_UINT32 acm;
10742     A_UINT32 no_ack;
10743 } wmi_wmm_params;
10744 
10745 /* DEPRECATED - use VDEV level command instead
10746  * (wmi_vdev_set_wmm_params_cmd_fixed_param)
10747  */
10748 typedef struct {
10749     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
10750     A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
10751     A_UINT32 dg_type;
10752 
10753 /* The TLVs for the 4 AC follows:
10754  *     wmi_wmm_params wmm_params_ac_be;
10755  *     wmi_wmm_params wmm_params_ac_bk;
10756  *     wmi_wmm_params wmm_params_ac_vi;
10757  *     wmi_wmm_params wmm_params_ac_vo;
10758  */
10759 } wmi_pdev_set_wmm_params_cmd_fixed_param;
10760 
10761 typedef struct {
10762     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pifs_params */
10763     /* The unit of this offset is PIFS slot time */
10764     A_UINT32 sap_pifs_offset;
10765     A_UINT32 leb_pifs_offset;
10766     A_UINT32 reb_pifs_offset;
10767 } wmi_pifs_params;
10768 
10769 typedef enum {
10770     WMI_EDCA_PARAM_TYPE_AGGRESSIVE = 0,
10771     WMI_EDCA_PARAM_TYPE_PIFS = 1,
10772 } WMI_EDCA_PARAM_TYPE;
10773 
10774 typedef struct {
10775     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_twt_edca_params_cmd_fixed_param */
10776     A_UINT32 tlv_header;
10777     A_UINT32 vdev_id;
10778     A_UINT32 type; /* contains a WMI_EDCA_PARAM_TYPE value */
10779     /*
10780      * This TLV is (optionally) followed by other TLVs as below:
10781      * wmi_wmm_params wmm_params[0/1];
10782      *     present if type is WMI_EDCA_PARAM_TYPE_AGGRESSIVE
10783      * wmi_pifs_params pifs_params[0/1];
10784      *     present if type is WMI_EDCA_PARAM_TYPE_PIFS
10785      */
10786 } wmi_vdev_set_twt_edca_params_cmd_fixed_param;
10787 
10788 typedef struct {
10789     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_twt_session_stats_info_cmd_fixed_param */
10790     A_UINT32 tlv_header;
10791     A_UINT32 vdev_id;
10792 } wmi_vdev_get_twt_session_stats_info_cmd_fixed_param;
10793 
10794 typedef enum {
10795     WMI_REQUEST_PEER_STAT            = 0x00001,
10796     WMI_REQUEST_AP_STAT              = 0x00002,
10797     WMI_REQUEST_PDEV_STAT            = 0x00004,
10798     WMI_REQUEST_VDEV_STAT            = 0x00008,
10799     WMI_REQUEST_BCNFLT_STAT          = 0x00010,
10800     WMI_REQUEST_VDEV_RATE_STAT       = 0x00020,
10801     WMI_REQUEST_INST_STAT            = 0x00040,
10802     WMI_REQUEST_MIB_STAT             = 0x00080,
10803     WMI_REQUEST_RSSI_PER_CHAIN_STAT  = 0x00100,
10804     WMI_REQUEST_CONGESTION_STAT      = 0x00200,
10805     WMI_REQUEST_PEER_EXTD_STAT       = 0x00400,
10806     WMI_REQUEST_BCN_STAT             = 0x00800,
10807     WMI_REQUEST_BCN_STAT_RESET       = 0x01000,
10808     WMI_REQUEST_PEER_EXTD2_STAT      = 0x02000,
10809     WMI_REQUEST_MIB_EXTD_STAT        = 0x04000,
10810     WMI_REQUEST_PMF_BCN_PROTECT_STAT = 0x08000,
10811     WMI_REQUEST_VDEV_EXTD_STAT       = 0x10000,
10812     WMI_REQUEST_PDEV_EXTD_STAT       = 0x20000,
10813     WMI_REQUEST_PDEV_TELEMETRY_STAT  = 0x40000,
10814 } wmi_stats_id;
10815 
10816 /*
10817  * cfg_retry_count is set to max number of times the AP should try sending
10818  * QoS Null frames to the STA for measuring the instantaneous RSSI
10819  *
10820  * retry_count is used to maintain the number of times the AP has tried sending
10821  * QoS Null frames to the STA for measuring the instantaneous RSSI
10822  */
10823 typedef struct {
10824     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_sub_struc_param */
10825     A_UINT32 cfg_retry_count;
10826     A_UINT32 retry_count;
10827 } wmi_inst_rssi_stats_params;
10828 
10829 typedef struct {
10830     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
10831     wmi_stats_id stats_id;
10832     /** unique id identifying the VDEV, generated by the caller */
10833     A_UINT32 vdev_id;
10834     /** peer MAC address */
10835     wmi_mac_addr peer_macaddr;
10836     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. */
10837 /*
10838  * This TLV is (optionally) followed by other TLVs:
10839  *     wmi_inst_rssi_stats_params inst_rssi_params;
10840  *     A_UINT32 vdev_id_bitmap[];
10841  *         This array is present and non-zero length in MLO case, stats should
10842  *         only be provided from the vdev_id_bitmap in the bitmap when it is
10843  *         present.
10844  *     wmi_mac_addr mld_macaddr[];
10845  *         This array is present and non-zero length in MLO case, stats should
10846  *         only be provided from the peers with the MLD MAC addresses specified
10847  *         in the array.
10848  */
10849 } wmi_request_stats_cmd_fixed_param;
10850 
10851 /* stats type bitmap  */
10852 #define WMI_LINK_STATS_RADIO         0x00000001
10853 #define WMI_LINK_STATS_IFACE         0x00000002
10854 #define WMI_LINK_STATS_ALL_PEER      0x00000004
10855 #define WMI_LINK_STATS_PER_PEER      0x00000008
10856 #define WMI_LINK_STATS_IPA           0x00000010
10857 
10858 
10859 /* wifi clear statistics bitmap  */
10860 #define WIFI_STATS_RADIO              0x00000001 /** all radio statistics */
10861 #define WIFI_STATS_RADIO_CCA          0x00000002 /** cca_busy_time (within radio statistics) */
10862 #define WIFI_STATS_RADIO_CHANNELS     0x00000004 /** all channel statistics (within radio statistics) */
10863 #define WIFI_STATS_RADIO_SCAN         0x00000008 /** all scan statistics (within radio statistics) */
10864 #define WIFI_STATS_IFACE              0x00000010 /** all interface statistics */
10865 #define WIFI_STATS_IFACE_TXRATE       0x00000020 /** all tx rate statistics (within interface statistics) */
10866 #define WIFI_STATS_IFACE_AC           0x00000040 /** all ac statistics (within interface statistics) */
10867 #define WIFI_STATS_IFACE_CONTENTION   0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
10868 #define WMI_STATS_IFACE_ALL_PEER      0x00000100 /** All peer stats on this interface */
10869 #define WMI_STATS_IFACE_PER_PEER      0x00000200 /** Clear particular peer stats depending on the peer_mac */
10870 
10871 /** Default value for stats if the stats collection has not started */
10872 #define WMI_STATS_VALUE_INVALID       0xffffffff
10873 
10874 #define WMI_DIAG_ID_GET(diag_events_logs)                         WMI_GET_BITS(diag_events_logs, 0, 16)
10875 #define WMI_DIAG_ID_SET(diag_events_logs, value)                  WMI_SET_BITS(diag_events_logs, 0, 16, value)
10876 #define WMI_DIAG_TYPE_GET(diag_events_logs)                       WMI_GET_BITS(diag_events_logs, 16, 1)
10877 #define WMI_DIAG_TYPE_SET(diag_events_logs, value)                WMI_SET_BITS(diag_events_logs, 16, 1, value)
10878 #define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs)        WMI_GET_BITS(diag_events_logs, 17, 1)
10879 #define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
10880 
10881 typedef struct {
10882     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
10883     A_UINT32 num_of_diag_events_logs;
10884 /* The TLVs will follow.
10885  *    A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
10886  *                                      Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
10887  *                                      Bit 17 Indicate if the DIAG type is Enabled/Disabled.
10888  */
10889 } wmi_diag_event_log_config_fixed_param;
10890 
10891 #define WMI_DIAG_FREQUENCY_GET(diag_events_logs)          WMI_GET_BITS(diag_events_logs, 17, 1)
10892 #define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value)   WMI_SET_BITS(diag_events_logs, 17, 1, value)
10893 #define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs)        WMI_GET_BITS(diag_events_logs, 18, 1)
10894 #define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
10895 
10896 typedef struct {
10897     A_UINT32 tlv_header;
10898     A_UINT32 num_of_diag_events_logs;
10899 /* The TLVs will follow.
10900  *    A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
10901  *                                      Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
10902  *                                      Bit 17 - Frequency of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
10903  *                                      Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
10904  */
10905 } wmi_diag_event_log_supported_event_fixed_params;
10906 
10907 typedef struct {
10908     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param*/
10909     A_UINT32 reserved0; /** placeholder for future */
10910 } wmi_debug_mesg_flush_fixed_param;
10911 
10912 typedef struct {
10913     A_UINT32 tlv_header;        /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_fw_data_stall_param */
10914     A_UINT32 vdev_id_bitmap;    /** bitmap representation for vdev_id's where data stall happened */
10915     A_UINT32 data_stall_type;   /** wlan_dbg_data_stall_type_e */
10916     /** reason_code1:
10917      * The information stored in reason_code1 varies based on the data stally
10918      * type values:
10919      * data_stall_type      | reason_code1
10920      * -----------------------------------------------------
10921      * HWSCHED_CMD_FLUSH    | flush req reason (0-40)
10922      * RX_REFILL_FAILED     | ring_id (0-7)
10923      * RX_FCS_LEN_ERROR     | exact error type
10924      */
10925     A_UINT32 reason_code1;
10926     A_UINT32 reason_code2;      /** on which tid/hwq stall happened */
10927     A_UINT32 recovery_type;     /** wlan_dbg_data_stall_recovery_type_e */
10928 } wmi_debug_mesg_fw_data_stall_param;
10929 
10930 typedef struct {
10931     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_fw_cal_failure_param */
10932     A_UINT32 tlv_header;
10933     /* wmi_ctrl_path_stats_cal_type_ids enum defines possible cal type IDs */
10934     A_UINT32 cal_type;
10935     /* wmi_cal_failure_reason_code enum defines possible failure reason codes */
10936     A_UINT32 cal_failure_reason_code;
10937 } wmi_debug_mesg_fw_cal_failure_param;
10938 
10939 typedef struct {
10940     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param*/
10941     A_UINT32 reserved0; /** placeholder for future */
10942 } wmi_debug_mesg_flush_complete_fixed_param;
10943 
10944 typedef struct {
10945     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param */
10946     /* vdev_id, where RSSI breach event occurred */
10947     A_UINT32 vdev_id;
10948     /* request id */
10949     A_UINT32 request_id;
10950     /* bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is corresponding to hi_rssi[0-2]*/
10951     A_UINT32 event_bitmap;
10952     /* rssi at the time of RSSI breach. Unit dBm */
10953     A_UINT32 rssi;
10954     /* bssid of the monitored AP's */
10955     wmi_mac_addr bssid;
10956 } wmi_rssi_breach_event_fixed_param;
10957 
10958 typedef struct {
10959     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fw_mem_dump */
10960     /** unique id identifying the segment */
10961     A_UINT32 seg_id;
10962     /** Start address of the segment to be read */
10963     A_UINT32 seg_start_addr_lo;
10964     A_UINT32 seg_start_addr_hi;
10965     /** Length of the segment to be read */
10966     A_UINT32 seg_length;
10967     /** Host bufeer address to which the segment will be read and dumped */
10968     A_UINT32 dest_addr_lo;
10969     A_UINT32 dest_addr_hi;
10970 } wmi_fw_mem_dump;
10971 
10972 /* Command to get firmware memory dump*/
10973 typedef struct {
10974     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
10975     /** unique id identifying the request */
10976     A_UINT32 request_id;
10977     /** number of memory dump segments */
10978     A_UINT32 num_fw_mem_dump_segs;
10979 /**
10980  * This TLV is followed by another TLV
10981  *     wmi_fw_mem_dump fw_mem_dump[];
10982  */
10983 } wmi_get_fw_mem_dump_fixed_param;
10984 
10985 /** Event to indicate the completion of fw mem dump */
10986 typedef struct {
10987     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
10988     /** unique id identifying the request, given in the request stats command */
10989     A_UINT32 request_id;
10990     /*In case of Firmware memory dump */
10991     A_UINT32 fw_mem_dump_complete;
10992 } wmi_update_fw_mem_dump_fixed_param;
10993 
10994 
10995 typedef enum {
10996     WMI_ROAMING_IDLE = 0,
10997     WMI_ROAMING_ACTIVE = 1,
10998 } wmi_roam_state;
10999 
11000 /* access categories */
11001 typedef enum {
11002    WMI_AC_VO  = 0,
11003    WMI_AC_VI  = 1,
11004    WMI_AC_BE  = 2,
11005    WMI_AC_BK  = 3,
11006    WMI_AC_MAX = 4,
11007 } wmi_traffic_ac;
11008 
11009 typedef enum {
11010     WMI_STA_STATS = 0,
11011     WMI_SOFTAP_STATS = 1,
11012     WMI_IBSS_STATS = 2,
11013     WMI_P2P_CLIENT_STATS = 3,
11014     WMI_P2P_GO_STATS = 4,
11015     WMI_NAN_STATS = 5,
11016     WMI_MESH_STATS = 6,
11017  } wmi_link_iface_type;
11018 
11019 /* channel operating width */
11020 typedef enum {
11021     WMI_CHAN_WIDTH_20    = 0,
11022     WMI_CHAN_WIDTH_40    = 1,
11023     WMI_CHAN_WIDTH_80    = 2,
11024     WMI_CHAN_WIDTH_160   = 3,
11025     WMI_CHAN_WIDTH_80P80 = 4,
11026     WMI_CHAN_WIDTH_5     = 5,
11027     WMI_CHAN_WIDTH_10    = 6,
11028     WMI_CHAN_WIDTH_165   = 7,
11029     WMI_CHAN_WIDTH_160P160 = 8,
11030     WMI_CHAN_WIDTH_320   = 9,
11031 
11032     WMI_CHAN_WIDTH_MAX,
11033 } wmi_channel_width;
11034 
11035 /* Clear stats */
11036 typedef struct {
11037     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
11038     /** unique id identifying the VDEV, generated by the caller */
11039     A_UINT32 vdev_id;
11040     /** stop_stats_collection_req = 1 will imply stop the statistics collection */
11041     A_UINT32 stop_stats_collection_req;
11042     /** identifies what stats to be cleared */
11043     A_UINT32 stats_clear_req_mask;
11044     /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
11045     wmi_mac_addr peer_macaddr;
11046 /*
11047  * This TLV is (optionally) followed by other TLVs:
11048  *     A_UINT32 vdev_id_bitmap[];
11049  *         This array is present and non-zero length in MLO case, stats should
11050  *         only be cleared for the VDEVs in vdev_id_bitmap in the bitmap when
11051  *         it is present.
11052  *     wmi_mac_addr mld_macaddr[];
11053  *         This array is present and non-zero length in MLO case, stats should
11054  *         only be cleared for the peers with the MLD MAC addresses specified
11055  *         in the array.
11056  */
11057 } wmi_clear_link_stats_cmd_fixed_param;
11058 
11059 /* Link Stats configuration params. Trigger the link layer statistics collection*/
11060 typedef struct {
11061     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
11062     /** threshold to classify the pkts as short or long */
11063     A_UINT32 mpdu_size_threshold;
11064     /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
11065     A_UINT32 aggressive_statistics_gathering;
11066 } wmi_start_link_stats_cmd_fixed_param;
11067 
11068 typedef struct {
11069     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
11070     /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
11071     A_UINT32 stats_type;
11072     /** unique id identifying the VDEV, generated by the caller */
11073     A_UINT32 vdev_id;
11074     /** unique id identifying the request, generated by the caller */
11075     A_UINT32 request_id;
11076     /** peer MAC address */
11077     wmi_mac_addr peer_macaddr;
11078 /*
11079  * This TLV is (optionally) followed by other TLVs:
11080  * A_UINT32 vdev_id_bitmap[];
11081  *     This array is present and non-zero length in MLO case, stats should only
11082  *     be provided from the vdev_id_bitmap in the bitmap when it is present.
11083  * wmi_mac_addr mld_macaddr[];
11084  *     This array is present and non-zero length in MLO case, stats should only
11085  *     be provided from the peers with the MLD MAC addresses specified
11086  *     in the array.
11087  */
11088 } wmi_request_link_stats_cmd_fixed_param;
11089 
11090 typedef struct {
11091     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unified_request_ll_get_sta_cmd_fixed_param */
11092     /** Type of stats required. This is a bitmask of WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
11093     A_UINT32 link_stats_type;
11094     /** unique id identifying the VDEV, generated by the caller */
11095     A_UINT32 vdev_id;
11096     /** unique id identifying the request, generated by the caller */
11097     A_UINT32 request_id;
11098     /** peer MAC address */
11099     wmi_mac_addr peer_macaddr;
11100     /** Type of stats required for get station cmd (see wmi_stats_id enum) */
11101     A_UINT32 get_sta_stats_id;
11102     /** 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. */
11103     A_UINT32 pdev_id;
11104 /*
11105  * This TLV is (optionally) followed by other TLVs:
11106  * A_UINT32 vdev_id_bitmap[];
11107  *     This array is present and non-zero length in MLO case, stats should only
11108  *     be provided from the vdev_id_bitmap in the bitmap when it is present.
11109  * wmi_mac_addr mld_macaddr[];
11110  *     This array is present and non-zero length in MLO case, stats should only
11111  *     be provided from the peers with the MLD MAC addresses specified
11112  *     in the array.
11113  */
11114 } wmi_request_unified_ll_get_sta_cmd_fixed_param;
11115 
11116 #define WLM_STATS_REQ_LINK          0x00000001
11117 typedef struct {
11118     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlm_stats_cmd_fixed_param */
11119     /** unique id identifying the VDEV, generated by the caller */
11120     A_UINT32 vdev_id;
11121     /** WLM event request bitmask
11122      * Used by host to customize the wlm stats report.
11123      * Filled with a combination of WLM_STATS_xxx values.
11124      */
11125     A_UINT32 request_bitmask;
11126 } wmi_request_wlm_stats_cmd_fixed_param;
11127 
11128 /* channel statistics */
11129 typedef struct {
11130     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
11131     /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
11132     A_UINT32 channel_width;
11133     /** Primary 20 MHz channel */
11134     A_UINT32 center_freq;
11135     /** center frequency (MHz) first segment */
11136     A_UINT32 center_freq0;
11137     /** center frequency (MHz) second segment */
11138     A_UINT32 center_freq1;
11139     /** msecs the radio is awake (32 bits number accruing over time) */
11140     A_UINT32 radio_awake_time;
11141     /** msecs the CCA register is busy (32 bits number accruing over time)
11142      * Includes rx_time but not tx_time.
11143      */
11144     A_UINT32 cca_busy_time;
11145     /** msecs the radio is transmitting (32 bits number accruing over time) */
11146     A_UINT32 tx_time;
11147     /** msecs the radio is in active receive (32 bits number accruing over time) */
11148     A_UINT32 rx_time;
11149     /*** NOTE ***
11150      * Be cautious about adding new fields in wmi_channel_stats.
11151      * STA-centric targets may instantiate many instances of per-channel
11152      * stats, and consequently may consume a non-trivial amount of on-chip
11153      * memory for storing the channel stats.
11154      */
11155 } wmi_channel_stats;
11156 
11157 /* this structure used for pass vdev id in stats events */
11158 typedef struct {
11159     union {
11160         struct {
11161             A_UINT32 id      : 31, /* the vdev ID */
11162                      validate: 1;  /* validate bit, the vdev ID is only valid if this bit set as 1 */
11163         };
11164         A_UINT32 vdev_id;
11165     };
11166 } wmi_vdev_id_info;
11167 
11168 #define WMI_VDEV_ID_INFO_GET_VDEV_ID(vdev_id_info)             WMI_GET_BITS(vdev_id_info, 0, 31)
11169 #define WMI_VDEV_ID_INFO_SET_VDEV_ID(vdev_id_info, value)      WMI_SET_BITS(vdev_id_info, 0, 31, value)
11170 #define WMI_VDEV_ID_INFO_GET_VALIDATE(vdev_id_info)            WMI_GET_BITS(vdev_id_info, 31, 1)
11171 #define WMI_VDEV_ID_INFO_SET_VALIDATE(vdev_id_info, value)     WMI_SET_BITS(vdev_id_info, 31, 1, value)
11172 
11173 typedef struct {
11174     union {
11175         struct {
11176             A_UINT32
11177                 id: 8, /* the vdev ID */
11178                 /* validate:
11179                  * validate bit, the vdev ID (id and link_status) is only valid
11180                  * if this bit set as 1.
11181                  */
11182                 validate: 1,
11183                 /* link_status:
11184                  * 0 -> link inactive
11185                  * 1 -> link active
11186                  */
11187                 link_status: 1,
11188                 reserved:22;
11189         };
11190         A_UINT32 vdev_info_word0;
11191     };
11192 } wmi_vdev_id_info_v2;
11193 
11194 #define WMI_VDEV_ID_INFO_V2_GET_VDEV_ID(vdev_id_info_v2)             WMI_GET_BITS(vdev_id_info_v2, 0, 8)
11195 #define WMI_VDEV_ID_INFO_V2_SET_VDEV_ID(vdev_id_info_v2, value)      WMI_SET_BITS(vdev_id_info_v2, 0, 8, value)
11196 #define WMI_VDEV_ID_INFO_V2_GET_VALIDATE(vdev_id_info_v2)            WMI_GET_BITS(vdev_id_info_v2, 8, 1)
11197 #define WMI_VDEV_ID_INFO_V2_SET_VALIDATE(vdev_id_info_v2, value)     WMI_SET_BITS(vdev_id_info_v2, 8, 1, value)
11198 #define WMI_VDEV_ID_INFO_V2_GET_LINK_STATUS(vdev_id_info_v2)         WMI_GET_BITS(vdev_id_info_v2, 9, 1)
11199 #define WMI_VDEV_ID_INFO_V2_SET_LINK_STATUS(vdev_id_info_v2, value)  WMI_SET_BITS(vdev_id_info_v2, 9, 1, value)
11200 
11201 
11202 /*
11203  * Each step represents 0.5 dB.  The starting value is 0 dBm.
11204  * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps.
11205  */
11206 #define MAX_TPC_LEVELS 64
11207 
11208 /* radio statistics */
11209 typedef struct {
11210     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
11211     /** Wifi radio (if multiple radio supported) */
11212     A_UINT32 radio_id;
11213     /** msecs the radio is awake (32 bits number accruing over time) */
11214     A_UINT32 on_time;
11215     /** msecs the radio is transmitting (32 bits number accruing over time) */
11216     A_UINT32 tx_time;
11217     /** msecs the radio is in active receive (32 bits number accruing over time) */
11218     A_UINT32 rx_time;
11219     /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
11220     A_UINT32 on_time_scan;
11221     /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
11222     A_UINT32 on_time_nbd;
11223     /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
11224     A_UINT32 on_time_gscan;
11225     /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
11226     A_UINT32 on_time_roam_scan;
11227     /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
11228     A_UINT32 on_time_pno_scan;
11229     /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
11230     A_UINT32 on_time_hs20;
11231     /** number of channels */
11232     A_UINT32 num_channels;
11233     /** tx time per TPC level - DEPRECATED
11234      * This field is deprecated.
11235      * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID message.
11236      */
11237     A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS];
11238     /** msecs the radio is awake due to Host initiated scan (accruing over time) */
11239     A_UINT32 on_time_host_scan;
11240     /** msecs the radio is awake due to LPI scan (accruing over time) */
11241     A_UINT32 on_time_lpi_scan;
11242 } wmi_radio_link_stats;
11243 
11244 /** tx time per power level statistics */
11245 typedef struct {
11246     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param */
11247     /** total number of tx power levels */
11248     A_UINT32 total_num_tx_power_levels;
11249     /** number of tx power levels that are carried in this event */
11250     A_UINT32 num_tx_power_levels;
11251     /** offset of current stats
11252      * If ((num_tx_power_levels + power_level_offset)) ==
11253      *     total_num_tx_power_levels)
11254      * this message completes the report of tx time per power levels.
11255      * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID messages
11256      * will be sent by the target to deliver the remainder of the tx time
11257      * per power level stats.
11258      */
11259     A_UINT32 power_level_offset;
11260     /* radio id for this tx time per power level statistics (if multiple radio supported) */
11261     A_UINT32 radio_id;
11262     /** Indicates the vdev id of the stats for MLO stats query */
11263     wmi_vdev_id_info vdev_id_info;
11264 /*
11265  * This TLV will be followed by a TLV containing a variable-length array of
11266  * A_UINT32 with tx time per power level data
11267  *  A_UINT32 tx_time_per_power_level[num_tx_power_levels]
11268  * The tx time is in units of milliseconds.
11269  * The power levels are board-specific values; a board-specific translation
11270  * has to be applied to determine what actual power corresponds to each
11271  * power level.
11272  * Just as the host has a BDF file available, the host should also have
11273  * a data file available that provides the power level to power translations.
11274  */
11275 } wmi_tx_power_level_stats_evt_fixed_param;
11276 
11277 
11278 /** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
11279 typedef struct {
11280     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats_event_fixed_param */
11281     /** unique id identifying the request, given in the request stats command */
11282     A_UINT32 request_id;
11283     /** Number of radios*/
11284     A_UINT32 num_radio;
11285     /** more_data will be set depending on the number of radios */
11286     A_UINT32 more_radio_events;
11287     /*
11288      * For the event WMI_RADIO_LINK_STATS_EVENTID = 0x16004,
11289      * FW may not be able to send all the channels (2 GHz, 5 GHz & 6 GHz)
11290      * together in one event message, due to buffer size limitations.
11291      * To avoid this limitation, FW will send multiple events to HOST
11292      * depending upon the number of channels.
11293      * If more_channels is set to 0 means FW has indicated all the
11294      * channels for this radio.
11295      * If more_channels is set to 1, it indicates FW will send another
11296      * event having additional channels for the same radio.
11297      */
11298     A_UINT32 more_channels;
11299     /** Indicates the vdev id of the stats for MLO stats query */
11300     wmi_vdev_id_info vdev_id_info;
11301 /*
11302  * This TLV is followed by another TLV of array of bytes
11303  *   size of(struct wmi_radio_link_stats);
11304  *
11305  * This TLV is followed by another TLV of array of bytes
11306  *   num_channels * size of(struct wmi_channel_stats)
11307  */
11308 } wmi_radio_link_stats_event_fixed_param;
11309 
11310 /* per rate statistics */
11311 typedef struct {
11312     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
11313     /** rate information
11314      * The rate-code is a 1-byte field in which:for given rate, nss and preamble
11315      * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
11316      * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
11317      * b'3-b'0 indicate the rate, which is indicated as follows:
11318      *          OFDM :     0: OFDM 48 Mbps
11319      *                     1: OFDM 24 Mbps
11320      *                     2: OFDM 12 Mbps
11321      *                     3: OFDM 6 Mbps
11322      *                     4: OFDM 54 Mbps
11323      *                     5: OFDM 36 Mbps
11324      *                     6: OFDM 18 Mbps
11325      *                     7: OFDM 9 Mbps
11326      *         CCK (pream == 1)
11327      *                     0: CCK 11 Mbps Long
11328      *                     1: CCK 5.5 Mbps Long
11329      *                     2: CCK 2 Mbps Long
11330      *                     3: CCK 1 Mbps Long
11331      *                     4: CCK 11 Mbps Short
11332      *                     5: CCK 5.5 Mbps Short
11333      *                     6: CCK 2 Mbps Short
11334      *         HT/VHT (pream == 2/3)
11335      *                     0..7: MCS0..MCS7 (HT)
11336      *                     0..9: MCS0..MCS9 (VHT)
11337      */
11338     A_UINT32 rate;
11339     /** units of 100 Kbps */
11340     A_UINT32 bitrate;
11341     /** number of successfully transmitted data pkts (ACK rcvd) */
11342     A_UINT32 tx_mpdu;
11343     /** number of received data pkts */
11344     A_UINT32 rx_mpdu;
11345     /** number of data packet losses (no ACK) */
11346     A_UINT32 mpdu_lost;
11347     /** total number of data pkt retries */
11348     A_UINT32 retries;
11349     /** number of short data pkt retries */
11350     A_UINT32 retries_short;
11351     /** number of long data pkt retries */
11352     A_UINT32 retries_long;
11353 } wmi_rate_stats;
11354 
11355 typedef struct {
11356     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
11357     /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
11358     A_UINT32 peer_type;
11359     /** mac address */
11360     wmi_mac_addr peer_mac_address;
11361     /** peer wmi_CAPABILITY_XXX */
11362     A_UINT32 capabilities;
11363     /** number of rates */
11364     A_UINT32 num_rates;
11365 } wmi_peer_link_stats;
11366 
11367 /** PEER statistics (once started) reset and start afresh after each connection */
11368 typedef struct {
11369     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
11370     /** unique id identifying the request, given in the request stats command */
11371     A_UINT32 request_id;
11372     /** number of peers accomidated in this particular event  */
11373     A_UINT32 num_peers;
11374     /** Indicates the fragment number  */
11375     A_UINT32 peer_event_number;
11376     /** Indicates if there are more peers which will be sent as separate peer_stats event */
11377     A_UINT32 more_data;
11378     /** Indicates the vdev id of the stats for MLO stats query */
11379     wmi_vdev_id_info vdev_id_info;
11380 
11381 /**
11382  * This TLV is followed by another TLV
11383  * num_peers * size of(struct wmi_peer_stats)
11384  * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
11385  */
11386 } wmi_peer_stats_event_fixed_param;
11387 
11388 /* per access category statistics */
11389 typedef struct {
11390     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
11391     /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
11392     A_UINT32 ac_type;
11393     /** number of successfully transmitted unicast data pkts (ACK rcvd) */
11394     A_UINT32 tx_mpdu;
11395     /** number of received unicast mpdus */
11396     A_UINT32 rx_mpdu;
11397     /** number of successfully transmitted multicast data packets */
11398     /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
11399     A_UINT32 tx_mcast;
11400     /** number of received multicast data packets */
11401     A_UINT32 rx_mcast;
11402     /** number of received unicast a-mpdus */
11403     A_UINT32 rx_ampdu;
11404     /** number of transmitted unicast a-mpdus */
11405     A_UINT32 tx_ampdu;
11406     /** number of data pkt losses (no ACK) */
11407     A_UINT32 mpdu_lost;
11408     /** total number of data pkt retries */
11409     A_UINT32 retries;
11410     /** number of short data pkt retries */
11411     A_UINT32 retries_short;
11412     /** number of long data pkt retries */
11413     A_UINT32 retries_long;
11414     /** data pkt min contention time (usecs) */
11415     A_UINT32 contention_time_min;
11416     /** data pkt max contention time (usecs) */
11417     A_UINT32 contention_time_max;
11418     /** data pkt avg contention time (usecs) */
11419     A_UINT32 contention_time_avg;
11420     /** num of data pkts used for contention statistics */
11421     A_UINT32 contention_num_samples;
11422     /** number of pending pkts */
11423     A_UINT32 tx_pending_msdu;
11424 } wmi_wmm_ac_stats;
11425 
11426 /* interface statistics */
11427 typedef struct {
11428     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
11429     /** access point beacon received count from connected AP */
11430     A_UINT32 beacon_rx;
11431     /** access point mgmt frames received count from connected AP (including Beacon) */
11432     A_UINT32 mgmt_rx;
11433     /** action frames received count */
11434     A_UINT32 mgmt_action_rx;
11435     /** action frames transmit count */
11436     A_UINT32 mgmt_action_tx;
11437     /** access Point Beacon and Management frames RSSI (averaged) */
11438     A_UINT32 rssi_mgmt;
11439     /** access Point Data Frames RSSI (averaged) from connected AP */
11440     A_UINT32 rssi_data;
11441     /** access Point ACK RSSI (averaged) from connected AP */
11442     A_UINT32 rssi_ack;
11443     /** number of peers */
11444     A_UINT32 num_peers;
11445     /** Indicates how many peer_stats events will be sent depending on the num_peers. */
11446     A_UINT32 num_peer_events;
11447     /** number of ac */
11448     A_UINT32 num_ac;
11449     /** Roaming Stat */
11450     A_UINT32 roam_state;
11451     /** Average Beacon spread offset is the averaged time delay between TBTT and beacon TSF */
11452     /** Upper 32 bits of averaged 64 bit beacon spread offset */
11453     A_UINT32 avg_bcn_spread_offset_high;
11454     /** Lower 32 bits of averaged 64 bit beacon spread offset */
11455     A_UINT32 avg_bcn_spread_offset_low;
11456     /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
11457     A_UINT32 is_leaky_ap;
11458     /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
11459     A_UINT32 avg_rx_frms_leaked;
11460     /** Rx leak watch window currently in force to minimize data loss because of leaky AP. Rx leak window is the
11461         time driver waits before shutting down the radio or switching the channel and after receiving an ACK for
11462         a data frame with PM bit set) */
11463     A_UINT32 rx_leak_window;
11464     A_UINT32 tx_rts_succ_cnt;
11465     A_UINT32 tx_rts_fail_cnt;
11466     A_UINT32 tx_ppdu_succ_cnt;
11467     A_UINT32 tx_ppdu_fail_cnt;
11468     /** msecs the interface is in Connected state (accruing over time) */
11469     A_UINT32 connected_duration;
11470     /** msecs the interface is in DisConnected state (accruing over time) */
11471     A_UINT32 disconnected_duration;
11472     /** msecs the interface is doing RTT ranging (accruing over time) */
11473     A_UINT32 rtt_ranging_duration;
11474     /** msecs the interface is in RTT responder mode (accruing over time) */
11475     A_UINT32 rtt_responder_duration;
11476     /** Number of Probes (Tx) sent on the interface (accruing over time) */
11477     A_UINT32 num_probes_tx;
11478     /** Number of Beacon misses on this interface (accruing over time) */
11479     A_UINT32 num_beacon_miss;
11480     /** time slice duty cycle percentage of this interface */
11481     A_UINT32 time_slice_duty_cycle;
11482     /**
11483      * Current home channel noise floor value report to host
11484      * Units are dBm, values 0x0000ffff and 0x0 are invalid.
11485      */
11486     A_INT32 nf_cal_val;
11487 } wmi_iface_link_stats;
11488 
11489 typedef enum {
11490     WMI_OFFLOAD_STATS_TYPE_SOC_BCAST   = 0,
11491     WMI_OFFLOAD_STATS_TYPE_SOC_MCAST   = 1,
11492     WMI_OFFLOAD_STATS_TYPE_SOC_UCAST   = 2,
11493     WMI_OFFLOAD_STATS_TYPE_ARP         = 3,
11494     WMI_OFFLOAD_STATS_TYPE_NS          = 4,
11495     WMI_OFFLOAD_STATS_TYPE_APF_BCAST   = 5,
11496     WMI_OFFLOAD_STATS_TYPE_APF_MCAST   = 6,
11497     WMI_OFFLOAD_STATS_TYPE_APF_UCAST   = 7,
11498     /* Add New offload stat type here */
11499     WMI_OFFLOAD_STATS_TYPE_MAX,
11500 } wmi_offload_stats_type;
11501 
11502 typedef struct {
11503    A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_offload_stats */
11504    /** Type of offload stat. enum wmi_offload_stats_type **/
11505    A_UINT32 type;
11506    /** Number of (MSDUs) frames Received **/
11507    A_UINT32 rx_count;
11508    /** Number of frames Dropped **/
11509    A_UINT32 drp_count;
11510    /** Number of frames for which FW Responded (Valid for ARP and NS only). (or)
11511      * Number of frames forwarded to Host (Valid for stats type except ARP and NS). **/
11512    A_UINT32 fwd_count;
11513 } wmi_iface_offload_stats;
11514 
11515 typedef struct {
11516    A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_powersave_stats */
11517    /** Total TIM beacon event that wlan ps received **/
11518    A_UINT32 tot_tim_bcn;
11519    /** Total error TIM beacon found by wlan ps including no rx in TIM wakeup and TIM event in active state **/
11520    A_UINT32 tot_err_tim_bcn;
11521 } wmi_iface_powersave_stats;
11522 
11523 typedef struct {
11524     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_link_stats */
11525 
11526     /** IPA tx channel 0 buffer hp/tp */
11527     A_UINT32 wbm2sw_ring_ch0_hp;
11528     A_UINT32 wbm2sw_ring_ch0_tp;
11529     /** IPA tx channel 1 buffer hp/tp */
11530     A_UINT32 wbm2sw_ring_ch1_hp;
11531     A_UINT32 wbm2sw_ring_ch1_tp;
11532 
11533     /** IPA rx channel 0 buffer hp/tp */
11534     A_UINT32 reo2sw_ring_ch0_hp;
11535     A_UINT32 reo2sw_ring_ch0_tp;
11536     /** IPA rx channel 1 buffer hp/tp */
11537     A_UINT32 reo2sw_ring_ch1_hp;
11538     A_UINT32 reo2sw_ring_ch1_tp;
11539 
11540     /** IPA rx channel 0 ring full counter */
11541     A_UINT32 reo2sw_ch0_producer_full_cnt;
11542     /** IPA rx channel 1 ring full counter */
11543     A_UINT32 reo2sw_ch1_producer_full_cnt;
11544 
11545     /** IPA rx path drop feature enable */
11546     A_UINT32 ipa_drop_enabled;
11547     /** Counter for IPA rx path switch to drop-enabled state */
11548     A_UINT32 ipa_switch_to_drop_cnt;
11549     /** Counter for IPA rx path switch from drop-enabled state to normal state */
11550     A_UINT32 ipa_switch_from_drop_cnt;
11551 } wmi_ipa_link_stats;
11552 
11553 typedef struct {
11554     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_per_mac_stats */
11555 
11556     /** TCL total enqueued packet number */
11557     A_UINT32 tcl_enqueue_packets;
11558     /** TCL total discarded packet number during enqueue */
11559     A_UINT32 tcl_enqueue_discard;
11560 
11561     /** Total tx duration time, usec */
11562     A_UINT32 total_ppdu_duration_us;
11563 
11564     /** IPA rx no resource debug counter */
11565     A_UINT32 wmac_no_resource_drop_ppdu_cnt_ix0;
11566     A_UINT32 wmac_no_resource_drop_ppdu_cnt_ix1;
11567     A_UINT32 wmac_no_resource_drop_mpdu_cnt_ix0;
11568     A_UINT32 wmac_no_resource_drop_mpdu_cnt_ix1;
11569     A_UINT32 wmac_rxdma2reo_producer_full_cnt;
11570 } wmi_ipa_per_mac_stats;
11571 
11572 /** IPA statistics (once started) reset and start afresh after each connection */
11573 typedef struct {
11574     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_link_stats_event_fixed_param */
11575     /** unique id identifying the request, given in the request stats command */
11576     A_UINT32 request_id;
11577     /** number of MACs */
11578     A_UINT32 num_macs;
11579 /*
11580  * This TLV is followed by other TLVs:
11581  *   wmi_ipa_link_stats ipa_link_stats;
11582  *   wmi_ipa_per_mac_stats ipa_per_mac_stats[num_macs];
11583  */
11584 } wmi_ipa_link_stats_event_fixed_param;
11585 
11586 /** Interface statistics (once started) reset and start afresh after each connection */
11587 typedef struct {
11588     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
11589     /** unique id identifying the request, given in the request stats command */
11590     A_UINT32 request_id;
11591     /** unique id identifying the VDEV, generated by the caller */
11592     A_UINT32 vdev_id;
11593     /** Number of offload stats **/
11594     A_UINT32 num_offload_stats;
11595 /*
11596  * This TLV is followed by other TLVs:
11597  *   wmi_iface_link_stats iface_link_stats;
11598  *   num_ac * size of(struct wmi_wmm_ac_stats)
11599  *   wmi_iface_offload_stats iface_offload_stats[num_offload_stats]
11600  *   wmi_iface_powersave_stats iface_powersave_stats[]
11601  */
11602 } wmi_iface_link_stats_event_fixed_param;
11603 
11604 typedef struct {
11605     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlm_stats_event_fixed_param */
11606     /** bitmask listing which WLM stats are provided.
11607      * Copied from wlm_stats_cmd_fixed_param.
11608      * (This field is provided for convenience rather than necessity, since
11609      * the recipient can directly check which TLV arrays have non-zero length.)
11610      */
11611     A_UINT32 request_bitmask;
11612     /** unique id identifying the VDEV, generated by the caller */
11613     A_UINT32 vdev_id;
11614     /**
11615      * timestamp of event report, in microseconds units
11616      * This timestamp is for debugging purposes only.
11617      * It can be used to correlate this WLM stats event data with
11618      * other WLM information uploaded through other means.
11619      */
11620     A_UINT32 timestamp;
11621     /**
11622      * Interval between two consecutive WLM stats query requests,
11623      * in microseconds units.
11624      * This interval is used for converting the scan_period and pwr_on_period
11625      * values from within wmi_wlm_link_stats from percentage units to time
11626      * units.
11627      */
11628     A_UINT32 req_interval;
11629 /*
11630  * This TLV is followed by an A_UINT32 array TLV carrying an opaque payload.
11631  */
11632 } wmi_wlm_stats_event_fixed_param;
11633 
11634 /** Suspend option */
11635 enum {
11636     WMI_PDEV_SUSPEND, /* suspend */
11637     WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
11638 };
11639 
11640 typedef struct {
11641     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param  */
11642     /* suspend option sent to target */
11643     A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
11644     A_UINT32 suspend_opt;
11645 } wmi_pdev_suspend_cmd_fixed_param;
11646 
11647 typedef struct {
11648     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param  */
11649     A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
11650 } wmi_pdev_resume_cmd_fixed_param;
11651 
11652 typedef struct {
11653     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param,  */
11654     A_UINT32 num_vdev_stats; /* number of vdevs */
11655 } wmi_vdev_rate_stats_event_fixed_param;
11656 
11657 typedef struct {
11658     A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info*/
11659     A_UINT32 vdevid; /* Id of the wlan vdev*/
11660     A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted*/
11661     A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above*/
11662     A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
11663     A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
11664 } wmi_vdev_rate_ht_info;
11665 
11666 typedef struct {
11667     A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_rx_aggr_failure_event_fixed_param */
11668     A_UINT32 num_failure_info; /* How many holes on rx aggregation */
11669 } wmi_rx_aggr_failure_event_fixed_param;
11670 
11671 typedef struct {
11672     A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_wmi_rx_aggr_failure_info */
11673     A_UINT32 start_seq; /* start sequence number of the hole */
11674     A_UINT32 end_seq; /* end sequence number of the hole */
11675 } wmi_rx_aggr_failure_info;
11676 
11677 typedef struct {
11678     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_pn_request_cmd_fixed_param */
11679     /** unique id identifying the VDEV, generated by the caller */
11680     A_UINT32 vdev_id;
11681     /** peer MAC address */
11682     wmi_mac_addr peer_macaddr;
11683     A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
11684     /** key index **/
11685     A_UINT32 key_ix;
11686 } wmi_peer_tx_pn_request_cmd_fixed_param;
11687 
11688 typedef struct {
11689     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_pn_request_cmd_fixed_param */
11690     /** unique id identifying the VDEV, generated by the caller */
11691     A_UINT32 vdev_id;
11692     /** peer MAC address */
11693     wmi_mac_addr peer_macaddr;
11694     A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
11695     /** key index **/
11696     A_UINT32 key_ix;
11697 } wmi_peer_rx_pn_request_cmd_fixed_param;
11698 
11699 typedef struct {
11700     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_pn_response_event_fixed_param */
11701     /** unique id identifying the VDEV, generated by the caller */
11702     A_UINT32 vdev_id;
11703     /** peer MAC address */
11704     wmi_mac_addr peer_macaddr;
11705     A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
11706     /** Packet Number
11707     * The PN is provided in little endian order, with bits 7:0 of the PN
11708     * residing in pn[0].
11709     * The key_type indirectly specifies the packet number length, and thus
11710     * how many bytes within pn[] are filled with valid data.
11711     */
11712     A_UINT8 pn[16];
11713     /** key index **/
11714     A_UINT32 key_ix;
11715 } wmi_peer_tx_pn_response_event_fixed_param;
11716 
11717 typedef struct {
11718     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_pn_response_event_fixed_param */
11719     /** unique id identifying the VDEV, generated by the caller */
11720     A_UINT32 vdev_id;
11721     /** peer MAC address */
11722     wmi_mac_addr peer_macaddr;
11723     A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
11724     A_UINT32 key_idx;
11725     /** Packet Number
11726     * The PN is provided in little endian order, with bits 7:0 of the PN
11727     * residing in pn[0].
11728     * The key_type indirectly specifies the packet number length, and thus
11729     * how many bytes within pn[] are filled with valid data.
11730     */
11731     A_UINT8 pn[WMI_MAX_PN_LEN];
11732 } wmi_peer_rx_pn_response_event_fixed_param;
11733 
11734 typedef struct {
11735     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
11736     wmi_stats_id stats_id;
11737     /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
11738     A_UINT32 num_pdev_stats;
11739     /** number of vdev stats event structures  (wmi_vdev_stats) 0 or max vdevs */
11740     A_UINT32 num_vdev_stats;
11741     /** number of peer stats event structures  (wmi_peer_stats) 0 or max peers */
11742     A_UINT32 num_peer_stats;
11743     A_UINT32 num_bcnflt_stats;
11744     /** number of chan stats event structures  (wmi_chan_stats) 0 to MAX MCC CHANS */
11745     A_UINT32 num_chan_stats;
11746     /** number of MIB stats event structures (wmi_mib_stats) */
11747     A_UINT32 num_mib_stats;
11748     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. */
11749     /** number of beacon stats event structures (wmi_bcn_stats) */
11750     A_UINT32 num_bcn_stats;
11751     /** number of extended peer stats event structures (wmi_peer_extd_stats) */
11752     A_UINT32 num_peer_extd_stats;
11753     /** number of extd2 peer stats event structures (wmi_peer_extd2_stats) */
11754     A_UINT32 num_peer_extd2_stats;
11755     /** last_event
11756      * The most significant bit is set to 1 to indicate whether the last_event
11757      * field contains valid data.  The least significant bit is set to 1 to
11758      * indicate this is the final WMI_STATS_EVENT in a series.
11759      */
11760     A_UINT32 last_event;
11761     /** number of extended MIB stats event structures (wmi_mib_extd_stats) */
11762     A_UINT32 num_mib_extd_stats;
11763     /** Indicates the vdev id of the stats for MLO stats query */
11764     wmi_vdev_id_info vdev_id_info;
11765     /** Indicates the vdev id of the stats for MLO stats query v2 */
11766     wmi_vdev_id_info_v2 vdev_id_info_v2;
11767 
11768 /* This TLV is followed by another TLV of array of bytes
11769  *   A_UINT8 data[];
11770  *  This data array contains
11771  *   num_pdev_stats * size of(struct wmi_pdev_stats)
11772  *   num_vdev_stats * size of(struct wmi_vdev_stats)
11773  *   num_peer_stats * size of(struct wmi_peer_stats)
11774  *   num_bcnflt_stats * size_of()
11775  *   num_chan_stats * size of(struct wmi_chan_stats)
11776  *   num_mib_stats * size of(struct wmi_mib_stats)
11777  *   num_bcn_stats * size of(struct wmi_bcn_stats)
11778  */
11779 /* If WMI_REQUEST_PEER_EXTD_STAT is set in stats_id,
11780  * the data[] array also contains num_peer_stats * size of wmi_peer_extd_stats
11781  * following the information elements listed above.
11782  */
11783 /* If WMI_REQUEST_MIB_EXTD_STAT is set in stats_id,
11784  * the data[] array also contains
11785  * num_mib_extd_stats * size of(struct wmi_mib_extd_stats)
11786  * following the information elements listed above.
11787  */
11788 /* If WMI_REQUEST_PMF_BCN_PROTECT_STAT is set in stats_id, then TLV
11789  * wmi_pmf_bcn_protect_stats pmf_bcn_protect_stats[]
11790  * follows the other TLVs
11791  */
11792 /* If WMI_REQUEST_VDEV_EXTD_STAT is set in stats_id, then TLV
11793  * wmi_vdev_extd_stats wmi_vdev_extd_stats[]
11794  * follows the other TLVs
11795  */
11796 /* If WMI_REQUEST_PDEV_EXTD_STAT is set in stats_id, then TLV
11797  * wmi_pdev_extd_stats wmi_pdev_extd_stats[]
11798  * follows the other TLVs
11799  */
11800 /* If WMI_REQUEST_PDEV_TELEMETRY_STAT is set in stats_id, then TLV
11801  * wmi_pdev_telemetry_stats wmi_pdev_telemetry_stats[]
11802  * follows the other TLVs
11803  */
11804 } wmi_stats_event_fixed_param;
11805 
11806 /* WLAN channel CCA stats bitmap  */
11807 #define WLAN_STATS_IDLE_TIME_SHIFT             0
11808 #define WLAN_STATS_IDLE_TIME_TIME              0x00000001
11809 
11810 #define WLAN_STATS_TX_TIME_SHIFT               1
11811 #define WLAN_STATS_TX_TIME_MASK                0x00000002
11812 
11813 #define WLAN_STATS_RX_IN_BSS_TIME_SHIFT        2
11814 #define WLAN_STATS_RX_IN_BSS_TIME_MASK         0x00000004
11815 
11816 #define WLAN_STATS_RX_OUT_BSS_TIME_SHIFT       3
11817 #define WLAN_STATS_RX_OUT_BSS_TIME_MASK        0x00000008
11818 
11819 #define WLAN_STATS_RX_BUSY_TIME_SHIFT          4
11820 #define WLAN_STATS_RX_BUSY_TIME_MASK           0x00000010
11821 
11822 #define WLAN_STATS_RX_IN_BAD_COND_TIME_SHIFT   5
11823 #define WLAN_STATS_RX_IN_BAD_COND_TIME_MASK    0x00000020
11824 
11825 #define WLAN_STATS_TX_IN_BAD_COND_TIME_SHIFT   6
11826 #define WLAN_STATS_TX_IN_BAD_COND_TIME_MASK    0x00000040
11827 
11828 #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_SHIFT   7
11829 #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_MASK    0x00000080
11830 
11831 /* WLAN peer signal stats bitmap  */
11832 #define WLAN_STATS_PER_CHAIN_SNR_SHIFT         0
11833 #define WLAN_STATS_PER_CHAIN_SNR_MASK          0x00000001
11834 
11835 #define WLAN_STATS_PER_CHAIN_NF_SHIFT          1
11836 #define WLAN_STATS_PER_CHAIN_NF_MASK           0x00000002
11837 
11838 /* WLAN TX stats bitmap  */
11839 #define WLAN_STATS_TX_MSDU_CNT_SHIFT           0
11840 #define WLAN_STATS_TX_MSDU_CNT_MASK            0x00000001
11841 
11842 #define WLAN_STATS_TX_MPDU_CNT_SHIFT           1
11843 #define WLAN_STATS_TX_MPDU_CNT_MASK            0x00000002
11844 
11845 #define WLAN_STATS_TX_PPDU_CNT_SHIFT           2
11846 #define WLAN_STATS_TX_PPDU_CNT_MASK            0x00000004
11847 
11848 #define WLAN_STATS_TX_BYTES_SHIFT              3
11849 #define WLAN_STATS_TX_BYTES_MASK               0x00000008
11850 
11851 #define WLAN_STATS_TX_MSDU_DROP_CNT_SHIFT      4
11852 #define WLAN_STATS_TX_MSDU_DROP_CNT_MASK       0x00000010
11853 
11854 #define WLAN_STATS_TX_DROP_BYTES_SHIFT         5
11855 #define WLAN_STATS_TX_DROP_BYTES_MASK          0x00000020
11856 
11857 #define WLAN_STATS_TX_MPDU_RETRY_CNT_SHIFT     6
11858 #define WLAN_STATS_TX_MPDU_RETRY_CNT_MASK      0x00000040
11859 
11860 #define WLAN_STATS_TX_MPDU_FAIL_CNT_SHIFT      7
11861 #define WLAN_STATS_TX_MPDU_FAIL_CNT_MASK       0x00000080
11862 
11863 #define WLAN_STATS_TX_PPDU_FAIL_CNT_SHIFT      8
11864 #define WLAN_STATS_TX_PPDU_FAIL_CNT_MASK       0x00000100
11865 
11866 #define WLAN_STATS_TX_MPDU_AGGR_SHIFT          9
11867 #define WLAN_STATS_TX_MPDU_AGGR_MASK           0x00000200
11868 
11869 #define WLAN_STATS_TX_SUCC_MCS_SHIFT           10
11870 #define WLAN_STATS_TX_SUCC_MCS_MASK            0x00000400
11871 
11872 #define WLAN_STATS_TX_FAIL_MCS_SHIFT           11
11873 #define WLAN_STATS_TX_FAIL_MCS_MASK            0x00000800
11874 
11875 #define WLAN_STATS_TX_PPDU_DELAY_SHIFT         12
11876 #define WLAN_STATS_TX_PPDU_DELAY_MASK          0x00001000
11877 
11878 /* WLAN RX stats bitmap  */
11879 #define WLAN_STATS_MAC_RX_MPDU_CNT_SHIFT     0
11880 #define WLAN_STATS_MAC_RX_MPDU_CNT_MASK      0x00000001
11881 
11882 #define WLAN_STATS_MAC_RX_BYTES_SHIFT        1
11883 #define WLAN_STATS_MAC_RX_BYTES_MASK         0x00000002
11884 
11885 #define WLAN_STATS_PHY_RX_PPDU_CNT_SHIFT     2
11886 #define WLAN_STATS_PHY_RX_PPDU_CNT_MASK      0x00000004
11887 
11888 #define WLAN_STATS_PHY_RX_BYTES_SHIFT        3
11889 #define WLAN_STATS_PHY_RX_BYTES_MASK         0x00000008
11890 
11891 #define WLAN_STATS_RX_DISORDER_CNT_SHIFT     4
11892 #define WLAN_STATS_RX_DISORDER_CNT_MASK      0x00000010
11893 
11894 #define WLAN_STATS_RX_MPDU_RETRY_CNT_SHIFT   5
11895 #define WLAN_STATS_RX_MPDU_RETRY_CNT_MASK    0x00000020
11896 
11897 #define WLAN_STATS_RX_MPDU_DUP_CNT_SHIFT     6
11898 #define WLAN_STATS_RX_MPDU_DUP_CNT_MASK      0x00000040
11899 
11900 #define WLAN_STATS_RX_MPDU_DISCARD_CNT_SHIFT 7
11901 #define WLAN_STATS_RX_MPDU_DISCARD_CNT_MASK  0x00000080
11902 
11903 #define WLAN_STATS_RX_MPDU_AGGR_SHIFT        8
11904 #define WLAN_STATS_RX_MPDU_AGGR_MASK         0x00000100
11905 
11906 #define WLAN_STATS_RX_MCS_SHIFT              9
11907 #define WLAN_STATS_RX_MCS_MASK               0x00000200
11908 
11909 #define WLAN_STATS_STA_PS_INDS_SHIFT         10
11910 #define WLAN_STATS_STA_PS_INDS_MASK          0x00000400
11911 
11912 #define WLAN_STATS_STA_PS_DURS_SHIFT         11
11913 #define WLAN_STATS_STA_PS_DURS_MASK          0x00000800
11914 
11915 #define WLAN_STATS_RX_PROBE_REQS_SHIFT       12
11916 #define WLAN_STATS_RX_PROBE_REQS_MASK        0x00001000
11917 
11918 #define WLAN_STATS_RX_OTH_MGMTS_SHIFT        13
11919 #define WLAN_STATS_RX_OTH_MGMTS_MASK         0x00002000
11920 
11921 typedef struct
11922 {
11923     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats */
11924     A_UINT32 vdev_id;
11925     /** Percentage of idle time, no TX, no RX, no interference */
11926     A_UINT32 idle_time;
11927     /** Percentage of time transmitting packets */
11928     A_UINT32 tx_time;
11929     /** Percentage of time receiving packets in current BSSs */
11930     A_UINT32 rx_in_bss_time;
11931     /** Percentage of time receiving packets not in current BSSs */
11932     A_UINT32 rx_out_bss_time;
11933     /** Percentage of time interference detected. */
11934     A_UINT32 rx_busy_time;
11935     /** Percentage of time receiving packets with errors
11936      * or packets flagged as retransmission or seqnum discontinued. */
11937     A_UINT32 rx_in_bad_cond_time;
11938     /** Percentage of time the device transmitted packets that haven't been ACKed. */
11939     A_UINT32 tx_in_bad_cond_time;
11940     /** Percentage of time the chip is unable to work in normal conditions. */
11941     A_UINT32 wlan_not_avail_time;
11942 } wmi_chan_cca_stats;
11943 
11944 /** Thresholds of cca stats, stands for percentages of stats variation.
11945  *  Check wmi_chan_cca_stats for each stats's meaning.
11946  */
11947 typedef struct
11948 {
11949     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats_thresh */
11950     A_UINT32 idle_time;           /* units = percent */
11951     A_UINT32 tx_time;             /* units = percent */
11952     A_UINT32 rx_in_bss_time;      /* units = percent */
11953     A_UINT32 rx_out_bss_time;     /* units = percent */
11954     A_UINT32 rx_busy_time;        /* units = percent */
11955     A_UINT32 rx_in_bad_cond_time; /* units = percent */
11956     A_UINT32 tx_in_bad_cond_time; /* units = percent */
11957     A_UINT32 wlan_not_avail_time; /* units = percent */
11958 } wmi_chan_cca_stats_thresh;
11959 
11960 typedef struct
11961 {
11962     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats */
11963     A_UINT32 vdev_id;
11964     A_UINT32 peer_id;
11965     /** per chain SNR in current bss, units are dB */
11966     A_INT32 per_chain_snr[WMI_MAX_CHAINS];
11967     /** per chain background noise, units are dBm */
11968     A_INT32 per_chain_nf[WMI_MAX_CHAINS];
11969     /** per antenna rx MPDUs */
11970     A_UINT32 per_antenna_rx_mpdus[WMI_MAX_CHAINS];
11971     /** per antenna tx MPDUs */
11972     A_UINT32 per_antenna_tx_mpdus[WMI_MAX_CHAINS];
11973     /** num of valid chains for per antenna rx/tx MPDU cnts*/
11974     A_UINT32 num_chains_valid;
11975 } wmi_peer_signal_stats;
11976 
11977 /** Thresholds of signal stats, stand for percentage of stats variation.
11978  *  Check wmi_peer_signal_stats for each stats's meaning.
11979  */
11980 typedef struct
11981 {
11982     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats_thresh */
11983     A_UINT32 per_chain_snr; /* units = dB */
11984     A_UINT32 per_chain_nf; /* units = dBm */
11985 } wmi_peer_signal_stats_thresh;
11986 
11987 typedef struct
11988 {
11989     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats */
11990     /** Number of total TX MSDUs on MAC layer in the period */
11991     A_UINT32 tx_msdu_cnt;
11992     /** Number of total TX MPDUs on MAC layer in the period */
11993     A_UINT32 tx_mpdu_cnt;
11994     /** Number of total TX PPDUs on MAC layer in the period */
11995     A_UINT32 tx_ppdu_cnt;
11996     /** Bytes of tx data on MAC layer in the period */
11997     A_UINT32 tx_bytes;
11998     /** Number of TX MSDUs cancelled due to any reason in the period,
11999      * such as WMM limitation/bandwidth limitation/radio congestion */
12000     A_UINT32 tx_msdu_drop_cnt;
12001     /** Bytes of dropped TX packets in the period */
12002     A_UINT32 tx_drop_bytes;
12003     /** Number of unacked transmissions of MPDUs */
12004     A_UINT32 tx_mpdu_retry_cnt;
12005     /** Number of MPDUs have not been ACKed despite retried */
12006     A_UINT32 tx_mpdu_fail_cnt;
12007     /** Number of PPDUs which received no block ack */
12008     A_UINT32 tx_ppdu_fail_cnt;
12009     /* This TLV is followed by TLVs below: :
12010      *     A_UINT32 tx_mpdu_aggr[tx_mpdu_aggr_array_len];
12011      *     A_UINT32 tx_succ_mcs[tx_succ_mcs_array_len];
12012      *     A_UINT32 tx_fail_mcs[tx_fail_mcs_array_len];
12013      *     A_UINT32 tx_ppdu_delay[tx_ppdu_delay_array_len];
12014      */
12015 } wmi_tx_stats;
12016 
12017 /** Thresholds of tx stats, stand for percentage of stats variation.
12018  *  Check wmi_tx_stats for each stats's meaning.
12019  */
12020 typedef struct
12021 {
12022     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats_thresh */
12023     A_UINT32 tx_msdu_cnt;
12024     A_UINT32 tx_mpdu_cnt;
12025     A_UINT32 tx_ppdu_cnt;
12026     A_UINT32 tx_bytes;
12027     A_UINT32 tx_msdu_drop_cnt;
12028     A_UINT32 tx_drop_bytes;
12029     A_UINT32 tx_mpdu_retry_cnt;
12030     A_UINT32 tx_mpdu_fail_cnt;
12031     A_UINT32 tx_ppdu_fail_cnt;
12032     A_UINT32 tx_mpdu_aggr;
12033     A_UINT32 tx_succ_mcs;
12034     A_UINT32 tx_fail_mcs;
12035     A_UINT32 tx_ppdu_delay;
12036 } wmi_tx_stats_thresh;
12037 
12038 typedef struct
12039 {
12040     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_tx_stats */
12041     A_UINT32 vdev_id;
12042     A_UINT32 peer_id;
12043     /* The TLVs for the 4 AC follows:
12044      *     wmi_tx_stats tx_stats[];   wmi_tx_stats for BE/BK/VI/VO
12045      */
12046 } wmi_peer_ac_tx_stats;
12047 
12048 typedef struct
12049 {
12050     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats */
12051     /** Number of RX MPDUs on MAC layer */
12052     A_UINT32 mac_rx_mpdu_cnt;
12053     /** Bytes of RX packets on MAC layer */
12054     A_UINT32 mac_rx_bytes;
12055     /** Number of RX PPDU on PHY layer */
12056     A_UINT32 phy_rx_ppdu_cnt;
12057     /** Bytes of RX packets on PHY layer */
12058     A_UINT32 phy_rx_bytes;
12059     /** Number of discontinuity in seqnum */
12060     A_UINT32 rx_disorder_cnt;
12061     /** Number of RX MPDUs flagged as retransmissions */
12062     A_UINT32 rx_mpdu_retry_cnt;
12063     /** Number of RX MPDUs identified as duplicates */
12064     A_UINT32 rx_mpdu_dup_cnt;
12065     /** Number of RX MPDUs discarded */
12066     A_UINT32 rx_mpdu_discard_cnt;
12067     /* This TLV is followed by TLVs below:
12068      *     A_UINT32 rx_mpdu_aggr[rx_mpdu_aggr_array_len];
12069      *     A_UINT32 rx_mcs[rx_mcs_array_len];
12070      */
12071 } wmi_rx_stats;
12072 
12073 /** Thresholds of rx stats, stands for percentage of stats variation.
12074  *  Check wmi_rx_stats for each stats's meaning.
12075  */
12076 typedef struct
12077 {
12078     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats_thresh */
12079     A_UINT32 mac_rx_mpdu_cnt;
12080     A_UINT32 mac_rx_bytes;
12081     A_UINT32 phy_rx_ppdu_cnt;
12082     A_UINT32 phy_rx_bytes;
12083     A_UINT32 rx_disorder_cnt;
12084     A_UINT32 rx_mpdu_retry_cnt;
12085     A_UINT32 rx_mpdu_dup_cnt;
12086     A_UINT32 rx_mpdu_discard_cnt;
12087     A_UINT32 rx_mpdu_aggr;
12088     A_UINT32 rx_mcs;
12089     A_UINT32 sta_ps_inds;
12090     A_UINT32 sta_ps_durs;
12091     A_UINT32 rx_probe_reqs;
12092     A_UINT32 rx_oth_mgmts;
12093 } wmi_rx_stats_thresh;
12094 
12095 typedef struct
12096 {
12097     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_rx_stats */
12098     A_UINT32 vdev_id;
12099     A_UINT32 peer_id;
12100     /** How many times STAs go to sleep */
12101     A_UINT32 sta_ps_inds;
12102     /** Total sleep time of STAs, milliseconds units */
12103     A_UINT32 sta_ps_durs;
12104     /** Number of probe requests received */
12105     A_UINT32 rx_probe_reqs;
12106     /** Number of other management frames received, not including probe requests */
12107     A_UINT32 rx_oth_mgmts;
12108     /* The TLVs for the 4 AC follows:
12109      *     wmi_rx_stats rx_stats[];  wmi_rx_stats for BE/BK/VI/VO
12110      */
12111 } wmi_peer_ac_rx_stats;
12112 
12113 typedef struct
12114 {
12115     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_period */
12116     /*
12117      * This struct provides the timestamps from a low-frequency timer
12118      * for the start and end of a stats period.
12119      * Each timestamp is reported twice, with different units.
12120      * The _msec timestamp is in millisecond units.
12121      * The _count timestamp is in clock tick units.
12122      * The timestamp is reported in clock ticks as well as in milliseconds
12123      * so that if the stats start and end times fall within the same
12124      * millisecond, the clock tick timestamps can still be used to
12125      * determine what fraction of a millisecond the stats period occupied.
12126      */
12127     A_UINT32 start_low_freq_msec;
12128     A_UINT32 start_low_freq_count;
12129     A_UINT32 end_low_freq_msec;
12130     A_UINT32 end_low_freq_count;
12131 } wmi_stats_period;
12132 
12133 typedef enum {
12134     /** Periodic timer timed out, based on the period specified
12135      *  by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
12136      */
12137     TRIGGER_COND_ID_TIMER_TIMED_OUT  =  0x1,
12138     /** Any of the (enabled) stats thresholds specified
12139      *  in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
12140      *  within the current stats period.
12141      */
12142     TRIGGER_COND_ID_THRESH_EXCEEDED  =  0x2,
12143     /** In Response to the one-time wlan stats request of
12144      *  WMI_REQUEST_WLAN_STATS_CMDID from host.
12145      */
12146     TRIGGER_COND_ID_ONE_TIME_REQUEST =  0x3,
12147 } wmi_report_stats_event_trigger_cond_id;
12148 
12149 typedef struct
12150 {
12151     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_interference */
12152 
12153     /** For cases where a single rx chain has options to be connected to
12154      * different rx antennas, show which rx antennas were in use during
12155      * receipt of a given PPDU.
12156      * This sa_ant_matrix provides a bitmask of the antennas used while
12157      * receiving this frame.
12158      */
12159     A_UINT32 sa_ant_matrix;
12160 
12161     /** Count how many times the hal_rxerr_phy is marked, in this time period.
12162      * The counter value is reset each period. The host specifies the period
12163      * via WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD.
12164      */
12165     A_UINT32 phyerr_count;
12166 
12167     /** The timestamp at which the WMI event is reported.
12168      * In targets that have a WBTIMER_1 timer, this timestamp is taken
12169      * from WBTIMER_1.
12170      */
12171     A_UINT32 timestamp;
12172 } wmi_stats_interference;
12173 
12174 typedef struct {
12175     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_report_stats_event_fixed_param */
12176     /** Indicate what triggered this event, check wmi_report_stats_event_trigger_cond_id for details */
12177     A_UINT32 trigger_cond_id;
12178     /** Bitmap to indicate changed channel CCA stats which exceeded the thresholds */
12179     A_UINT32 cca_chgd_bitmap;
12180     /** Bitmap to indicate changed peer signal stats which exceeded the thresholds */
12181     A_UINT32 sig_chgd_bitmap;
12182     /** Bitmap to indicate changed TX counters which exceeded the thresholds */
12183     A_UINT32 tx_chgd_bitmap;
12184     /** Bitmap to indicate changed RX counters which exceeded the thresholds */
12185     A_UINT32 rx_chgd_bitmap;
12186     /** number of per channel CCA stats structures (wmi_chan_cca_stats), 0 to max vdevs*/
12187     A_UINT32 num_chan_cca_stats;
12188     /** number of per peer signal stats structures (wmi_peer_signal_stats), 0 to max peers*/
12189     A_UINT32 num_peer_signal_stats;
12190     /** number of per peer ac TX stats structures (wmi_peer_ac_tx_stats), 0 to max peers*/
12191     A_UINT32 num_peer_ac_tx_stats;
12192     /** Array length of tx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
12193      *  The array indicates number of MPDUs sent on specified aggregation size
12194      *  (per number of MPDUs per AMPDUs / 1 to 7 and 8+).
12195      *  Array length can be set per WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN */
12196     A_UINT32 tx_mpdu_aggr_array_len;
12197     /** Array length of tx_succ_mcs[] which is histogram of encoding rate.
12198      *  The array indicates number of acked PPDUs sent at a specific rate */
12199     A_UINT32 tx_succ_mcs_array_len;
12200     /** Array length of tx_fail_mcs[] which is histogram of encoding rate.
12201      *  The array indicates number of unacked PPDUs sent at a specific rate */
12202     A_UINT32 tx_fail_mcs_array_len;
12203     /** tx_ppdu_delay[]is a histogram of delays on MAC layer.
12204     * The array counts numbers of PPDUs encountering different TX time delays.
12205     * TX delay here means time interval between the time a PPDU is queued
12206     * to the MAC HW for transmission and the time the lower layers of
12207     * tx FW return a tx status.
12208     *
12209     * The bin size tx_ppdu_delay_bin_size_ms specifies how many milliseconds
12210     * each bin of the tx_ppdu_delay histogram represents.
12211     * By default the bin size is 10ms.
12212     * tx_ppdu_delay[0] -> delays between 0-9 ms
12213     * tx_ppdu_delay[1] -> delays between 10-19 ms
12214     * ...
12215     * tx_ppdu_delay[9] -> delays between 90-99 ms
12216     * tx_ppdu_delay[10] -> delays >= 100 ms
12217     * Bin size can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS.
12218     */
12219     A_UINT32 tx_ppdu_delay_bin_size_ms;
12220     /** Array length of tx_ppdu_delay[]. It can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN */
12221     A_UINT32 tx_ppdu_delay_array_len;
12222     /** number of per peer ac RX stats structures (wmi_peer_ac_rx_stats), 0 to max peers*/
12223     A_UINT32 num_peer_ac_rx_stats;
12224     /** Array length of rx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
12225      *  It can be set per WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN */
12226     A_UINT32 rx_mpdu_aggr_array_len;
12227     /** Array size of rx_mcs[] which is histogram of encoding rate.
12228      *  The array indicates number of PPDUs received at a specific rate */
12229     A_UINT32 rx_mcs_array_len;
12230     /** Array size of stats_period[] which contains several stats periods. */
12231     A_UINT32 stats_period_array_len;
12232     /** Indicates the vdev id for MLO case */
12233     wmi_vdev_id_info vdev_id_info;
12234 
12235     /**
12236      * This TLV is followed by TLVs below:
12237      *    wmi_chan_cca_stats       chan_cca_stats[];         Array length is specified by num_chan_cca_stats
12238      *    wmi_peer_signal_stats    peer_signal_stats[];      Array length is specified by num_peer_signal_stats
12239      *    wmi_peer_ac_tx_stats     peer_ac_tx_stats[];       Array length is specified by num_peer_ac_tx_stats
12240      *    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)
12241      *    A_UINT32                 tx_mpdu_aggr[][][];       Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_mpdu_aggr_array_len,
12242      *                                                       array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_mpdu_aggr_array_len + A-MPDU aggregation index
12243      *    A_UINT32                 tx_succ_mcs[][][];        Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_succ_mcs_array_len,
12244      *                                                       array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_succ_mcs_array_len + MCS index
12245      *    A_UINT32                 tx_fail_mcs[][][];        Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_fail_mcs_array_len,
12246      *                                                       array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_fail_mcs_array_len + MCS index
12247      *    A_UINT32                 tx_ppdu_delay[][][];      Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_ppdu_delay_array_len,
12248      *                                                       array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_ppdu_delay_array_len + tx delay index
12249      *    wmi_peer_ac_rx_stats     peer_ac_rx_stats[];       Array length is specified by num_peer_ac_rx_stats
12250      *    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)
12251      *    A_UINT32                 rx_mpdu_aggr[][][];       Array length is num_peer_ac_rx_stats * WLAN_MAX_AC * rx_mpdu_aggr_array_len,
12252      *                                                       array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mpdu_aggr_array_len + A-MPDU aggregation index
12253      *    A_UINT32                 rx_mcs[][][];             Array length is (num_peer_ac_rx_stats * WLAN_MAX_AC) * rx_mcs_array_len,
12254      *                                                       array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mcs_array_len + MCS index
12255      *    wmi_stats_period         stats_period[];           Array length is specified by stats_period_array_len
12256      *    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.
12257      **/
12258 } wmi_report_stats_event_fixed_param;
12259 
12260 typedef struct {
12261     /** TLV tag and len; tag equals
12262      *  WMITLV_TAG_STRUC_wmi_peer_stats_info */
12263     A_UINT32 tlv_header;
12264     /** peer MAC address */
12265     wmi_mac_addr peer_macaddr;
12266     /** bytes (size of MPDUs) transmitted to this peer */
12267     struct {
12268         /* lower 32 bits of the tx_bytes value */
12269         A_UINT32 low_32;
12270         /* upper 32 bits of the tx_bytes value */
12271         A_UINT32 high_32;
12272     } tx_bytes;
12273     /** packets (MSDUs) transmitted to this peer */
12274     struct {
12275         /* lower 32 bits of the tx_packets value */
12276         A_UINT32 low_32;
12277         /* upper 32 bits of the tx_packets value */
12278         A_UINT32 high_32;
12279     } tx_packets;
12280     /** bytes (size of MPDUs) received from this peer */
12281     struct {
12282         /* lower 32 bits of the rx_bytes value */
12283         A_UINT32 low_32;
12284         /* upper 32 bits of the rx_bytes value */
12285         A_UINT32 high_32;
12286     } rx_bytes;
12287     /** packets (MSDUs) received from this peer */
12288     struct {
12289         /* lower 32 bits of the rx_packets value */
12290         A_UINT32 low_32;
12291         /* upper 32 bits of the rx_packets value */
12292         A_UINT32 high_32;
12293     } rx_packets;
12294     /** cumulative retry counts (MPDUs) */
12295     A_UINT32 tx_retries;
12296     /** number of failed transmissions (MPDUs) (retries exceeded, no ACK) */
12297     A_UINT32 tx_failed;
12298     /** rate information, it is output of WMI_ASSEMBLE_RATECODE_V1
12299      *  (in format of 0x1000RRRR)
12300      * The rate-code is a 4-bytes field in which,
12301      * for given rate, nss and preamble
12302      *
12303      * b'31-b'29 unused / reserved
12304      * b'28      indicate the version of rate-code (1 = RATECODE_V1)
12305      * b'27-b'11 unused / reserved
12306      * b'10-b'8  indicate the preamble (0 OFDM, 1 CCK, 2 HT, 3 VHT)
12307      * b'7-b'5   indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
12308      * b'4-b'0   indicate the rate, which is indicated as follows:
12309      *          OFDM :     0: OFDM 48 Mbps
12310      *                     1: OFDM 24 Mbps
12311      *                     2: OFDM 12 Mbps
12312      *                     3: OFDM 6 Mbps
12313      *                     4: OFDM 54 Mbps
12314      *                     5: OFDM 36 Mbps
12315      *                     6: OFDM 18 Mbps
12316      *                     7: OFDM 9 Mbps
12317      *         CCK (pream == 1)
12318      *                     0: CCK 11 Mbps Long
12319      *                     1: CCK 5.5 Mbps Long
12320      *                     2: CCK 2 Mbps Long
12321      *                     3: CCK 1 Mbps Long
12322      *                     4: CCK 11 Mbps Short
12323      *                     5: CCK 5.5 Mbps Short
12324      *                     6: CCK 2 Mbps Short
12325      *         HT/VHT (pream == 2/3)
12326      *                     0..7: MCS0..MCS7 (HT)
12327      *                     0..9: MCS0..MCS9 (11AC VHT)
12328      *                     0..11: MCS0..MCS11 (11AX VHT)
12329      */
12330     /** rate-code of the last transmission */
12331     A_UINT32 last_tx_rate_code;
12332     /** rate-code of the last received PPDU */
12333     A_UINT32 last_rx_rate_code;
12334     /** bitrate of the last transmission, in units of kbps */
12335     A_UINT32 last_tx_bitrate_kbps;
12336     /** bitrate of the last received PPDU, in units of kbps */
12337     A_UINT32 last_rx_bitrate_kbps;
12338     /** combined RSSI of the last received PPDU, in unit of dBm */
12339     A_INT32 peer_rssi;
12340     /** number of succeed transmissions (MPDUs) (ACK) */
12341     A_UINT32 tx_succeed;
12342     /**
12343      * The RSSI values are in dBm units, and are exponentially time-averaged.
12344      * The averaging is performed on the dB values (rather than the linear
12345      * values).
12346      */
12347     A_INT32 peer_rssi_per_chain[WMI_MAX_CHAINS];
12348     /* show how many elements in the tx_rate_counts array belong to this peer */
12349     A_UINT32 num_tx_rate_counts;
12350     /* show how many elements in the rx_rate_counts array belong to this peer */
12351     A_UINT32 num_rx_rate_counts;
12352     /* This TLV array is followed by other TLVs:
12353      *   A_UINT32 tx_rate_counts[sum(num_tx_rate_counts)];
12354      *       The above num_tx_rate_counts field shows which elements
12355      *       within the tx_rate_counts array belong to a given peer.
12356      *       Elements tx_rate_counts[0] to tx_rate_counts[N0-1] belong to
12357      *       peer 0, where N0 = peer_stats_info[0].num_tx_rate_counts.
12358      *       Elements tx_rate_counts[N0] to tx_rate_counts[N0+N1-1] belong to
12359      *       peer 1, where N1 = peer_stats_info[1].num_tx_rate_counts.
12360      *       etc.
12361      *   A_UINT32 rx_rate_counts[sum(num_rx_rate_counts)];
12362      *       The above num_rx_rate_counts field shows which elements
12363      *       within the rx_rate_counts array belong to a given peer.
12364      *       Elements rx_rate_counts[0] to rx_rate_counts[N0-1] belong to
12365      *       peer 0, where N0 = peer_stats_info[0].num_rx_rate_counts.
12366      *       Elements rx_rate_counts[N0] to rx_rate_counts[N0+N1-1] belong to
12367      *       peer 1, where N1 = peer_stats_info[1].num_rx_rate_counts.
12368      *       etc.
12369      */
12370 } wmi_peer_stats_info;
12371 
12372 typedef struct {
12373     /** TLV tag and len; tag equals
12374      *  WMITLV_TAG_STRUC_wmi_peer_stats_info_event_fixed_param */
12375     A_UINT32 tlv_header;
12376     /** VDEV to which the peers belong to */
12377     A_UINT32 vdev_id;
12378     /** number of peers in peer_stats_info[] */
12379     A_UINT32 num_peers;
12380     /** flag to indicate if there are more peers which will
12381      *  be sent a following separate peer_stats_info event */
12382     A_UINT32 more_data;
12383     /* This TLV is followed by another TLV of array of structs
12384      * wmi_peer_stats_info peer_stats_info[];
12385      */
12386 } wmi_peer_stats_info_event_fixed_param;
12387 
12388 /**
12389  * WMI arrays of length WMI_MGMT_FRAME_SUBTYPE_MAX use the
12390  * IEEE802.11 standard's enumeration of mgmt frame subtypes:
12391  *  0 -> IEEE80211_FC0_SUBTYPE_ASSOC_REQ
12392  *  1 -> IEEE80211_FC0_SUBTYPE_ASSOC_RESP
12393  *  2 -> IEEE80211_FC0_SUBTYPE_REASSOC_REQ
12394  *  3 -> IEEE80211_FC0_SUBTYPE_REASSOC_RESP
12395  *  4 -> IEEE80211_FC0_SUBTYPE_PROBE_REQ
12396  *  5 -> IEEE80211_FC0_SUBTYPE_PROBE_RESP
12397  *  6 -> Reserved
12398  *  7 -> Reserved
12399  *  8 -> IEEE80211_FC0_SUBTYPE_BEACON
12400  *  9 -> IEEE80211_FC0_SUBTYPE_ATIM
12401  * 10 -> IEEE80211_FC0_SUBTYPE_DISASSOC
12402  * 11 -> IEEE80211_FC0_SUBTYPE_AUTH
12403  * 12 -> IEEE80211_FC0_SUBTYPE_DEAUTH
12404  * 13 -> IEEE80211_FCO_SUBTYPE_ACTION
12405  * 14 -> IEEE80211_FC0_SUBTYPE_ACTION_NOACK
12406  * 15 -> IEEE80211_FC0_SUBTYPE_RESERVED
12407  */
12408 #define WMI_MGMT_FRAME_SUBTYPE_MAX 16
12409 
12410 typedef struct {
12411     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_pdev_stats_struct*/
12412     A_UINT32 tlv_header;
12413     /** pdev_id for identifying the MAC */
12414     A_UINT32 pdev_id;
12415     /** counter of how many times this pdev has
12416      *  transmitted each management frame sub-type */
12417     A_UINT32 tx_mgmt_subtype[WMI_MGMT_FRAME_SUBTYPE_MAX];
12418     /** counter of how many times this pdev has
12419      *  received each management frame sub-type */
12420     A_UINT32 rx_mgmt_subtype[WMI_MGMT_FRAME_SUBTYPE_MAX];
12421     /** scan fail dfs violation time in ms */
12422     A_UINT32 scan_fail_dfs_violation_time_ms;
12423     /** NOL check failed latest channel frequency in MHz */
12424     A_UINT32 nol_check_fail_last_chan_freq;
12425     /** NOL check failed timestamp in ms */
12426     A_UINT32 nol_check_fail_time_stamp_ms;
12427     /** total peer create count */
12428     A_UINT32 total_peer_create_cnt;
12429     /** total peer delete count */
12430     A_UINT32 total_peer_delete_cnt;
12431     /** total peer delete response count */
12432     A_UINT32 total_peer_delete_resp_cnt;
12433     /** sched algo FIFO full count */
12434     A_UINT32 vdev_pause_fail_rt_to_sched_algo_fifo_full_cnt;
12435     /** total number of qos null tx frame queued over WMI */
12436     A_UINT32 qos_null_tx_over_wmi;
12437     /** total qos null tx frame completion received count */
12438     A_UINT32 qos_null_tx_send_compl_over_wmi;
12439     /** total event alloc failure count for qos null tx send */
12440     A_UINT32 qos_null_tx_send_event_alloc_failed;
12441 
12442     /** wlan_pdev fields num_macs, vdev_up_count and vdev_active_count
12443      * num_macs_phy_vdev_up_active:
12444      * This word contains the following bitfields:
12445      * number of macs from wlan_pdev
12446      * (WMI_PDEV_STATS_NUM_MACS_SET,GET)
12447      * number of vdev up count
12448      * (WMI_PDEV_STATS_VDEV_UP_CNT_SET,GET)
12449      * number of vdev active count
12450      * (WMI_PDEV_STATS_VDEV_UP_CNT_SET,GET)
12451      */
12452    A_UINT32 opaque_debug_num_macs_phy_vdev_up_active;
12453    /** refer wlan_pdev ic flags */
12454    A_UINT32 opaque_debug_ic_flags;
12455    /** vdev_id that are paused per pdev */
12456    A_UINT32 opaque_debug_paused_ap_vdev_bitmap;
12457    /** opaque_debug_flags:
12458     * refer to WLAN_PS_DESC_BIN_HWM_HIT or WLAN_PS_DESC_BIN_LWM_HIT
12459     */
12460    A_UINT32 opaque_debug_flags;
12461    /** wlan_pdev fields remote_peer_cnt, max_rf_chains_2G and max_rf_chains_5G
12462     * remote_peer_cnt_max_rf_chains_2G_5G:
12463     * This word contains the following bitfields:
12464     * max chains supported in the 2.4 GHz band
12465     * (WMI_PDEV_STATS_MAX_RF_CHAIN_2G_SET,GET)
12466     * max chains supported in the 5 GHz band,
12467     * (WMI_PDEV_STATS_MAX_RF_CHAIN_5G_SET,GET)
12468     * number of remote peers
12469     * (WMI_PDEV_STATS_REMOTE_PEER_CNT_SET,GET)
12470     */
12471    A_UINT32 opaque_debug_remote_peer_cnt_max_rf_chains_2G_5G;
12472    /** wlan_pdev max HT Capability info, WMI_HT_CAP defines */
12473    A_UINT32 opaque_debug_max_ht_cap_info;
12474    /** wlan_pdev max VHT capability info, WMI_VHT_CAP defines */
12475    A_UINT32 opaque_debug_max_vht_cap_info;
12476    /** opaque_debug_max_vht_supp_mcs:
12477     * wlan_pdev max VHT Supported MCS which is
12478     * vht_supp_mcs_2G or vht_supp_mcs_5G
12479     */
12480    A_UINT32 opaque_debug_max_vht_supp_mcs;
12481    /** wlan_pdev max HE capability info, WMI_HE_CAP defines */
12482    A_UINT32 opaque_debug_max_he_cap_info;
12483    A_UINT32 opaque_debug_max_he_cap_info_ext;
12484    /** the nominal chain mask for transmit */
12485    A_UINT32 opaque_debug_tx_chain_mask;
12486    /** the nominal chain mask for receive */
12487    A_UINT32 opaque_debug_rx_chain_mask;
12488    /** opaque_debug_ema_flags:
12489     *  This word contains the following bitfields:
12490     *  ema_flags: ema_max_vap_cnt and ema_max_profile_period from wlan_pdev
12491     *  ema_max_vap_cnt- number of maximum EMA Tx vaps (VAPs having both
12492     *  VDEV_FLAGS_EMA_MODE and VDEV_FLAGS_TRANSMIT_AP set)
12493     *  (WMI_PDEV_STATS_EMA_MAX_VAP_CNT_SET,GET)
12494     *  ema_max_profile_period - maximum profile periodicity
12495     *  (maximum number of beacons after which VAP profiles repeat)
12496     *  for any EMA VAP on any pdev.
12497     *  (WMI_PDEV_STATS_EMA_MAX_PROFILE_PERIOD_SET,GET)
12498     */
12499    A_UINT32 opaque_debug_ema_flags;
12500    /** wlan_pdev - maximum ML peers supported */
12501    A_UINT32 opaque_debug_num_ml_peer_entries;
12502    /** This word contains the following bitfields:
12503     *  wlan_pdev fields - num_max_hw_links, current_chip_id and max_num_chips
12504     *      (related to MLO)
12505     *  Max number of HW links
12506     *  (WMI_PDEV_STATS_NUM_MAX_HW_LINKS_SET,GET)
12507     *  Current Chip Id
12508     *  (WMI_PDEV_STATS_CURRENT_CHIP_ID_SET,GET)
12509     *  Max number of chips
12510     *  (WMI_PDEV_STATS_MAX_NUM_CHIPS_SET,GET)
12511     */
12512    A_UINT32 opaque_debug_mlo_flags;
12513    /** Indicate beacon size in bytes */
12514    A_UINT32 opaque_debug_large_bcn_size;
12515    /** proposed by the host value of MSDUQs per each LinkView peer's TID */
12516    A_UINT32 opaque_debug_num_of_linkview_msduqs_per_tid;
12517    /** bcn_filter_context variables */
12518    A_UINT32 opaque_debug_bcns_dropped;
12519    A_UINT32 opaque_debug_bcns_recvd;
12520    A_UINT32 opaque_debug_bcns_delivered;
12521    /** Tids that are paused/unpaused based on module_id */
12522    A_UINT32 opaque_debug_vdev_all_tid_pause_bitmap;
12523    /** Tids that are blocked/unblocked based on module_id */
12524    A_UINT32 opaque_debug_vdev_all_tid_block_bitmap;
12525    /** wal_pdev rx filter, WAL_RX_FILTER_FLAGS defines */
12526    A_UINT32 opaque_debug_rx_filter;
12527    /** This word contains the following bitfields:
12528     *  aggr_nonaggr_retry_th:
12529     *      wal_pdev fields - agg_retry_th and non_agg_retry_th
12530     *      This value holds max retry threshold up to which a Data packet
12531     *      will be retried when ack is not received.
12532     *      agg_retry_th - Threshold value used when aggregation is enabled
12533     *          (WMI_PDEV_STATS_AGG_RETRY_TH_SET,GET)
12534     *      non_agg_retry_th - Threshold value used for non-aggregation.
12535     *          (WMI_PDEV_STATS_NON_AGG_RETRY_TH_SET)
12536     */
12537    A_UINT32 opaque_debug_aggr_nonaggr_retry_th;
12538    /** This word contains the following bitfields:
12539     *  num_max_rx_ba_sessions:
12540     *  Number of rx BA session establised
12541     *      (WMI_PDEV_STATS_NUM_RX_BA_SESSIONS_SET,GET)
12542     *  Max number of rx BA session from wal_pdev
12543     *      (WMI_PDEV_STATS_MAX_RX_BA_SESSIONS_SET,GET)
12544     */
12545    A_UINT32 opaque_debug_num_max_rx_ba_sessions;
12546    /** It holds WHAL_CHANNEL_SWITCH_FLAGS values */
12547    A_UINT32 opaque_debug_chan_switch_flags;
12548    /** reset_cause holds PDEV_RESET_CONSEC_FAILURE or PDEV_RESET_TXQ_TIMEOUT */
12549    A_UINT32 opaque_debug_consecutive_failure_reset_cause;
12550    /** PPDU duration limit, in us */
12551    A_UINT32 opaque_debug_mu_ppdu_dur_limit_us;
12552    /** pdev reset in progress */
12553    A_UINT32 opaque_debug_reset_in_progress;
12554    /** wal_dev - vdev_migrate_state refer to WAL_VDEV_MIGRATE_STATE */
12555    A_UINT32 opaque_debug_vdev_migrate_state;
12556    /** opaque_debug_rts_rc_flag:
12557     * wal_pdev rts ratecode - this value reflects whatever
12558     * WMI_PDEV_PARAM_RTS_FIXED_RATE value the host has specified for the pdev.
12559     */
12560    A_UINT32 opaque_debug_rts_rc_flag;
12561    /* Num of peer delete in progress */
12562    A_UINT32 opaque_debug_num_of_peer_delete_in_progress;
12563    /** wal_pdev total number of active vdev count */
12564    A_UINT32 opaque_debug_total_active_vdev_cnt;
12565    /** wal_pdev - max number of vdevs per pdev */
12566    A_UINT32 opaque_debug_max_vdevs;
12567    /* NonOccupancyList(NOL) context  */
12568    A_UINT32 opaque_debug_dfs_nol_count;
12569    /** NOL timeout in seconds */
12570    A_UINT32 opaque_debug_dfs_nol_timeout;
12571    A_UINT32 opaque_debug_dfs_use_nol;
12572    /** channel availability check mode, refer enum WMI_ADFS_OCAC_MODE */
12573    A_UINT32 opaque_debug_cac_mode;
12574    A_UINT32 opaque_debug_dyn_ppdu_dur; /* in ms */
12575    /** This word contains the following bitfields:
12576     * wal_pdev home channel info
12577     * home_chan_mhz_flags:
12578     * primary channel frequency in mhz
12579     *     (WMI_PDEV_STATS_HOME_CHAN_MHZ_SET,GET)
12580     * flags to specify other channel attributes
12581     *     (WMI_PDEV_STATS_HOME_CHAN_FLAGS_SET, GET)
12582     */
12583    A_UINT32 opaque_debug_home_chan_mhz_flags;
12584    /** home channel center frequency in MHz */
12585    A_UINT32 opaque_debug_home_band_center_freq;
12586    /** home channel phy_mode, refer enum WLAN_PHY_MODE */
12587    A_UINT32 opaque_debug_home_phy_mode;
12588    /** This word contains the following bitfields:
12589     * wal_pdev current channel info
12590     * cur_chan_mhz_flags:
12591     * primary channel frequency in mhz
12592     *     (WMI_PDEV_STATS_CUR_CHAN_MHZ_SET,GET)
12593     * flags to specify other channel attributes
12594     *     (WMI_PDEV_STATS_CUR_CHAN_FLAGS_SET,GET)
12595     */
12596    A_UINT32 opaque_debug_cur_chan_mhz_flags;
12597    /** current channel center frequency in MHz */
12598    A_UINT32 opaque_debug_cur_band_center_freq;
12599    /** current channel phy_mode, refer enum WLAN_PHY_MODE */
12600    A_UINT32 opaque_debug_cur_phy_mode;
12601    /* Beacon context info */
12602    A_UINT32 opaque_debug_bcn_q_num_bcns_queued_to_hw;
12603    /** beacon queue AIFS */
12604    A_UINT32 opaque_debug_aifs;
12605    /** beacon queue cwmin */
12606    A_UINT32 opaque_debug_cwmin;
12607    /** beacon queue cwmax */
12608    A_UINT32 opaque_debug_cwmax;
12609    /** FILS discovery period in TU */
12610    A_UINT32 opaque_debug_fils_period;
12611    /** Beacon interval in TU */
12612    A_UINT32 opaque_debug_beacon_period;
12613    A_UINT32 opaque_debug_staggered_beacon_intvl;
12614    /** wal_pdev tx context, refer enum WAL_TX_CTXT_FLAGS */
12615    A_UINT32 opaque_debug_tx_ctxt_flags;
12616    /** opaque_debug_burst_mode_pending_isr
12617     * wal_pdev tx_ctxt fields - burst_mode refer enum WAL_TX_BURST_MODE
12618     * and pending_isr_status count
12619     */
12620    A_UINT32 opaque_debug_burst_mode_pending_isr;
12621    /** max burst duration from ppdu duration in us */
12622    A_UINT32 opaque_debug_burst_dur;
12623    /** counter for tx hw stuck */
12624    A_UINT32 opaque_debug_tx_hw_stuck_cnt;
12625    /** counter for tx consecutive lifetime expiry */
12626    A_UINT32 opaque_debug_consecutive_lifetime_expiries;
12627    /** wal_pdev rx context, refer enum WAL_RX_CTXT_FLAGS */
12628    A_UINT32 opaque_debug_rx_ctxt_flags;
12629    /** wal_pdev fields in rx context for rx_suspend or resume count */
12630    A_UINT32 opaque_debug_rx_suspend_cnt;
12631    A_UINT32 opaque_debug_rx_resume_cnt;
12632    A_UINT32 opaque_debug_rx_pcie_suspend_cnt;
12633    A_UINT32 opaque_debug_rx_pcie_resume_cnt;
12634    /** This word contains the following bitfields:
12635     *  wal_pdev fields
12636     *  pdev paused - WMI_PDEV_STATS_PAUSED_SET,GET
12637     *  pdev suspend - WMI_PDEV_STATS_SUSPENDED_SET,GET
12638     *  cac_enabed - MI_PDEV_STATS_CAC_ENABLED_SET,GET
12639     *  monitor VAP present - WMI_PDEV_STATS_IS_MONITOR_TYPE_PRESENT_SET,GET
12640     *  beacon tx mode - WMI_PDEV_STATS_BCN_TX_MODE_SET,GET
12641     *  isTXsuspended - WMI_PDEV_STATS_IS_TXSUSPENDED_SET,GET
12642     *  isSCHEDsuspended - WMI_PDEV_STATS_IS_SCHEDSUSPENDED_SET,GET
12643     *  sched_algo_resume_needed -
12644     *      WMI_PDEV_STATS_SCHED_ALGO_RESUME_NEEDED_SET,GET
12645     *  abort_reason - WMI_PDEV_STATS_ABORT_REASON_SET,GET
12646     *  atf_cfg - WMI_PDEV_STATS_ATF_CONFIG_SET,GET
12647     *  Green AP TX chainmask valid - WMI_PDEV_STATS_GAP_TX_CH_MASK_VALID_SET,GET
12648     *  Green AP RX chainmask valid - WMI_PDEV_STATS_GAP_RX_CH_MASK_VALID_SET,GET
12649     *  Green AP Phy mode valid - WMI_PDEV_STATS_GAP_PHY_MODE_VALID_SET,GET
12650     *  burst_enable - WMI_PDEV_STATS_BURST_ENABLE_SET,GET
12651     */
12652    A_UINT32 opaque_debug_wal_pdev_bitfield;
12653    /** This word contains the following bitfields:
12654     *  gap_phy_mode_freq:
12655     *  When GreenAP is enabled, phy_mode (WMI_PDEV_STATS_GAP_PHY_MODE_SET,GET)
12656     *  and center freq(MHz) (WMI_PDEV_STATS_GAP_BAND_CENTER_FREQ1_SET,GET)
12657     *  in GAP context is displayed
12658     */
12659    A_UINT32 opaque_debug_gap_phy_mode_freq;
12660    /**
12661     * The following 5 opaque_debug_reserved_field variables are provided
12662     * purely for debugging by technicians who have outside knowledge of
12663     * what kind of values the target has placed into these fields.
12664     */
12665    A_UINT32 opaque_debug_reserved_field_1;
12666    A_UINT32 opaque_debug_reserved_field_2;
12667    A_UINT32 opaque_debug_reserved_field_3;
12668    A_UINT32 opaque_debug_reserved_field_4;
12669    A_UINT32 opaque_debug_reserved_field_5;
12670 } wmi_ctrl_path_pdev_stats_struct;
12671 
12672 #define WMI_PDEV_STATS_NUM_MACS_GET(flag) \
12673     WMI_GET_BITS(flag, 0, 8)
12674 #define WMI_PDEV_STATS_NUM_MACS_SET(flag, val) \
12675     WMI_SET_BITS(flag, 0, 8, val)
12676 #define WMI_PDEV_STATS_NUM_PHY_GET(flag) \
12677     WMI_GET_BITS(flag, 8, 8)
12678 #define WMI_PDEV_STATS_NUM_PHY_SET(flag, val) \
12679     WMI_SET_BITS(flag, 8, 8, val)
12680 #define WMI_PDEV_STATS_VDEV_UP_CNT_GET(flag) \
12681     WMI_GET_BITS(flag, 16, 8)
12682 #define WMI_PDEV_STATS_VDEV_UP_CNT_SET(flag, val) \
12683     WMI_SET_BITS(flag, 16, 8, val)
12684 #define WMI_PDEV_STATS_VDEV_ACTIVE_CNT_GET(flag) \
12685     WMI_GET_BITS(flag, 24, 8)
12686 #define WMI_PDEV_STATS_VDEV_ACTIVE_CNT_SET(flag, val) \
12687     WMI_SET_BITS(flag, 24, 8, val)
12688 #define WMI_PDEV_STATS_REMOTE_PEER_CNT_GET(flag) \
12689     WMI_GET_BITS(flag, 0, 16)
12690 #define WMI_PDEV_STATS_REMOTE_PEER_CNT_SET(flag, val) \
12691     WMI_SET_BITS(flag, 0, 16, val)
12692 #define WMI_PDEV_STATS_MAX_RF_CHAIN_2G_GET(flag) \
12693     WMI_GET_BITS(flag, 16, 8)
12694 #define WMI_PDEV_STATS_MAX_RF_CHAIN_2G_SET(flag, val) \
12695     WMI_SET_BITS(flag, 16, 8, val)
12696 #define WMI_PDEV_STATS_MAX_RF_CHAIN_5G_GET(flag) \
12697     WMI_GET_BITS(flag, 24, 8)
12698 #define WMI_PDEV_STATS_MAX_RF_CHAIN_5G_SET(flag, val) \
12699     WMI_SET_BITS(flag, 24, 8, val)
12700 #define WMI_PDEV_STATS_EMA_MAX_VAP_CNT_GET(flag) \
12701     WMI_GET_BITS(flag, 0, 8 )
12702 #define WMI_PDEV_STATS_EMA_MAX_VAP_CNT_SET(flag, val) \
12703     WMI_SET_BITS(flag, 0, 8 , val)
12704 #define WMI_PDEV_STATS_EMA_MAX_PROFILE_PERIOD_GET(flag) \
12705     WMI_GET_BITS(flag, 8, 8)
12706 #define WMI_PDEV_STATS_EMA_MAX_PROFILE_PERIOD_SET(flag, val) \
12707     WMI_SET_BITS(flag, 8, 8, val)
12708 #define WMI_PDEV_STATS_NUM_SELF_PEERS_GET(flag) \
12709     WMI_GET_BITS(flag, 16, 8)
12710 #define WMI_PDEV_STATS_NUM_SELF_PEERS_SET(flag, val) \
12711     WMI_SET_BITS(flag, 16, 8, val)
12712 #define WMI_PDEV_STATS_MAX_ACTIVE_VDEVS_GET(flag) \
12713     WMI_GET_BITS(flag, 24, 8)
12714 #define WMI_PDEV_STATS_MAX_ACTIVE_VDEVS_SET(flag, val) \
12715     WMI_SET_BITS(flag, 24, 8, val)
12716 #define WMI_PDEV_STATS_NUM_MAX_HW_LINKS_GET(flag) \
12717     WMI_GET_BITS(flag, 0, 8)
12718 #define WMI_PDEV_STATS_NUM_MAX_HW_LINKS_SET(flag, val) \
12719     WMI_SET_BITS(flag, 0, 8, val)
12720 #define WMI_PDEV_STATS_CURRENT_CHIP_ID_GET(flag) \
12721     WMI_GET_BITS(flag, 8, 8)
12722 #define WMI_PDEV_STATS_CURRENT_CHIP_ID_SET(flag, val) \
12723     WMI_SET_BITS(flag, 8, 8, val)
12724 #define WMI_PDEV_STATS_MAX_NUM_CHIPS_GET(flag) \
12725     WMI_GET_BITS(flag, 16, 8)
12726 #define WMI_PDEV_STATS_MAX_NUM_CHIPS_SET(flag, val) \
12727     WMI_SET_BITS(flag, 16, 8, val)
12728 #define WMI_PDEV_STATS_NUM_HOME_CHANS_GET(flag) \
12729     WMI_GET_BITS(flag, 24, 8)
12730 #define WMI_PDEV_STATS_NUM_HOME_CHANS_SET(flag, val) \
12731     WMI_SET_BITS(flag, 24, 8, val)
12732 #define WMI_PDEV_STATS_AGG_RETRY_TH_GET(flag) \
12733     WMI_GET_BITS(flag, 0, 8)
12734 #define WMI_PDEV_STATS_AGG_RETRY_TH_SET(flag, val) \
12735     WMI_SET_BITS(flag, 0, 8, val)
12736 #define WMI_PDEV_STATS_NON_AGG_RETRY_TH_GET(flag) \
12737     WMI_GET_BITS(flag, 8, 8)
12738 #define WMI_PDEV_STATS_NON_AGG_RETRY_TH_SET(flag, val) \
12739     WMI_SET_BITS(flag, 8, 8, val)
12740 #define WMI_PDEV_STATS_MAX_NON_DATA_RETRY_TH_GET(flag) \
12741     WMI_GET_BITS(flag, 16, 8)
12742 #define WMI_PDEV_STATS_MAX_NON_DATA_RETRY_TH_SET(flag, val) \
12743     WMI_SET_BITS(flag, 16, 8, val)
12744 #define WMI_PDEV_STATS_NUM_CONSECUTIVE_BCN_TX_FILT_GET(flag) \
12745     WMI_GET_BITS(flag, 24, 8)
12746 #define WMI_PDEV_STATS_NUM_CONSECUTIVE_BCN_TX_FILT_SET(flag, val) \
12747     WMI_SET_BITS(flag, 24, 8, val)
12748 #define WMI_PDEV_STATS_NUM_RX_BA_SESSIONS_GET(flag) \
12749     WMI_GET_BITS(flag, 0, 16)
12750 #define WMI_PDEV_STATS_NUM_RX_BA_SESSIONS_SET(flag, val) \
12751     WMI_SET_BITS(flag, 0, 16, val)
12752 #define WMI_PDEV_STATS_MAX_RX_BA_SESSIONS_GET(flag) \
12753     WMI_GET_BITS(flag, 16, 16)
12754 #define WMI_PDEV_STATS_MAX_RX_BA_SESSIONS_SET(flag, val) \
12755     WMI_SET_BITS(flag, 16, 16, val)
12756 #define WMI_PDEV_STATS_PPDU_DUR_LIMIT_US_GET(flag) \
12757     WMI_GET_BITS(flag, 0, 16)
12758 #define WMI_PDEV_STATS_PPDU_DUR_LIMIT_US_SET(flag, val) \
12759     WMI_SET_BITS(flag, 0, 16, val)
12760 #define WMI_PDEV_STATS_MU_PPDU_DUR_LIMIT_US_GET(flag) \
12761     WMI_GET_BITS(flag, 16, 16)
12762 #define WMI_PDEV_STATS_MU_PPDU_DUR_LIMIT_US_SET(flag, val) \
12763     WMI_SET_BITS(flag, 16, 16, val)
12764 #define WMI_PDEV_STATS_RTS_RC_FLAGS_GET(flag) \
12765     WMI_GET_BITS(flag, 0, 8)
12766 #define WMI_PDEV_STATS_RTS_RC_FLAGS_SET(flag, val) \
12767     WMI_SET_BITS(flag, 0, 8, val)
12768 #define WMI_PDEV_STATS_RTS_RC_SET(flag, val) \
12769     WMI_SET_BITS(flag, 8, 8, val)
12770 #define WMI_PDEV_STATS_RTS_RC_GET(flag) \
12771     WMI_GET_BITS(flag, 8, 8)
12772 #define WMI_PDEV_STATS_GAP_TX_CH_MASK_SET(flag, val) \
12773     WMI_SET_BITS(flag, 16, 8, val)
12774 #define WMI_PDEV_STATS_GAP_TX_CH_MASK_GET(flag) \
12775     WMI_GET_BITS(flag, 16, 8)
12776 #define WMI_PDEV_STATS_GAP_RX_CH_MASK_SET(flag, val) \
12777     WMI_SET_BITS(flag, 24, 8, val)
12778 #define WMI_PDEV_STATS_GAP_RX_CH_MASK_GET(flag) \
12779     WMI_GET_BITS(flag, 24, 8)
12780 #define WMI_PDEV_STATS_GAP_PHY_MODE_SET(flag, val) \
12781     WMI_SET_BITS(flag, 0, 16, val)
12782 #define WMI_PDEV_STATS_GAP_PHY_MODE_GET(flag) \
12783     WMI_GET_BITS(flag, 0, 16)
12784 #define WMI_PDEV_STATS_GAP_BAND_CENTER_FREQ1_SET(flag, val) \
12785     WMI_SET_BITS(flag, 16, 16, val)
12786 #define WMI_PDEV_STATS_GAP_BAND_CENTER_FREQ1_GET(flag) \
12787     WMI_GET_BITS(flag, 16, 16)
12788 #define WMI_PDEV_STATS_CONSECUTIVE_FAILURE_SET(flag, val) \
12789     WMI_SET_BITS(flag, 0, 16, val)
12790 #define WMI_PDEV_STATS_CONSECUTIVE_FAILURE_GET(flag) \
12791     WMI_GET_BITS(flag, 0, 16)
12792 #define WMI_PDEV_STATS_NUM_FILS_DISC_ENQD_GET(flag) \
12793     WMI_GET_BITS(flag, 24, 8)
12794 #define WMI_PDEV_STATS_NUM_FILS_DISC_ENQD_SET(flag, val) \
12795     WMI_SET_BITS(flag, 24, 8, val)
12796 #define WMI_PDEV_STATS_RESET_CAUSE_BITMAP_GET(flag) \
12797     WMI_GET_BITS(flag, 16, 8)
12798 #define WMI_PDEV_STATS_RESET_CAUSE_BITMAP_SET(flag, val) \
12799     WMI_SET_BITS(flag, 16, 8, val)
12800 #define WMI_PDEV_STATS_SWBA_NUM_OF_VDEVS_GET(flag) \
12801     WMI_GET_BITS(flag, 24, 8)
12802 #define WMI_PDEV_STATS_SWBA_NUM_OF_VDEVS_SET(flag, val) \
12803     WMI_SET_BITS(flag, 24, 8, val)
12804 #define WMI_PDEV_STATS_HOME_CHAN_MHZ_GET(flag) \
12805     WMI_GET_BITS(flag, 0, 16)
12806 #define WMI_PDEV_STATS_HOME_CHAN_MHZ_SET(flag, val) \
12807     WMI_SET_BITS(flag, 0, 16, val)
12808 #define WMI_PDEV_STATS_HOME_CHAN_FLAGS_GET(flag) \
12809     WMI_GET_BITS(flag, 16, 16)
12810 #define WMI_PDEV_STATS_HOME_CHAN_FLAGS_SET(flag, val) \
12811     WMI_SET_BITS(flag, 16, 16, val)
12812 #define WMI_PDEV_STATS_HOME_CHAN_BAND_FREQ_1_GET(flag) \
12813     WMI_GET_BITS(flag, 0, 16)
12814 #define WMI_PDEV_STATS_HOME_CHAN_BAND_FREQ_1_SET(flag,val) \
12815     WMI_SET_BITS(flag, 0, 16, val)
12816 #define WMI_PDEV_STATS_HOME_CHAN_BAND_FREQ_2_GET(flag) \
12817     WMI_GET_BITS(flag, 16, 16)
12818 #define WMI_PDEV_STATS_HOME_CHAN_BAND_FREQ_2_SET(flag, val) \
12819     WMI_SET_BITS(flag, 16, 16, val)
12820 #define WMI_PDEV_STATS_CUR_CHAN_MHZ_GET(flag) \
12821     WMI_GET_BITS(flag, 0, 16)
12822 #define WMI_PDEV_STATS_CUR_CHAN_MHZ_SET(flag, val) \
12823     WMI_SET_BITS(flag, 0, 16, val)
12824 #define WMI_PDEV_STATS_CUR_CHAN_FLAGS_GET(flag) \
12825     WMI_GET_BITS(flag, 16, 16)
12826 #define WMI_PDEV_STATS_CUR_CHAN_FLAGS_SET(flag, val) \
12827     WMI_SET_BITS(flag, 16, 16, val)
12828 #define WMI_PDEV_STATS_CUR_CHAN_BAND_FREQ_1_GET(flag) \
12829     WMI_GET_BITS(flag, 0, 16)
12830 #define WMI_PDEV_STATS_CUR_CHAN_BAND_FREQ_1_SET(flag,val) \
12831     WMI_SET_BITS(flag, 0, 16, val)
12832 #define WMI_PDEV_STATS_CUR_CHAN_BAND_FREQ_2_GET(flag) \
12833     WMI_GET_BITS(flag, 16, 16)
12834 #define WMI_PDEV_STATS_CUR_CHAN_BAND_FREQ_2_SET(flag, val) \
12835     WMI_SET_BITS(flag, 16, 16, val)
12836 #define WMI_PDEV_STATS_BURST_MODE_GET(flag) \
12837     WMI_GET_BITS(flag, 0, 8)
12838 #define WMI_PDEV_STATS_BURST_MODE_SET(flag, val) \
12839     WMI_SET_BITS(flag, 0, 8, val)
12840 #define WMI_PDEV_STATS_PENDING_ISR_STATUS_GET(flag) \
12841     WMI_GET_BITS(flag, 8, 16)
12842 #define WMI_PDEV_STATS_PENDING_ISR_STATUS_SET(flag, val) \
12843     WMI_SET_BITS(flag, 8, 16, val)
12844 #define WMI_PDEV_STATS_BCN_Q_NUM_GET(flag) \
12845     WMI_GET_BITS(flag, 0, 8)
12846 #define WMI_PDEV_STATS_BCN_Q_NUM_SET(flag, val) \
12847     WMI_SET_BITS(flag, 0, 8, val)
12848 #define WMI_PDEV_STATS_NUM_BCNS_QUEUED_TO_HW_GET(flag) \
12849     WMI_GET_BITS(flag, 8, 8)
12850 #define WMI_PDEV_STATS_NUM_BCNS_QUEUED_TO_HW_SET(flag, val) \
12851     WMI_SET_BITS(flag, 8, 8, val)
12852 #define WMI_PDEV_STATS_SWFDA_VDEV_ID_GET(flag) \
12853     WMI_GET_BITS(flag, 16, 8)
12854 #define WMI_PDEV_STATS_SWFDA_VDEV_ID_SET(flag, val) \
12855     WMI_SET_BITS(flag, 16, 8, val)
12856 
12857 #define WMI_PDEV_STATS_ABORT_RESULT_GET(flag) \
12858     WMI_GET_BITS(flag, 0, 1)
12859 #define WMI_PDEV_STATS_ABORT_RESULT_SET(flag, val) \
12860     WMI_SET_BITS(flag, 0, 1, val)
12861 #define WMI_PDEV_STATS_SCHED_ALGO_RESUME_NEEDED_GET(flag) \
12862     WMI_GET_BITS(flag, 1, 1)
12863 #define WMI_PDEV_STATS_SCHED_ALGO_RESUME_NEEDED_SET(flag, val) \
12864     WMI_SET_BITS(flag, 1, 1, val)
12865 #define WMI_PDEV_STATS_ABORT_REASON_GET(flag) \
12866     WMI_GET_BITS(flag, 2, 3)
12867 #define WMI_PDEV_STATS_ABORT_REASON_SET(flag, val) \
12868     WMI_SET_BITS(flag, 2, 3, val)
12869 #define WMI_PDEV_STATS_IS_TXSUSPENDED_GET(flag) \
12870     WMI_GET_BITS(flag, 5, 1)
12871 #define WMI_PDEV_STATS_IS_TXSUSPENDED_SET(flag, val) \
12872     WMI_SET_BITS(flag, 5, 1, val)
12873 #define WMI_PDEV_STATS_IS_SCHEDSUSPENDED_GET(flag) \
12874     WMI_GET_BITS(flag, 6, 1)
12875 #define WMI_PDEV_STATS_IS_SCHEDSUSPENDED_SET(flag, val) \
12876     WMI_SET_BITS(flag, 6, 1, val)
12877 #define WMI_PDEV_STATS_IS_TXSUSPENDED_WITH_AFC_GET(flag) \
12878     WMI_GET_BITS(flag, 7, 1)
12879 #define WMI_PDEV_STATS_IS_TXSUSPENDED_WITH_AFC_SET(flag, val) \
12880     WMI_SET_BITS(flag, 7, 1, val)
12881 #define WMI_PDEV_STATS_IS_SCHEDSUSPENDED_WITH_AFC_GET(flag) \
12882     WMI_GET_BITS(flag, 8, 1)
12883 #define WMI_PDEV_STATS_IS_SCHEDSUSPENDED_WITH_AFC_SET(flag, val) \
12884     WMI_SET_BITS(flag, 8, 1, val)
12885 #define WMI_PDEV_STATS_SW_RETRY_MPDU_COUNT_TH_GET(flag) \
12886     WMI_GET_BITS(flag, 9, 1)
12887 #define WMI_PDEV_STATS_SW_RETRY_MPDU_COUNT_TH_SET(flag, val) \
12888     WMI_SET_BITS(flag, 9, 1, val)
12889 #define WMI_PDEV_STATS_SENDBAR_COMPL_IN_PROGRESS_GET(flag) \
12890     WMI_GET_BITS(flag, 10, 1)
12891 #define WMI_PDEV_STATS_SENDBAR_COMPL_IN_PROGRESS_SET(flag, val) \
12892     WMI_SET_BITS(flag, 10, 1, val)
12893 #define WMI_PDEV_STATS_CAC_ENABLED_GET(flag) \
12894     WMI_GET_BITS(flag, 11, 1)
12895 #define WMI_PDEV_STATS_CAC_ENABLED_SET(flag, val) \
12896     WMI_SET_BITS(flag, 11, 1, val)
12897 #define WMI_PDEV_STATS_PAUSED_GET(flag) \
12898     WMI_GET_BITS(flag, 12, 1)
12899 #define WMI_PDEV_STATS_PAUSED_SET(flag, val) \
12900     WMI_SET_BITS(flag, 12, 1, val)
12901 #define WMI_PDEV_STATS_SUSPENDED_GET(flag) \
12902     WMI_GET_BITS(flag, 13, 1)
12903 #define WMI_PDEV_STATS_SUSPENDED_SET(flag, val) \
12904     WMI_SET_BITS(flag, 13, 1, val)
12905 #define WMI_PDEV_STATS_MAC_COLD_RESET_GET(flag) \
12906     WMI_GET_BITS(flag, 14, 1)
12907 #define WMI_PDEV_STATS_MAC_COLD_RESET_SET(flag, val) \
12908     WMI_SET_BITS(flag, 14, 1, val)
12909 #define WMI_PDEV_STATS_SAFE_TO_ACCESS_HW_GET(flag) \
12910     WMI_GET_BITS(flag, 15, 1)
12911 #define WMI_PDEV_STATS_SAFE_TO_ACCESS_HW_SET(flag, val) \
12912     WMI_SET_BITS(flag, 15, 1, val)
12913 #define WMI_PDEV_STATS_STA_PS_STATECHG_ENABLE_GET(flag) \
12914     WMI_GET_BITS(flag, 16, 1)
12915 #define WMI_PDEV_STATS_STA_PS_STATECHG_ENABLE_SET(flag, val) \
12916     WMI_SET_BITS(flag, 16, 1, val)
12917 #define WMI_PDEV_STATS_WAL_HOST_SCAN_IN_PROGRESS_GET(flag) \
12918     WMI_GET_BITS(flag, 17, 1)
12919 #define WMI_PDEV_STATS_WAL_HOST_SCAN_IN_PROGRESS_SET(flag, val) \
12920     WMI_SET_BITS(flag, 17, 1, val)
12921 #define WMI_PDEV_STATS_ATF_CONFIG_GET(flag) \
12922     WMI_GET_BITS(flag, 18, 1)
12923 #define WMI_PDEV_STATS_ATF_CONFIG_SET(flag, val) \
12924     WMI_SET_BITS(flag, 18, 1, val)
12925 #define WMI_PDEV_STATS_EAPOL_AC_OVERRIDE_GET(flag) \
12926     WMI_GET_BITS(flag, 19, 1)
12927 #define WMI_PDEV_STATS_EAPOL_AC_OVERRIDE_SET(flag, val) \
12928     WMI_SET_BITS(flag, 19, 1, val)
12929 #define WMI_PDEV_STATS_CALC_NEXT_DTIM_CNT_GET(flag) \
12930     WMI_GET_BITS(flag, 20, 1)
12931 #define WMI_PDEV_STATS_CALC_NEXT_DTIM_CNT_SET(flag, val) \
12932     WMI_SET_BITS(flag, 20, 1, val)
12933 #define WMI_PDEV_STATS_ATF_STRICT_SCH_GET(flag) \
12934     WMI_GET_BITS(flag, 21, 1)
12935 #define WMI_PDEV_STATS_ATF_STRICT_SCH_SET(flag, val) \
12936     WMI_SET_BITS(flag, 21, 1, val)
12937 #define WMI_PDEV_STATS_BCN_TX_MODE_GET(flag) \
12938     WMI_GET_BITS(flag, 22, 2)
12939 #define WMI_PDEV_STATS_BCN_TX_MODE_SET(flag, val) \
12940     WMI_SET_BITS(flag, 22, 2, val)
12941 #define WMI_PDEV_STATS_IS_MONITOR_TYPE_PRESENT_GET(flag) \
12942     WMI_GET_BITS(flag, 24, 1)
12943 #define WMI_PDEV_STATS_IS_MONITOR_TYPE_PRESENT_SET(flag, val) \
12944     WMI_SET_BITS(flag, 24, 1, val)
12945 #define WMI_PDEV_STATS_DYN_BW_GET(flag) \
12946     WMI_GET_BITS(flag, 25, 1)
12947 #define WMI_PDEV_STATS_DYN_BW_SET(flag, val) \
12948     WMI_SET_BITS(flag, 25, 1, val)
12949 #define WMI_PDEV_STATS_IS_MLO_SUPPORTED_GET(flag) \
12950     WMI_GET_BITS(flag, 26, 1)
12951 #define WMI_PDEV_STATS_IS_MLO_SUPPORTED_SET(flag, val) \
12952     WMI_SET_BITS(flag, 26, 1, val)
12953 #define WMI_PDEV_STATS_GAP_TX_CH_MASK_VALID_GET(flag) \
12954     WMI_GET_BITS(flag, 27, 1)
12955 #define WMI_PDEV_STATS_GAP_TX_CH_MASK_VALID_SET(flag, val) \
12956     WMI_SET_BITS(flag, 27, 1, val)
12957 #define WMI_PDEV_STATS_GAP_RX_CH_MASK_VALID_GET(flag) \
12958     WMI_GET_BITS(flag, 28, 1)
12959 #define WMI_PDEV_STATS_GAP_RX_CH_MASK_VALID_SET(flag, val) \
12960     WMI_SET_BITS(flag, 28, 1, val)
12961 #define WMI_PDEV_STATS_GAP_PHY_MODE_VALID_GET(flag) \
12962     WMI_GET_BITS(flag, 29, 1)
12963 #define WMI_PDEV_STATS_GAP_PHY_MODE_VALID_SET(flag, val) \
12964     WMI_SET_BITS(flag, 29, 1, val)
12965 #define WMI_PDEV_STATS_GAP_CLKGATE_VALID_GET(flag) \
12966     WMI_GET_BITS(flag, 30, 1)
12967 #define WMI_PDEV_STATS_GAP_CLKGATE_VALID_SET(flag, val) \
12968     WMI_SET_BITS(flag, 30, 1, val)
12969 #define WMI_PDEV_STATS_BURST_ENABLE_GET(flag) \
12970     WMI_GET_BITS(flag, 31, 1)
12971 #define WMI_PDEV_STATS_BURST_ENABLE_SET(flag, val) \
12972     WMI_SET_BITS(flag, 31, 1, val)
12973 
12974 typedef struct {
12975     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_btcoex_stats_struct*/
12976     A_UINT32 tlv_header;
12977     /** pdev_id for identifying the MAC */
12978     A_UINT32 pdev_id;
12979     /** Counts the number of BT TX requests */
12980     A_UINT32 bt_tx_req_cntr;
12981     /** Counts the number of BT RX requests */
12982     A_UINT32 bt_rx_req_cntr;
12983     /** Counts the number of BT requests that got NACKed */
12984     A_UINT32 bt_req_nack_cntr;
12985     /** Counts the number of WLAN TX request denied due to scheduled BT activity */
12986     A_UINT32 wl_tx_req_nack_schd_bt_reason_cntr;
12987     /** Counts the number of WLAN TX request denied due to current BT activity */
12988     A_UINT32 wl_tx_req_nack_current_bt_reason_cntr;
12989     /** Counts the number of WLAN TX request denied due to other WLAN in TX reason */
12990     A_UINT32 wl_tx_req_nack_other_wlan_tx_reason_cntr;
12991     /** Counts the number of times the WLAN in TX is aborted after getting ACKed */
12992     A_UINT32 wl_in_tx_abort_cntr;
12993     /** Counts the number of Auto Response WLAN TX requests */
12994     A_UINT32 wl_tx_auto_resp_req_cntr;
12995     /** Counts the number of ACKed WLAN TX requests */
12996     A_UINT32 wl_tx_req_ack_cntr;
12997     /** Counts the number of WLAN TX requests */
12998     A_UINT32 wl_tx_req_cntr;
12999 } wmi_ctrl_path_btcoex_stats_struct;
13000 
13001 /* Send diag event based on trigger reasons */
13002 typedef enum {
13003     WMI_DIAG_TRIGGER_MIN = 0x1000,
13004 
13005     WMI_DIAG_TRIGGER_HOST_REQUESTED = WMI_DIAG_TRIGGER_MIN,
13006     WMI_DIAG_TRIGGER_BEACON_MISS,
13007     WMI_DIAG_TRIGGER_SCAN_FAIL,
13008     WMI_DIAG_TRIGGER_DISCONNECT,
13009     WMI_DIAG_TRIGGER_ENTER_BMPS_IMPS_FAIL,
13010     WMI_DIAG_TRIGGER_BUFFER_FULL,
13011     WMI_DIAG_TRIGGER_DATA_STALL,
13012     WMI_DIAG_TRIGGER_TIMER_TRIGGERED,
13013     WMI_DIAG_TRIGGER_REMOTE_COPY,
13014     WMI_DIAG_TRIGGER_CAL_FAILURE,
13015     WMI_DIAG_TRIGGER_FES_BKPRESS_DEV_RESET_IND,
13016 
13017     WMI_DIAG_TRIGGER_MAX,
13018 } wmi_diag_trigger_e;
13019 
13020 typedef enum {
13021     WMI_CTRL_PATH_STATS_ARENA_HRAM,
13022     WMI_CTRL_PATH_STATS_ARENA_HCRAM,
13023     WMI_CTRL_PATH_STATS_ARENA_HREMOTE,
13024     WMI_CTRL_PATH_STATS_ARENA_HCREMOTE,
13025     WMI_CTRL_PATH_STATS_ARENA_REMOTE,
13026     WMI_CTRL_PATH_STATS_ARENA_SRAM,
13027     WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX,
13028     WMI_CTRL_PATH_STATS_ARENA_PAGEABLE,
13029     WMI_CTRL_PATH_STATS_ARENA_CMEM,
13030     WMI_CTRL_PATH_STATS_ARENA_TRAM,
13031     WMI_CTRL_PATH_STATS_ARENA_HWIO,
13032     WMI_CTRL_PATH_STATS_ARENA_CALDB,
13033     WMI_CTRL_PATH_STATS_ARENA_M3,
13034     WMI_CTRL_PATH_STATS_ARENA_ETMREMOTE,
13035     WMI_CTRL_PATH_STATS_ARENA_M3_DUMP,
13036     WMI_CTRL_PATH_STATS_ARENA_EMUPHY,
13037     WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM,
13038     WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM_AUX,
13039     WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX_OVERFLOW,
13040     WMI_CTRL_PATH_STATS_ARENA_AMSS,
13041     WMI_CTRL_PATH_STATS_ARENA_MLO_SHMEM,
13042     WMI_CTRL_PATH_STATS_ARENA_MLO_H_SHMEM,
13043     WMI_CTRL_PATH_STATS_ARENA_MLO_HC_SHMEM,
13044     WMI_CTRL_PATH_STATS_ARENA_RRI_CMD,
13045     WMI_CTRL_PATH_STATS_ARENA_SRAM_CLADE,
13046     WMI_CTRL_PATH_STATS_ARENA_MAX,
13047 } wmi_ctrl_path_fw_arena_ids;
13048 
13049 /*
13050  * Used by some hosts to print names of arenas, based on
13051  * wmi_ctrl_path_fw_arena_ids values specified in
13052  * wmi_ctrl_path_mem_stats_struct in ctrl_path_stats event msg.
13053  */
wmi_ctrl_path_fw_arena_id_to_name(A_UINT32 arena_id)13054 static INLINE A_UINT8 *wmi_ctrl_path_fw_arena_id_to_name(A_UINT32 arena_id)
13055 {
13056     switch(arena_id)
13057     {
13058         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HRAM);
13059         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HCRAM);
13060         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HREMOTE);
13061         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HCREMOTE);
13062         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_REMOTE);
13063         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM);
13064         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX);
13065         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_PAGEABLE);
13066         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_CMEM);
13067         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_TRAM);
13068         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_HWIO);
13069         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_CALDB);
13070         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_M3);
13071         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_ETMREMOTE);
13072         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_M3_DUMP);
13073         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_EMUPHY);
13074         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM);
13075         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_DBG_SRAM_AUX);
13076         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM_AUX_OVERFLOW);
13077         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_AMSS);
13078         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_MLO_SHMEM);
13079         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_MLO_H_SHMEM);
13080         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_MLO_HC_SHMEM);
13081         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_RRI_CMD);
13082         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_ARENA_SRAM_CLADE);
13083     }
13084 
13085     return (A_UINT8 *) "WMI_CTRL_PATH_STATS_ARENA_UNKNOWN";
13086 }
13087 
13088 typedef struct {
13089     /** TLV tag and len; tag equals
13090      *  WMITLV_TAG_STRUC_wmi_ctrl_path_mem_stats_struct */
13091     A_UINT32 tlv_header;
13092     A_UINT32 arena_id;          /* see wmi_ctrl_path_fw_arena_ids */
13093     A_UINT32 total_bytes;       /* total bytes in each arena */
13094     A_UINT32 allocated_bytes;   /* allocated bytes in each arena */
13095 } wmi_ctrl_path_mem_stats_struct;
13096 
13097 /* status code of Get stats TWT dialog */
13098 typedef enum _WMI_GET_STATS_TWT_STATUS_T {
13099     WMI_GET_STATS_TWT_STATUS_OK,                 /* Get status TWT dialog successfully completed */
13100     WMI_GET_STATS_TWT_STATUS_DIALOG_ID_NOT_EXIST,/* TWT dialog ID does not exist */
13101     WMI_GET_STATS_TWT_STATUS_INVALID_PARAM,      /* invalid parameters */
13102 } WMI_GET_STATS_TWT_STATUS_T;
13103 
13104 /* Resp type of ODD command operation */
13105 typedef enum _WMI_ODD_ADDR_READ_OPTION_TYPE_T {
13106     WMI_ODD_ADDR_READ_OPTION_TYPE_ADD_ADDR_COMMAND,  /* Resp for the command to add/configure address space */
13107     WMI_ODD_ADDR_READ_OPTION_TYPE_DEL_ADDR_COMMAND,  /* Resp for the command to del/reset address space */
13108     WMI_ODD_ADDR_READ_OPTION_TYPE_DISP_ADDR_COMMAND, /* Resp for the command to display address space */
13109     WMI_ODD_ADDR_READ_OPTION_TYPE_DISP_VAL_COMMAND,  /* Resp for the command to display value at address space */
13110 } WMI_ODD_ADDR_READ_OPTION_TYPE_T;
13111 
13112 typedef struct {
13113     /** TLV tag and len; tag equals
13114      *  WMITLV_TAG_STRUC_wmi_ctrl_path_twt_stats_struct */
13115     A_UINT32 tlv_header;
13116     A_UINT32 dialog_id;         /* TWT dialog ID */
13117     A_UINT32 status;            /* refer to WMI_GET_STATS_TWT_STATUS_T */
13118     A_UINT32 num_sp_cycles;     /* Number of TWT SP's*/
13119     A_UINT32 avg_sp_dur_us;     /* Average SP time */
13120     A_UINT32 min_sp_dur_us;     /* Minimum SP time */
13121     A_UINT32 max_sp_dur_us;     /* Maximum SP time */
13122     A_UINT32 tx_mpdu_per_sp;    /* Average pkts tx per SP */
13123     A_UINT32 rx_mpdu_per_sp;    /* Average pkts rx per SP */
13124     A_UINT32 tx_bytes_per_sp;   /* Average tx bytes per SP */
13125     A_UINT32 rx_bytes_per_sp;   /* Average rx bytes per SP */
13126 } wmi_ctrl_path_twt_stats_struct;
13127 
13128 #define BMISS_STATS_RSSI_SAMPLE_MAX 10
13129 typedef struct {
13130     A_INT32  rssi;        /* dBm units */
13131     A_UINT32 sample_time; /* timestamp from host/target shared qtimer */
13132 } bmiss_stats_rssi_samples_t;
13133 
13134 typedef struct {
13135     A_UINT32 num_of_bmiss_sequences; /* number of consecutive bmiss > 2 */
13136     A_UINT32 num_bitmask_wraparound; /* number of times bitmask wrapped around */
13137     A_UINT32 num_bcn_hist_lost;      /* number of beacons history we have lost */
13138 } consecutive_bmiss_stats_t;
13139 
13140 typedef struct {
13141     /** TLV tag and len; tag equals
13142      *  WMITLV_TAG_STRUC_wmi_ctrl_path_bmiss_stats_struct */
13143     A_UINT32 tlv_header;
13144     A_UINT32 num_pre_bmiss;                     /* number of pre_bmiss */
13145     bmiss_stats_rssi_samples_t  rssi_samples[BMISS_STATS_RSSI_SAMPLE_MAX];  /* RSSI samples at pre bmiss*/
13146     /* rssi_sample_curr_index:
13147      * index of the element in rssi_samples array containing the oldest sample
13148      */
13149     A_UINT32 rssi_sample_curr_index;
13150     A_UINT32 num_first_bmiss;                   /* number of first bmiss */
13151     A_UINT32 num_final_bmiss;                   /* number of final bmiss */
13152     A_UINT32 num_null_sent_in_first_bmiss;      /* number of null frames sent in first bmiss */
13153     A_UINT32 num_null_failed_in_first_bmiss;    /* number of failed null frames in first bmiss */
13154     A_UINT32 num_null_sent_in_final_bmiss;      /* number of null frames sent in final bmiss */
13155     A_UINT32 num_null_failed_in_final_bmiss;    /* number of failed null frames in final bmiss */
13156     consecutive_bmiss_stats_t cons_bmiss_stats;
13157 } wmi_ctrl_path_bmiss_stats_struct;
13158 
13159 typedef enum {
13160     WMI_CTRL_PATH_STATS_CAL_PROFILE_COLD_BOOT_CAL       = 0x0,
13161     WMI_CTRL_PATH_STATS_CAL_PROFILE_FULL_CHAN_SWITCH    = 0x1,
13162     WMI_CTRL_PATH_STATS_CAL_PROFILE_SCAN_CHAN_SWITCH    = 0x2,
13163     WMI_CTRL_PATH_STATS_CAL_PROFILE_DPD_SPLIT_CAL       = 0x3,
13164     WMI_CTRL_PATH_STATS_CAL_PROFILE_TEMP_TRIGEER_CAL    = 0x4,
13165     WMI_CTRL_PATH_STATS_CAL_PROFILE_POWER_SAVE_WAKE_UP  = 0x5,
13166     WMI_CTRL_PATH_STATS_CAL_PROFILE_TIMER_TRIGGER_CAL   = 0x6,
13167     WMI_CTRL_PATH_STATS_CAL_PROFILE_FTM_TRIGGER_CAL     = 0x7,
13168     WMI_CTRL_PATH_STATS_CAL_PROFILE_AGILE_OR_POWER_DOWN_DTIM = 0x8,
13169     WMI_CTRL_PATH_STATS_CAL_PROFILE_NOISY_ENV_RXDO      = 0x9,
13170 
13171     /* add new cal profiles above this line */
13172     WMI_CTRL_PATH_STATS_CAL_PROFILE_INVALID             = 0x1F
13173 } wmi_ctrl_path_stats_cal_profile_ids;
13174 
13175 typedef enum {
13176     WMI_CTRL_PATH_STATS_CAL_TYPE_ADC                     = 0x0,
13177     WMI_CTRL_PATH_STATS_CAL_TYPE_DAC                     = 0x1,
13178     WMI_CTRL_PATH_STATS_CAL_TYPE_PROCESS                 = 0x2,
13179     WMI_CTRL_PATH_STATS_CAL_TYPE_NOISE_FLOOR             = 0x3,
13180     WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO                   = 0x4,
13181     WMI_CTRL_PATH_STATS_CAL_TYPE_COMB_TXLO_TXIQ_RXIQ     = 0x5,
13182     WMI_CTRL_PATH_STATS_CAL_TYPE_TXLO                    = 0x6,
13183     WMI_CTRL_PATH_STATS_CAL_TYPE_TXIQ                    = 0x7,
13184     WMI_CTRL_PATH_STATS_CAL_TYPE_RXIQ                    = 0x8,
13185     WMI_CTRL_PATH_STATS_CAL_TYPE_IM2                     = 0x9,
13186     WMI_CTRL_PATH_STATS_CAL_TYPE_LNA                     = 0xa,
13187     WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXDCO            = 0xb,
13188     WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXIQ             = 0xc,
13189     WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORYLESS          = 0xd,
13190     WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORY              = 0xe,
13191     WMI_CTRL_PATH_STATS_CAL_TYPE_IBF                     = 0xf,
13192     WMI_CTRL_PATH_STATS_CAL_TYPE_PDET_AND_PAL            = 0x10,
13193     WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_IQ                = 0x11,
13194     WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_DTIM              = 0x12,
13195     WMI_CTRL_PATH_STATS_CAL_TYPE_TPC_CAL                 = 0x13,
13196     WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_TIMEREQ             = 0x14,
13197     WMI_CTRL_PATH_STATS_CAL_TYPE_BWFILTER                = 0x15,
13198     WMI_CTRL_PATH_STATS_CAL_TYPE_PEF                     = 0x16,
13199     WMI_CTRL_PATH_STATS_CAL_TYPE_PADROOP                 = 0x17,
13200     WMI_CTRL_PATH_STATS_CAL_TYPE_SELFCALTPC              = 0x18,
13201     WMI_CTRL_PATH_STATS_CAL_TYPE_RXSPUR                  = 0x19,
13202 
13203     /* add new cal types above this line */
13204     WMI_CTRL_PATH_STATS_CAL_TYPE_INVALID                 = 0xFF
13205 } wmi_ctrl_path_stats_cal_type_ids;
13206 
13207 typedef enum {
13208     WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_NOISE_FLOOR    = 0x0,
13209     WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORYLESS = 0x1,
13210     WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORY     = 0x2,
13211 
13212     /* add new periodic cal types above this line */
13213     WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_INVALID        = 0xFF
13214 } wmi_ctrl_path_stats_periodic_cal_type_ids;
13215 
13216 typedef enum {
13217     WMI_CAL_FAILURE_REASON_ERROR_MIN = 0x0,
13218     /* DPD failure reasons */
13219     WMI_CAL_FAILURE_REASON_DPD_NMSE_FAIL = 0x1,
13220     WMI_CAL_FAILURE_REASON_DPD_SQ_FAIL = 0x2,
13221     WMI_CAL_FAILURE_REASON_DPD_HW_FAIL = 0x3,
13222     WMI_CAL_FAILURE_REASON_DPD_EXCESSIVE_RETRY = 0x4,
13223     /* RXDCO failure reasons */
13224     WMI_CAL_FAILURE_REASON_RXDCO_HW_CAL_EXCESSIVE_RETRY = 0x5,
13225     WMI_CAL_FAILURE_REASON_RXDCO_INVALID_HW_CAL = 0x6,
13226     WMI_CAL_FAILURE_REASON_RXDCO_HW_AND_SWPP_FAILURE = 0x7,
13227     /* ADC failure reasons */
13228     WMI_CAL_FAILURE_REASON_TIADC_INVALID_BAND = 0x8,
13229     /* BWFILTER failure reasons */
13230     WMI_CAL_FAILURE_REASON_TXBBF = 0x9,
13231     WMI_CAL_FAILURE_REASON_RXBBF = 0xa,
13232     /* PKDET failure reasons */
13233     WMI_CAL_FAILURE_REASON_PKDET = 0xb,
13234     /* COMBCAL failure reasons */
13235     WMI_CAL_FAILURE_REASON_COMB = 0xc,
13236 
13237     /* add new cal failure error reasons above this line */
13238     WMI_CAL_FAILURE_REASON_ERROR_MAX = 0xff,
13239 } wmi_cal_failure_reason_code;
13240 
13241 /*
13242  * Used by some hosts to print names of cal profile, based on
13243  * wmi_ctrl_path_cal_profile_ids values specified in
13244  * wmi_ctrl_path_calibration_stats_struct in ctrl_path_stats event msg.
13245  */
13246 static INLINE
wmi_ctrl_path_cal_profile_id_to_name(A_UINT32 cal_profile_id)13247 A_UINT8 *wmi_ctrl_path_cal_profile_id_to_name(A_UINT32 cal_profile_id)
13248 {
13249     switch (cal_profile_id)
13250     {
13251         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_COLD_BOOT_CAL);
13252         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_FULL_CHAN_SWITCH);
13253         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_SCAN_CHAN_SWITCH);
13254         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_DPD_SPLIT_CAL);
13255         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_TEMP_TRIGEER_CAL);
13256         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_POWER_SAVE_WAKE_UP);
13257         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_TIMER_TRIGGER_CAL);
13258         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_FTM_TRIGGER_CAL);
13259         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_AGILE_OR_POWER_DOWN_DTIM);
13260         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_PROFILE_NOISY_ENV_RXDO);
13261     }
13262 
13263     return (A_UINT8 *) "WMI_CTRL_PATH_STATS_CAL_PROFILE_UNKNOWN";
13264 }
13265 
13266 /*
13267  * Used by some hosts to print names of cal type, based on
13268  * wmi_ctrl_path_cal_type_ids values specified in
13269  * wmi_ctrl_path_calibration_stats_struct in ctrl_path_stats event msg.
13270  */
wmi_ctrl_path_cal_type_id_to_name(A_UINT32 cal_type_id)13271 static INLINE A_UINT8 *wmi_ctrl_path_cal_type_id_to_name(A_UINT32 cal_type_id)
13272 {
13273     switch (cal_type_id)
13274     {
13275         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_ADC);
13276         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DAC);
13277         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PROCESS);
13278         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_NOISE_FLOOR);
13279         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO);
13280         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_COMB_TXLO_TXIQ_RXIQ);
13281         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_TXLO);
13282         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_TXIQ);
13283         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXIQ);
13284         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_IM2);
13285         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_LNA);
13286         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXDCO);
13287         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_LP_RXIQ);
13288         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORYLESS);
13289         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_MEMORY);
13290         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_IBF);
13291         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PDET_AND_PAL);
13292         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_IQ);
13293         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXDCO_DTIM);
13294         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_TPC_CAL);
13295         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_DPD_TIMEREQ);
13296         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_BWFILTER);
13297         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PEF);
13298         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_PADROOP);
13299         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_SELFCALTPC);
13300         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_CAL_TYPE_RXSPUR);
13301     }
13302 
13303     return (A_UINT8 *) "WMI_CTRL_PATH_STATS_CAL_TYPE_UNKNOWN";
13304 }
13305 
13306 /*
13307  * Used by some hosts to print names of peridodic cal type, based on
13308  * wmi_ctrl_path_periodic_cal_type_ids values specified in
13309  * wmi_ctrl_path_calibration_stats_struct in ctrl_path_stats event msg.
13310  */
wmi_ctrl_path_periodic_cal_type_id_to_name(A_UINT32 periodic_cal_type_id)13311 static INLINE A_UINT8 *wmi_ctrl_path_periodic_cal_type_id_to_name(A_UINT32 periodic_cal_type_id)
13312 {
13313     switch (periodic_cal_type_id)
13314     {
13315         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_NOISE_FLOOR);
13316         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORYLESS);
13317         WMI_RETURN_STRING(WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_DPD_MEMORY);
13318     }
13319 
13320     return (A_UINT8 *) "WMI_CTRL_PATH_STATS_PERIODIC_CAL_TYPE_UNKNOWN";
13321 }
13322 
13323 /*
13324  * Used by some hosts to print names of cal failure reason code, based on
13325  * wmi_ctrl_path_cal_failure_reason_codes values specified in cal fail event msg
13326  */
wmi_cal_failure_reason_code_to_name(A_UINT32 cal_failure_reason_code)13327 static INLINE A_UINT8 *wmi_cal_failure_reason_code_to_name(A_UINT32 cal_failure_reason_code)
13328 {
13329     switch (cal_failure_reason_code)
13330     {
13331         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_ERROR_MIN);
13332         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_NMSE_FAIL);
13333         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_SQ_FAIL);
13334         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_HW_FAIL);
13335         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_DPD_EXCESSIVE_RETRY);
13336         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXDCO_HW_CAL_EXCESSIVE_RETRY);
13337         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXDCO_INVALID_HW_CAL);
13338         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXDCO_HW_AND_SWPP_FAILURE);
13339         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_TIADC_INVALID_BAND);
13340         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_TXBBF);
13341         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_RXBBF);
13342         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_PKDET);
13343         WMI_RETURN_STRING(WMI_CAL_FAILURE_REASON_COMB);
13344     }
13345 
13346     return (A_UINT8 *) "WMI_CAL_FAILURE_REASON_UNKNOWN";
13347 }
13348 
13349 typedef struct {
13350     /** TLV tag and len; tag equals
13351      *  WMITLV_TAG_STRUC_wmi_ctrl_path_calibration_stats_struct*/
13352     A_UINT32 tlv_header;
13353     /** pdev_id for identifying the MAC/PHY */
13354     A_UINT32 pdev_id;
13355     /** Bit 0 - 7  : cal type / periodic cal type
13356       *              These bits hold either a wmi_ctrl_path_stats_cal_type_ids
13357       *              value for generic cal (if bit 13 is cleared) or a
13358       *              wmi_ctrl_path_stats_periodic_cal_type_ids value for
13359       *              periodic cal (if bit 13 is set).
13360       *              Signifies the type of calibration
13361       *              cal_type       : 8
13362       * Bit 8 - 12 : These bits hold a wmi_ctrl_path_stats_cal_profile_ids value.
13363       *              Signifies the type of cal profile
13364       *              cal_profile     : 5
13365       * Bit 13     : Signifies whether stats is for generic cal or periodic cal
13366       *              is_cal_periodic : 1
13367       *              0 -> generic cal
13368       *              1 -> periodic cal
13369       * Bit 14 - 31: Reserved for future
13370       */
13371     A_UINT32 cal_info;
13372     A_UINT32 cal_triggered_cnt;   /* Count of number of times calibration triggered */
13373     A_UINT32 cal_fail_cnt;        /* Count of number of times calibration failed */
13374     A_UINT32 cal_fcs_cnt;         /* Count of number of times FCS done for cal */
13375     A_UINT32 cal_fcs_fail_cnt;    /* Count of number of times FCS failed for cal */
13376 } wmi_ctrl_path_calibration_stats_struct;
13377 
13378 #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_TYPE_GET(cal_info)             WMI_GET_BITS(cal_info, 0, 8)
13379 #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_TYPE_SET(cal_info, cal_type)   WMI_SET_BITS(cal_info, 0, 8, cal_type)
13380 
13381 #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_PROFILE_GET(cal_info)              WMI_GET_BITS(cal_info, 8, 5)
13382 #define WMI_CTRL_PATH_CALIBRATION_STATS_CAL_PROFILE_SET(cal_info, cal_profile) WMI_SET_BITS(cal_info, 8, 5, cal_profile)
13383 
13384 #define WMI_CTRL_PATH_CALIBRATION_STATS_IS_PERIODIC_CAL_GET(cal_info)              WMI_GET_BITS(cal_info, 13, 1)
13385 #define WMI_CTRL_PATH_CALIBRATION_STATS_IS_PERIODIC_CAL_SET(cal_info, is_periodic) WMI_SET_BITS(cal_info, 13, 1, is_periodic)
13386 
13387 /* 0=20MHz, 1=40MHz, 2=80MHz, 3=160MHz, 4=240MHz, 5=320MHz */
13388 #define WMI_AWGN_MAX_BW 6
13389 
13390 typedef struct {
13391     /* TLV tag and len; tag equals
13392      * WMITLV_TAG_STRUC_wmi_ctrl_path_awgn_stats_struct
13393      * For 6G FCC test we have to monitor channel interference and switch
13394      * to non-interference channel.
13395      * Additive White Gaussian Noise (AWGN) interference detection logic
13396      * is used to detect interference based upon CCA / BW drop / packet drop.
13397      * Once AWGN interference is detected, the target sends
13398      * WMI_DCS_INTERFERENCE_EVENTID to host for channel change/BW change.
13399      * This stats struct is used to get info about how many times these
13400      * CCA_Interference/BW_Drop/Pkt_Drop indicators of AWGN occur.
13401      */
13402     A_UINT32 tlv_header;
13403     /*
13404      * AWGN WMI event sent count
13405      * This is used to inform how many WMI_DCS_INTERFERENCE_EVENTID have been
13406      * sent to the host.
13407      * WMI_DCS_INTERFERENCE_EVENTID is sent whenever one or more of
13408      * CCA_Int/BW_Drop/Channel_Change(Pkt_Drop) happen.
13409      */
13410     A_UINT32 awgn_send_evt_cnt;
13411     /* AWGN primary int count */
13412     A_UINT32 awgn_pri_int_cnt;
13413     /* AWGN secondary int count */
13414     A_UINT32 awgn_sec_int_cnt;
13415     /*
13416      * AWGN pkt drop trigger count
13417      * This shows how many times the presence of interference on the
13418      * primary BW has been inferred due to pkt drops.
13419      * WMI_DCS_INTERFERENCE_EVENTID will be sent whenever there is
13420      * interference on Primary Channel.
13421      */
13422     A_UINT32 awgn_pkt_drop_trigger_cnt;
13423     /* awgn pkt drop trigger reset count */
13424     A_UINT32 awgn_pkt_drop_trigger_reset_cnt;
13425     /*
13426      * AWGN bandwidth drop count
13427      * This is used to inform count for any frame transmitted on lower BW
13428      * than configured BW.
13429      * WMI_DCS_INTERFERENCE_EVENTID will be sent whenever there is BW drop.
13430      */
13431     A_UINT32 awgn_bw_drop_cnt;
13432     /* AWGN bandwidth drop reset count */
13433     A_UINT32 awgn_bw_drop_reset_cnt;
13434     /*
13435      * AWGN CCA int count
13436      * This is used to inform the interference based on CCA registers.
13437      * WMI_DCS_INTERFERENCE_EVENTID will be sent whenever there is CCA
13438      * interference.
13439      */
13440     A_UINT32 awgn_cca_int_cnt;
13441     /* AWGN cca int reset count */
13442     A_UINT32 awgn_cca_int_reset_cnt;
13443     /* AWGN cca ack blk count */
13444     A_UINT32 awgn_cca_ack_blk_cnt;
13445     /* AWGN cca ack blk reset count */
13446     A_UINT32 awgn_cca_ack_reset_cnt;
13447     /*
13448      * AWGN int BW cnt used to store interference occurred at 20/40/80/160MHz
13449      * awgn_int_bw_cnt[0] counts interference detections in 20 MHz BW,
13450      * awgn_int_bw_cnt[1] counts interference detections in 40 MHz BW,
13451      * awgn_int_bw_cnt[2] counts interference detections in 80 MHz BW,
13452      * awgn_int_bw_cnt[3] counts interference detections in 160 MHz BW,
13453      * awgn_int_bw_cnt[4] is reserved for 240 MHz BW,
13454      * awgn_int_bw_cnt[5] counts interference detections in 320 MHz BW.
13455      */
13456     A_UINT32 awgn_int_bw_cnt[WMI_AWGN_MAX_BW];
13457 
13458     /* Number of OBSS interference occurred */
13459     A_UINT32 obss_int_cnt;
13460 
13461     /* Number of OBSS interference Sent to host */
13462     A_UINT32 obss_int_evt_sent_host_cnt;
13463 
13464     /* Number of OBSS interference skiped due to AWGN as high priority */
13465     A_UINT32 obss_int_evt_skip_awgn_cnt;
13466 
13467     /* Number of OBSS interference skiped due to duplicate OBSS interference */
13468     A_UINT32 obss_int_evt_skip_dup_cnt;
13469 
13470     /* Current OBSS interference segment details
13471      * chan_bw_interference_bitmap:
13472      * Indicates which 20MHz segments contain interference
13473      *  320 MHz: bits 0-15
13474      *  160 MHz: bits 0-7
13475      *   80 MHz: bits 0-3
13476      * Within the bitmap, Bit-0 represents lowest 20Mhz, Bit-1 represents
13477      * second lowest 20Mhz and so on.
13478      * Each bit position will indicate 20MHz in which interference is seen.
13479      * (Valid 16 bits out of 32 bit integer)
13480      */
13481     A_UINT32 obss_int_cur_int_seg;
13482 
13483     /* Previous OBSS Int Segment details
13484      * chan_bw_interference_bitmap:
13485      * Indicates which 20MHz segments contain interference
13486      *  320 MHz: bits 0-15
13487      *  160 MHz: bits 0-7
13488      *   80 MHz: bits 0-3
13489      * Within the bitmap, Bit-0 represents lowest 20Mhz, Bit-1 represents
13490      * second lowest 20Mhz and so on.
13491      * Each bit position will indicate 20MHz in which interference is seen.
13492      * (Valid 16 bits out of 32 bit integer)
13493      */
13494     A_UINT32 obss_int_prv_int_seg;
13495 
13496     /*
13497      * OBSS int BW cnt used to store interference occurred at 20/40/80/160MHz
13498      * obss_int_bw_cnt[0] counts interference detections in 20 MHz BW,
13499      * obss_int_bw_cnt[1] counts interference detections in 40 MHz BW,
13500      * obss_int_bw_cnt[2] counts interference detections in 80 MHz BW,
13501      * obss_int_bw_cnt[3] counts interference detections in 160 MHz BW,
13502      * obss_int_bw_cnt[4] counts interference detections in 240 MHz BW,
13503      * obss_int_bw_cnt[5] counts interference detections in 320 MHz BW,
13504      */
13505     A_UINT32 obss_int_bw_cnt[WMI_AWGN_MAX_BW];
13506 } wmi_ctrl_path_awgn_stats_struct;
13507 
13508 typedef struct {
13509     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_dfs_channel_stats_struct*/
13510     A_UINT32 tlv_header;
13511     /** pdev_id for identifying the PHY */
13512     A_UINT32 pdev_id;
13513     /** nol element num */
13514     A_UINT32 nol;
13515     /** Channel in MHz */
13516     A_UINT32 channel;
13517 
13518     /** Channel width in MHz */
13519     A_UINT32 chwidth;
13520 
13521     /** Time left for the channel to remain in NOL list (in seconds) */
13522     A_UINT32 timeleft;
13523 } wmi_ctrl_path_dfs_channel_stats_struct;
13524 
13525 typedef struct {
13526     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_odd_addr_read_struct*/
13527     A_UINT32 tlv_header;
13528     /* resp_type:
13529      * Response type for each sub option:
13530      * Add address space, display address, display data, delete address space.
13531      * Refer to WMI_ODD_ADDR_READ_OPTION_TYPE_T.
13532      */
13533     A_UINT32 resp_type;
13534     /* User configured Entry id */
13535     A_UINT32 entry_id;
13536     /* address:
13537      * User configured Address Space.
13538      * Any unused elements will be filled with 0x0.
13539      */
13540     A_UINT32 address[WMI_MAX_ADDRESS_SPACE];
13541     /* data
13542      * Data/Value at the User configured Address Space.
13543      * Any unused elements will be filled with 0x0.
13544      */
13545     A_UINT32 data[WMI_MAX_ADDRESS_SPACE];
13546     /* Status of the operation performed: 0 = failure, 1 = success */
13547     A_UINT32 is_success;
13548 } wmi_ctrl_path_odd_addr_read_struct;
13549 
13550 /*
13551  * The wmi_ctrl_path_afc_stats_struct is used to send AFC stats within
13552  * the WMI_CTRL_PATH_STATS_EVENT message, in response to a
13553  * WMI_REQUEST_CTRL_PATH_STATS_CMD message for the stat type
13554  * WMI_REQUEST_CTRL_PATH_AFC_STAT.
13555  */
13556 typedef struct {
13557     /* TLV tag and len; tag equals
13558      *  WMITLV_TAG_STRUC_wmi_ctrl_path_afc_stats_struct */
13559     A_UINT32 tlv_header;
13560 
13561     A_UINT32 pdev_id;               /* pdev_id for identifying the MAC/PHY */
13562 
13563     /* Count of new request ID every time it is generated */
13564     A_UINT32 request_id_count;
13565     /* Count of total number of AFC payload received */
13566     A_UINT32 response_count;
13567     /* Count of total number of invalid AFC response */
13568     A_UINT32 invalid_response_count;
13569     /* Count of total number of AFC resets received  */
13570     A_UINT32 reset_count;
13571 
13572     /* AFC Response error counters*/
13573 
13574     /*
13575      * Count of total number of incorrect payload received due to
13576      * request ID and response
13577      * Increments when request ID doesn't match with response.
13578      */
13579     A_UINT32 id_mismatch_count;
13580 
13581     /*
13582      * Count of total number of "local_error_code" success event
13583      * received as part of the AFC response payload in the below struct
13584      * "afc_spectrum_inquiry_resp_bin_type"
13585      */
13586     A_UINT32 local_err_code_success;
13587 
13588     /*
13589      * Count of total number of "local_error_code" failure event
13590      * received as part of the AFC response payload in the below struct
13591      * "afc_spectrum_inquiry_resp_bin_type"
13592      */
13593     A_UINT32 local_err_code_failure;
13594 
13595     /*
13596      * The below fields are used to denote the count of
13597      * different server response code received in "afc_serv_resp_code"
13598      * received as part of "afc_spectrum_inquiry_resp_bin_type"
13599      * These resp codes are as per the WFA spec
13600      */
13601     /* afc_serv_resp_code = version not supported */
13602     A_UINT32 serv_resp_code_100;
13603     /* afc_serv_resp_code = Device disallowed */
13604     A_UINT32 serv_resp_code_101;
13605     /* afc_serv_resp_code = Missing param */
13606     A_UINT32 serv_resp_code_102;
13607     /* afc_serv_resp_code = invalid value */
13608     A_UINT32 serv_resp_code_103;
13609     /* afc_serv_resp_code = unexpected param */
13610     A_UINT32 serv_resp_code_106;
13611     /* afc_serv_resp_code = unsupported spectrum */
13612     A_UINT32 serv_resp_code_300;
13613 
13614     /*
13615      * AFC Compliance tracker
13616      */
13617     /* proxy_standalone_0
13618      * This field displays the value of Request ID check disable received
13619      * as part of the INI knob
13620      */
13621     A_UINT32 proxy_standalone_0;
13622     /* proxy_standalone_1
13623      * This field displays the value of Timer check disable received
13624      * as part of the INI knob
13625      */
13626     A_UINT32 proxy_standalone_1;
13627 
13628     /* Count of successful power events sent to host */
13629     A_UINT32 power_event_counter;
13630     /* Count of total force LPI power mode switch when grace count expires */
13631     A_UINT32 force_LPI_counter;
13632 
13633     /*
13634      * Count of total number of successful host set
13635      * TPC command received within the compliance timer
13636      */
13637     A_UINT32 tpc_wmi_success_count;
13638 
13639     /*
13640      * Count of total number of failed host set
13641      * TPC command. This is incremented when compliance timer expires
13642      */
13643     A_UINT32 tpc_wmi_failure_count;
13644 
13645     /*
13646      * These counters are incremented as part of the
13647      * Regulatory Compliance check done on the AFC payload
13648      * received from server
13649      */
13650     /* Incorrect PSD value received in freq Obj */
13651     A_UINT32 psd_failure_count;
13652     /* Incorrect End freq received in freq Obj */
13653     A_UINT32 psd_end_freq_failure_count;
13654     /* Incorrect Start freq received in freq Obj */
13655     A_UINT32 psd_start_freq_failure_count;
13656     /* Incorrect EIRP received in channel obj */
13657     A_UINT32 eirp_failure_count;
13658     /* Incorrect centre freq channel received in channel obj */
13659     A_UINT32 cfreq_failure_count;
13660 
13661     /*
13662      * AFC Current status
13663      */
13664     /* Current Request ID */
13665     A_UINT32 request_id;
13666     /* grace_timer_count
13667      * This grace counter increments only after TTL expiry.
13668      * Cleared to zero once valid payload is received.
13669      */
13670     A_UINT32 grace_timer_count;
13671     /* Current TTL Time in seconds from last valid payload response */
13672     A_UINT32 cur_ttl_timer;
13673     /* deployment_mode
13674      * 6G AP deployment mode denoting indoor or outdoor
13675      * Indoor = 1, Outdoor = 2
13676      */
13677     A_UINT32 deployment_mode;
13678     /*
13679      * Proxy mode AFC-Response payload clear count
13680      */
13681     A_UINT32 payload_clear_count;
13682 } wmi_ctrl_path_afc_stats_struct;
13683 
13684 /* AT - Airtime */
13685 /* AA - Available Airtime */
13686 #define WMI_PMLO_UL_DL_INBSS_AT_GET_BE(airtime)         WMI_GET_BITS(airtime, 0, 8)
13687 #define WMI_PMLO_UL_DL_INBSS_AT_SET_BE(airtime, value)  WMI_SET_BITS(airtime, 0, 8, value)
13688 
13689 #define WMI_PMLO_UL_DL_INBSS_AT_GET_BK(airtime)         WMI_GET_BITS(airtime, 8, 8)
13690 #define WMI_PMLO_UL_DL_INBSS_AT_SET_BK(airtime, value)  WMI_SET_BITS(airtime, 8, 8, value)
13691 
13692 #define WMI_PMLO_UL_DL_INBSS_AT_GET_VI(airtime)         WMI_GET_BITS(airtime, 16, 8)
13693 #define WMI_PMLO_UL_DL_INBSS_AT_SET_VI(airtime, value)  WMI_SET_BITS(airtime, 16, 8, value)
13694 
13695 #define WMI_PMLO_UL_DL_INBSS_AT_GET_VO(airtime)         WMI_GET_BITS(airtime, 24, 8)
13696 #define WMI_PMLO_UL_DL_INBSS_AT_SET_VO(airtime, value)  WMI_SET_BITS(airtime, 24, 8, value)
13697 
13698 #define WMI_PMLO_LINK_OBSS_AT_GET(airtime)              WMI_GET_BITS(airtime, 0, 8)
13699 #define WMI_PMLO_LINK_OBSS_AT_SET(airtime, value)       WMI_SET_BITS(airtime, 0, 8, value)
13700 
13701 #define WMI_PMLO_LINK_AA_GET(airtime)                   WMI_GET_BITS(airtime, 8, 8)
13702 #define WMI_PMLO_LINK_AA_SET(airtime, value)            WMI_SET_BITS(airtime, 8, 8, value)
13703 
13704 #define WMI_PMLO_UL_AIRTIME_NON_AC_GET(airtime)         WMI_GET_BITS(airtime, 16, 8)
13705 #define WMI_PMLO_UL_AIRTIME_NON_AC_SET(airtime, value)  WMI_SET_BITS(airtime, 16, 8, value)
13706 
13707 #define WMI_PMLO_DL_AIRTIME_NON_AC_GET(airtime)         WMI_GET_BITS(airtime, 24, 8)
13708 #define WMI_PMLO_DL_AIRTIME_NON_AC_SET(airtime, value)  WMI_SET_BITS(airtime, 24, 8, value)
13709 
13710 #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_GET_BE(airtime)         WMI_GET_BITS(airtime, 0, 8)
13711 #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_SET_BE(airtime, value)  WMI_SET_BITS(airtime, 0, 8, value)
13712 
13713 #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_GET_BK(airtime)         WMI_GET_BITS(airtime, 8, 8)
13714 #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_SET_BK(airtime, value)  WMI_SET_BITS(airtime, 8, 8, value)
13715 
13716 #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_GET_VI(airtime)         WMI_GET_BITS(airtime, 16, 8)
13717 #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_SET_VI(airtime, value)  WMI_SET_BITS(airtime, 16, 8, value)
13718 
13719 #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_GET_VO(airtime)         WMI_GET_BITS(airtime, 24, 8)
13720 #define WMI_PMLO_UL_DL_PAYLOAD_RATIO_SET_VO(airtime, value)  WMI_SET_BITS(airtime, 24, 8, value)
13721 
13722 /** Traffic condition used in estimating the available airtime value */
13723 typedef enum {
13724     WMI_PDEV_TRAFFIC_LIGHT           = 0,
13725     WMI_PDEV_TRAFFIC_MEDIUM          = 1,
13726     WMI_PDEV_TRAFFIC_HEAVY           = 2,
13727     WMI_PDEV_TRAFFIC_SATURATION      = 3,
13728     WMI_PDEV_TRAFFIC_MEDIUM_AND_OBSS = 4,
13729 } wmi_pdev_traffic_condition;
13730 
13731 /*
13732  * The wmi_ctrl_path_pmlo_stats_struct is used to send Provisional MLO stats
13733  * the WMI_CTRL_PATH_STATS_EVENT message, in response to a
13734  * WMI_REQUEST_CTRL_PATH_STATS_CMD message for the stat type
13735  * WMI_REQUEST_CTRL_PATH_PMLO_STAT.
13736  */
13737 typedef struct {
13738     /* TLV tag and len; tag equals
13739      *  WMITLV_TAG_STRUC_wmi_ctrl_path_pmlo_stats_struct */
13740     A_UINT32 tlv_header;
13741     /** pdev_id for identifying the PHY */
13742     A_UINT32 pdev_id;
13743     /*
13744      * Percentage of downlink air time used in each access category
13745      * calculated InBSS, units in percentage.
13746      * BIT[0-7]   : AC_BE
13747      * BIT[8-15]  : AC_BK
13748      * BIT[16-23] : AC_VI
13749      * BIT[24-31] : AC_VO
13750      * Please refer to WMI_PMLO_UL_DL_INBSS_AT_* macros
13751      * to retrieve values for each access category in dl_inbss_airtime_per_ac.
13752      */
13753     union {
13754         struct {
13755              A_UINT32
13756                  dl_inbss_airtime_ac_be: 8,
13757                  dl_inbss_airtime_ac_bk: 8,
13758                  dl_inbss_airtime_ac_vi: 8,
13759                  dl_inbss_airtime_ac_vo: 8;
13760         };
13761         A_UINT32 dl_inbss_airtime_per_ac;
13762     };
13763     /*
13764      * Percentage of uplink air time used in each access category
13765      * calculated InBSS, units in percentage.
13766      * BIT[0-7]   : AC_BE
13767      * BIT[8-15]  : AC_BK
13768      * BIT[16-23] : AC_VI
13769      * BIT[24-31] : AC_VO
13770      * Please refer to WMI_PMLO_UL_DL_INBSS_AT_* macros
13771      * to set/get values for each access category in ul_inbss_airtime_per_ac.
13772      */
13773     union {
13774         struct {
13775             A_UINT32
13776                 ul_inbss_airtime_ac_be: 8,
13777                 ul_inbss_airtime_ac_bk: 8,
13778                 ul_inbss_airtime_ac_vi: 8,
13779                 ul_inbss_airtime_ac_vo: 8;
13780         };
13781         A_UINT32 ul_inbss_airtime_per_ac;
13782     };
13783     /*
13784      * Percentage of air time available for each AC, units in percentage.
13785      * BIT[0-7]   : AC_BE
13786      * BIT[8-15]  : AC_BK
13787      * BIT[16-23] : AC_VI
13788      * BIT[24-31] : AC_VO
13789      * Please refer to WMI_ESP_ESTIMATE_GET_* and WMI_ESP_ESTIMATE_SET_* macros
13790      * to retrieve values for each access category in estimated_air_time_per_ac.
13791      */
13792     union {
13793         struct {
13794              A_UINT32
13795                  estimated_air_time_ac_be: 8,
13796                  estimated_air_time_ac_bk: 8,
13797                  estimated_air_time_ac_vi: 8,
13798                  estimated_air_time_ac_vo: 8;
13799         };
13800         A_UINT32 estimated_air_time_per_ac;
13801     };
13802     /*
13803      * Average channel latency per AC, units in micro seconds.
13804      * avg_chan_lat_per_ac[0] : AC_VO
13805      * avg_chan_lat_per_ac[1] : AC_VI
13806      * avg_chan_lat_per_ac[2] : AC_BE
13807      * avg_chan_lat_per_ac[3] : AC_BK
13808      */
13809     A_UINT32 avg_chan_lat_per_ac[WMI_AC_MAX];
13810     /*
13811      * link_obss_airtime: Percentage of OBSS used air time per link,
13812      * units in percentage.
13813      * Refer to WMI_PMLO_LINK_OBSS_AT_* Macro to set/get values.
13814      * link_idle_airtime: Idle/free airtime per link, units in percentage.
13815      * Refer to WMI_PMLO_LINK_AA_* macro to set/get values.
13816      * ul_inbss_airtime_non_ac: ul inBSS airtime occupied by non-AC traffic,
13817      * units in percentage.
13818      * Refer to WMI_PMLO_UL_AIRTIME_NON_AC_* macro to set/get values.
13819      * dl_inbss_airtime_non_ac: dl inBSS airtime occupied by non-AC traffic,
13820      * units in percentage.
13821      * Refer to WMI_PMLO_DL_AIRTIME_NON_AC_* macro to set/get values.
13822      */
13823     union {
13824         struct {
13825             A_UINT32 link_obss_airtime:       8,
13826                      link_idle_airtime:       8,
13827                      ul_inbss_airtime_non_ac: 8,
13828                      dl_inbss_airtime_non_ac: 8;
13829         };
13830         A_UINT32 ul_dl_obss_free_aa_word32;
13831     };
13832 
13833     /*
13834      * Traffic condition used in estimating the available airtime value.
13835      * Refer to enum wmi_pdev_traffic_condition
13836      * traffic_condition_used_per_ac[0] : AC_VO
13837      * traffic_condition_used_per_ac[1] : AC_VI
13838      * traffic_condition_used_per_ac[2] : AC_BE
13839      * traffic_condition_used_per_ac[3] : AC_BK
13840      * Saturation Traffic condition is evaluated to true when the number
13841      * of associated stations and the number of active TIDs per access
13842      * category crosses a threshold.
13843      * Light Traffic condition is evaluated to true when the obss_rx_airtime
13844      * is less than a threshold and the free channel is greater than the sum
13845      * of DL and UL airtime per client.
13846      * Heavy Traffic condition is evaluated to true when the free channel is
13847      * less than a particular threshold and the number of active TIDs per
13848      * access category crosses a threshold.
13849      * OBSS (Medium) Traffic condition is evaluated to true when the
13850      * obss_rx_airtime crosses a threshold.
13851      * Medium Traffic case is carried out if all the above mentioned
13852      * conditions evaluate to false.
13853      */
13854     A_UINT32 traffic_condition_used_per_ac[WMI_AC_MAX];
13855 
13856     /*
13857      * Every PPDU has an associated txop overhead value in its PPDU duration.
13858      * In order to consider only the duration taken to transfer the actual
13859      * data, we estimate the payload ratio.
13860      * The packet overhead is accumulated for each PPDU, where it is recorded
13861      * for each access category separately.
13862      * The payload_ratio_dl values indicate the percentage of actual data
13863      * packets' duration in the entire TX duration by omitting the overhead
13864      * (units are percentage).
13865      * By estimating the payload ratio, we would be able to further measure
13866      * the free channel with increased accuracy.
13867      *
13868      * BIT[0-7]   : AC_BE
13869      * BIT[8-15]  : AC_BK
13870      * BIT[16-23] : AC_VI
13871      * BIT[24-31] : AC_VO
13872      * Please refer to WMI_PMLO_UL_DL_PAYLOAD_RATIO_* macros
13873      * to retrieve values for each access category in payload_ratio_dl_per_ac.
13874      */
13875     union {
13876         struct {
13877              A_UINT32
13878                  payload_ratio_dl_ac_be: 8,
13879                  payload_ratio_dl_ac_bk: 8,
13880                  payload_ratio_dl_ac_vi: 8,
13881                  payload_ratio_dl_ac_vo: 8;
13882         };
13883         A_UINT32 payload_ratio_dl_per_ac;
13884     };
13885 
13886     /*
13887      * Every PPDU has an associated txop overhead value in its PPDU duration.
13888      * In order to consider only the duration taken to transfer the actual
13889      * data, we estimate the payload ratio.
13890      * The packet overhead is accumulated for each PPDU, where it is recorded
13891      * for each access category separately.
13892      * The payload_ratio_ul values indicate the percentage of actual data
13893      * packets' duration in the entire RX duration by omitting the overhead
13894      * (Units are percentage).
13895      * By estimating the payload ratio, we would be able to further measure
13896      * the free channel with increased accuracy.
13897      *
13898      * BIT[0-7]   : AC_BE
13899      * BIT[8-15]  : AC_BK
13900      * BIT[16-23] : AC_VI
13901      * BIT[24-31] : AC_VO
13902      * Please refer to WMI_PMLO_UL_DL_PAYLOAD_RATIO_* macros
13903      * to retrieve values for each access category in payload_ratio_ul_per_ac.
13904      */
13905     union {
13906         struct {
13907              A_UINT32
13908                  payload_ratio_ul_ac_be: 8,
13909                  payload_ratio_ul_ac_bk: 8,
13910                  payload_ratio_ul_ac_vi: 8,
13911                  payload_ratio_ul_ac_vo: 8;
13912         };
13913         A_UINT32 payload_ratio_ul_per_ac;
13914     };
13915 
13916     /*
13917      * Error margin of the estimated available airtime per AC,
13918      * units are percentage.
13919      * error_margin_per_ac[0] : AC_VO
13920      * error_margin_per_ac[1] : AC_VI
13921      * error_margin_per_ac[2] : AC_BE
13922      * error_margin_per_ac[3] : AC_BK
13923      */
13924     A_UINT32 error_margin_per_ac[WMI_AC_MAX];
13925 
13926     /*
13927      * This parameter indicates the number of clients which would be
13928      * considered to estimate the available airtime value during
13929      * imbalanced traffic scenarios
13930      * Value 0 indicates that we do not have imbalanced traffic.
13931      * num_of_ul/dl_asymmetric_clients_per_ac[0] : AC_VO
13932      * num_of_ul/dl_asymmetric_clients_per_ac[1] : AC_VI
13933      * num_of_ul/dl_asymmetric_clients_per_ac[2] : AC_BE
13934      * num_of_ul/dl_asymmetric_clients_per_ac[3] : AC_BK
13935      */
13936     A_UINT32 num_of_ul_asymmetric_clients_per_ac[WMI_AC_MAX];
13937     A_UINT32 num_of_dl_asymmetric_clients_per_ac[WMI_AC_MAX];
13938 } wmi_ctrl_path_pmlo_stats_struct;
13939 
13940 typedef struct {
13941     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_cfr_stats_struct */
13942     A_UINT32 tlv_header;
13943     /*
13944      * This index is used for formatting the printout of this stats TLV.
13945      * A stats header is added when the index=0.
13946      */
13947     A_UINT32 index;
13948     wmi_mac_addr cfr_peer_mac_addr;
13949     A_UINT32 peer_in_use;
13950     A_UINT32 capture_in_progress;
13951     /* capture_method: 0 means oneshot request, otherwise periodic request */
13952     A_UINT32 capture_method;
13953     A_UINT32 periodicity; /* Time in ms */
13954     A_UINT32 latest_req_timestamp; /* Time in ms */
13955     A_UINT32 latest_resp_timestamp; /* Time in ms */
13956     A_UINT32 cfr_req_count;
13957     A_UINT32 cfr_resp_success_count;
13958     A_UINT32 cfr_resp_failure_count;
13959 } wmi_ctrl_path_cfr_stats_struct;
13960 
13961 
13962 #define WMI_MAX_MLO_LINKS 5
13963 #define WMI_HE_MAP_COUNT 3
13964 #define WMI_EHT_MAP_COUNT 3
13965 
13966 typedef struct {
13967     /* TLV tag and len; tag equals
13968      * WMITLV_TAG_STRUC_wmi_ctrl_path_peer_stats_struct
13969      */
13970     A_UINT32 tlv_header;
13971     /* mac address - part of wlan_peer */
13972     wmi_mac_addr mac_addr;
13973     /* wlan_peer flags - refer to IEEE80211_NODE_* flags in wlan_peer.h */
13974     A_UINT32 opaque_debug_flags;
13975     /* opaque_debug_vht_caps:
13976      * Negotiated VHT capabilities in the wlan_peer struct
13977      * Refer to ieee80211_defs.h.
13978      */
13979     A_UINT32 opaque_debug_vht_caps;
13980     /* opaque_debug_flags_ext:
13981      * Extended flags in the wlan_peer struct
13982      * Refer to IEEE80211_NODE_* flags in wlan_peer.h.
13983      */
13984     A_UINT32 opaque_debug_flags_ext;
13985     /* TID queues marked for TWT flush, present in wlan_peer */
13986     A_UINT32 opaque_debug_twt_flush_tidmap;
13987     /* Number of TWT SPs to be expired, present in wlan_peer */
13988     A_UINT32 opaque_debug_n_TWT_SPs_to_expire;
13989     /* opaque_debug_rc_flags:
13990      * Peer rate information, part of struct rate_node
13991      * Refer to whal_rate_api.h for complete RC_FLAGS details.
13992      */
13993     A_UINT32 opaque_debug_rc_flags;
13994     /* opaque_debug_sm_event_mask_eosp_cnt:
13995      * This word contains the following bitfields:
13996      *   - Power save state machine event mask,
13997      *     part of wal_ps_buf_peer_handle_t.
13998      *     Refer to enum wal_ps_buf_peer_reg_ev_handlers.
13999      *     Use WMI_PEER_STATS_SM_MASK_SET,GET macros.
14000      *   - End of service period (EOSP) sent retry counter,
14001      *     part of wal_ps_buf_peer_handle_t.
14002      *     Use WMI_PEER_STATS_EOSP_RETRY_CNT_SET,GET macros.
14003      */
14004     A_UINT32 opaque_debug_sm_event_mask_eosp_cnt;
14005     /* opaque_debug_ps_buf_peer_flag1:
14006      * Power save related send_n, ps_poll, unscheduled service period
14007      * related fields;
14008      * Part of wal_ps_buf_peer_handle_t.
14009      * Refer to wal_ps_buf_peer_ctx struct definition.
14010      */
14011     A_UINT32 opaque_debug_ps_buf_peer_flag1;
14012     /* opaque_debug_ps_buf_peer_flag2:
14013      * Power save related trigger/delivery tid related fields.
14014      * part of wal_ps_buf_peer_handle_t.
14015      * Refer to wal_ps_buf_peer_ctx struct definition.
14016      */
14017     A_UINT32 opaque_debug_ps_buf_peer_flag2;
14018     /* opaque_debug_ps_buf_peer_flag3:
14019      * Power save related last trigger related information,
14020      * part of wal_ps_buf_peer_handle_t.
14021      * Refer to wal_ps_buf_peer_ctx struct definition.
14022      */
14023     A_UINT32 opaque_debug_ps_buf_peer_flag3;
14024     /* opaque_debug_last_rx_trigger_time:
14025      * Time of the most recently received uplink trigger frame,
14026      * part of wal_ps_buf_peer_handle_t - in microseconds units.
14027      */
14028     A_UINT32 opaque_debug_last_rx_trigger_time;
14029     /* opaque_debug_last_poll_time:
14030      * TSF of the most recently received uplink PS-Poll,
14031      * part of wal_ps_buf_peer_handle_t - in TU
14032      */
14033     A_UINT32 opaque_debug_last_poll_time;
14034     /* opaque_debug_oldest_tx_buffered_waiting_ms:
14035      * Enqueue time of most recent MSDU that AP has buffered for
14036      * sleeping station, part of wal_ps_buf_peer_handle_t, in ms units.
14037      */
14038     A_UINT32 opaque_debug_oldest_tx_buffered_waiting_ms;
14039     /* opaque_debug_last_rxtx_activity:
14040      * The last time when there was a rx or tx traffic from a client,
14041      * part of wal_ps_buf_peer_handle_t, in ms units.
14042      */
14043     A_UINT32 opaque_debug_last_rxtx_activity;
14044     /* opaque_debug_twt_flush_expiry_timestamp:
14045      * Peer's TWT flush expiry timestamp in us,
14046      * part of peer_twt_flush struct.
14047      */
14048     A_UINT32 opaque_debug_twt_flush_expiry_timestamp;
14049     /* opaque_debug_hw_link_id:
14050      * Unique link id across SOCs, determined during QMI handshake,
14051      * part of wlan_peer_ml_info_t.
14052      */
14053     A_UINT32 opaque_debug_hw_link_id;
14054     /* opaque_debug_ml_partner_hw_link_id_bitmap:
14055      * Hardware link id of the of partner links that are to be cleaned up.
14056      * This is filled by host during peer delete cmd.
14057      * It it part of wlan_peer_ml_info_t.
14058      */
14059     A_UINT32 opaque_debug_ml_partner_hw_link_id_bitmap;
14060     /* opaque_debug_link_flags:
14061      * MLO link flags: related to assoc, anchor, master and primary UMAC links.
14062      * Refer to resmgr_mlo_link_flags.
14063      * Part of wlan_peer_ml_info_t.
14064      */
14065     A_UINT32 opaque_debug_link_flags;
14066     /* MLO peer id - part of wlan_ml_peer_t */
14067     A_UINT32 opaque_debug_ml_peer_id;
14068     /* MLD mac address - part of wlan_ml_peer_t */
14069     wmi_mac_addr opaque_debug_mld_mac_addr;
14070     /* opaque_debug_assoc_id_usage_cnt:
14071      * Part of wlan_peer.
14072      * This word contains the following bitfields:
14073      *   - assoc id of the peer
14074      *     Use WMI_PEER_STATS_ASSOCIATE_ID_SET,GET macros.
14075      *   - peer usage count to track if peer alloc command is sent
14076      *     for new or existing peer,
14077      *     Use WMI_PEER_STATS_USAGE_CNT_SET,GET macros.
14078      */
14079     A_UINT32 opaque_debug_assoc_id_usage_cnt;
14080     /* opaque_debug_default_ht_caps:
14081      * Part of wlan_peer.
14082      * This word contains the following bitfields:
14083      *   - default peer capabilities of the peer - refer ieee80211_defs.h
14084      *     Use WMI_PEER_STATS_DEF_CAPS_SET,GET macros.
14085      *   - HT capabilities of the peer - refer ieee80211_defs.h
14086      *     Use WMI_PEER_STATS_HT_CAPS_SET,GET macros.
14087      */
14088     A_UINT32 opaque_debug_default_ht_caps;
14089     /* opaque_debug_inact_gen:
14090      * Part of wlan_peer.
14091      * This word contains the following bitfields:
14092      *   - Overall tx/rx inactivity time of the peer in seconds
14093      *     Use WMI_PEER_STATS_INACT_GEN_SET,GET macros.
14094      *   - Data tx/rx inactivity time of the peer in seconds.
14095      *     Use WMI_PEER_STATS_DATA_INACT_GEN_SET,GET macros.
14096      */
14097     A_UINT32 opaque_debug_inact_gen;
14098     /* opaque_debug_id_type:
14099      * Part of wlan_peer.
14100      * This word contains the following bitfields:
14101      *   - Type of peer whether it is bss,self or remote peer.
14102      *     Refer to enum wmi_peer_type.
14103      *     Use WMI_PEER_STATS_TYPE_SET,GET macros.
14104      *   - MAC ID that the peer belongs to
14105      *     Use WMI_PEER_STATS_MAC_ID_SET,GET macros.
14106      *   - sw peer id of the peer
14107      *     Use WMI_PEER_STATS_ID_SET,GET macros.
14108      */
14109     A_UINT32 opaque_debug_id_type;
14110     /* Deleted tids bitmask within the peer - part of wal_peer */
14111     A_UINT32 opaque_debug_deleted_tidmask;
14112     /* number of local pending frames for completions -  part of wal_peer */
14113     A_UINT32 opaque_debug_num_of_local_frames_pending;
14114     /* flags part of wal_peer - refer to wal_peer_flags_t */
14115     A_UINT32 opaque_debug_wal_peer_flags;
14116     /* opaque_debug_keyid0_ast_index:
14117      * The AST index for key id 0 which is always allocated,
14118      * part of wal_peer.
14119      */
14120     A_UINT32 opaque_debug_keyid0_ast_index;
14121     /* opaque_debug_all_tids_block_module_bitmap:
14122      * Bitmap of block IDs requesting block of all TIDs,
14123      * part of wal_peer.
14124      * Refer to enum WLAN_PAUSE_ID.
14125      * This block/pause ID can be mapped to a WLAN_MODULE_ID module ID.
14126      */
14127     A_UINT32 opaque_debug_all_tids_block_module_bitmap;
14128     /* opaque_debug_all_tids_pause_module_bitmap:
14129      * Bitmap of pause IDs requesting block of all TIDs,
14130      * part of wal_peer.
14131      * Refer to enum WLAN_PAUSE_ID.
14132      * This pause ID can be mapped to a WLAN_MODULE_ID module ID.
14133      */
14134     A_UINT32 opaque_debug_all_tids_pause_module_bitmap;
14135     /* opaque_debug_data_tids_block_module_bitmap:
14136      * Bitmap of block ids requesting block of data tids,
14137      * part of wal_peer.
14138      * Refer to enum WLAN_PAUSE_ID.
14139      * This block/pause ID can be mapped to a WLAN_MODULE_ID module ID.
14140      */
14141     A_UINT32 opaque_debug_data_tids_block_module_bitmap;
14142     /* opaque_debug_data_tids_pause_module_bitmap:
14143      * Bitmap of pause ids requesting block of data tids,
14144      * part of wal_peer.
14145      * Refer to enum WLAN_PAUSE_ID.
14146      * This pause ID can be mapped to a WLAN_MODULE_ID module ID.
14147      */
14148     A_UINT32 opaque_debug_data_tids_pause_module_bitmap;
14149     /* The time stamp when first ppdu fails in us, part of wal_peer */
14150     A_UINT32 opaque_debug_ppdu_fail_time;
14151     /* opaque_debug_rate_params:
14152      * This word contains the following bitfields:
14153      *   - Non data rate code of the peer - part of wal_peer
14154      *     Use WMI_PEER_STATS_BSS_NON_DATA_RC_SET,GET macros.
14155      *   - channel bandwidth supported by the peer, part of wal_peer.
14156      *     The mapping is as follows:
14157      *     0 = 20 MHz, 1 = 40 MHz, 2 = 80 MHz, 3 = 160 MHz, 4 = 320 MHz
14158      *     Use WMI_PEER_STATS_CH_WIDTH_SET,GET macros.
14159      *   - MCS used for the last PPDU received from the peer, part of wal_peer
14160      *     Use WMI_PEER_STATS_RX_MCS_SET,GET macros.
14161      */
14162     A_UINT32 opaque_debug_rate_params;
14163     /* consecutive QOS null frame tx fail count, part of wal_peer */
14164     A_UINT32 opaque_debug_consecutive_null_failure;
14165     /* peer delete state refer enum PEER_DELETE_SM_STATE, part of wal_peer */
14166     A_UINT32 opaque_debug_peer_delete_sm_state;
14167     /* opaque_debug_cache_rate_info_low32,_high32:
14168      * Lower/upper 32 bits respectively of cached rate info variable
14169      * updated by the HTT metadata.
14170      * This rate_info is based on the values from struct
14171      * htt_tx_msdu_desc_ext2_t  .
14172      * If htt_tx_desc_ext2->update_peer_cache is set to 1 and
14173      * HTT_TX_TCL_METADATA_PEER_ID_GET(tcl_cmd_num) returns valid peer ID
14174      * then rate_info cache of the peer is updated.
14175      * Part of wal_peer.
14176      */
14177     A_UINT32 opaque_debug_cache_rate_info_low32;
14178     A_UINT32 opaque_debug_cache_rate_info_high32;
14179     /* opaque_debug_peer_delete_rc4_rekey:
14180      * This word contains the following bitfields:
14181      *   - Flag that denotes if Peer delete all is in progress or not,
14182      *     part of wal_peer.
14183      *     Use WMI_PEER_STATS_DELETE_ALL_FLAG_SET,GET macros.
14184      *   - RC4 rekey counter, part of wal_peer.
14185      *     Use WMI_PEER_STATS_RC4_REKEY_CNT_SET,GET macros.
14186      */
14187     A_UINT32 opaque_debug_peer_delete_rc4_rekey;
14188     /* opaque_debug_mcbc_tids_pause_bitmap:
14189      * Bitmap containing Multicast and broadcast tids that are paused,
14190      * part of wal_peer.
14191      */
14192     A_UINT32 opaque_debug_mcbc_tids_pause_bitmap;
14193     /* opaque_debug_next_to_last_pn_low32,_high32:
14194      * Lower/upper 32 bits respectively of last used PN value received,
14195      * part of wal_peer.
14196      */
14197     A_UINT32 opaque_debug_next_to_last_pn_low32;
14198     A_UINT32 opaque_debug_next_to_last_pn_high32;
14199     /* opaque_debug_last_pn_low32,_high32:
14200      * Lower/upper 32 bits respectively of current PN value received,
14201      * part of wal_peer.
14202      */
14203     A_UINT32 opaque_debug_last_pn_low32;
14204     A_UINT32 opaque_debug_last_pn_high32;
14205     /* opaque_debug_twt_ap_peer_ctx_flags:
14206      * This word contains the following bitfields:
14207      *   - TWT AP peer's context flags, part of twt_ap_peer_handle_t struct.
14208      *     Refer twt_ap_twt_session_t definition.
14209      *     Use WMI_PEER_STATS_TWT_AP_FLAGS_SET,GET macros.
14210      *   - TWT session counter, part of twt_ap_peer_handle_t struct.
14211      *     Use WMI_PEER_STATS_TWT_AP_SESSION_CNT_SET,GET macros.
14212      *   - TWT frame retry counter, part of twt_ap_peer_handle_t struct.
14213      *     Use WMI_PEER_STATS_TWT_FRM_RETRY_SET,GET macros.
14214      */
14215     A_UINT32 opaque_debug_twt_ap_peer_ctx_flags;
14216     /* opaque_debug_twt_ap_counters:
14217      * This word contains the following bitfields:
14218      *   - TWT UL trigger counter, part of twt_ap_peer_handle_t struct.
14219      *     Use WMI_PEER_STATS_TWT_UL_TRIGGER_SET,GET macros.
14220      *   - TWT Broadcast session counter, part of twt_ap_peer_handle_t struct.
14221      *     Use WMI_PEER_STATS_TWT_BC_SESSION_SET,GET macros.
14222      *   - TWT pending report counter, part of twt_ap_peer_handle_t struct.
14223      *     Use WMI_PEER_STATS_TWT_PENDING_REPORT_SET,GET macros.
14224      *   - TWT flow IDs, part of twt_ap_peer_handle_t struct.
14225      *     Use WMI_PEER_STATS_TWT_FLOW_IDS_SET,GET macros.
14226      */
14227     A_UINT32 opaque_debug_twt_ap_counters;
14228     /* opaque_debug_tx_state_bmap_low32,_high32:
14229      * Lower/upper 32 bits respectively of list of currently running
14230      * BA Tx states for tids in this peer, part of wal_ba_peer_handle_t.
14231      */
14232     A_UINT32 opaque_debug_tx_state_bmap_low32;
14233     A_UINT32 opaque_debug_tx_state_bmap_high32;
14234     /* opaque_debug_addba_mode:
14235      * This word contains the following bitfields:
14236      *   - ADDBA mode whether its automatic or manual,
14237      *     WAL_BA_ADDBA_MODE_AUTO = 0 and WAL_BA_ADDBA_MODE_MANUAL = 1
14238      *     Part of wal_ba_peer_handle_t.
14239      *     Use WMI_PEER_STATS_ADDBBA_TX_MODE_SET,GET macros.
14240      *   - ADDBA request's response code, part of wal_ba_peer_handle_t.
14241      *     Use WMI_PEER_STATS_ADDBBA_RESP_MODE_SET,GET macros.
14242      */
14243     A_UINT32 opaque_debug_addba_mode;
14244     /* opaque_debug_tx_retry_bmap:
14245      * Bitmap of tids and their TX BlockAck retry counters.
14246      * Each TID uses 2 bits for its BA retry counter.
14247      * Part of wal_ba_peer_handle_t.
14248      */
14249     A_UINT32 opaque_debug_tx_retry_bmap;
14250     /* opaque_debug_rx_state_bmap:
14251      * Bitmap of tids and their RX BlockAck retry counters.
14252      *   00 - BA not setup
14253      *   01 - BA in progress
14254      *   10 - reserved
14255      *   11 - BA setup.
14256      * Each TID uses 2 bits for its BA RX state;
14257      * for instance TID 0's BA info occupies bits 1:0 and so on.
14258      * Part of wal_ba_peer_handle_t.
14259      */
14260     A_UINT32 opaque_debug_rx_state_bmap;
14261     /* opaque_debug_tx_pending_delba_tid_bmap:
14262      * TID bitmap containaing information DELBA tx pending,
14263      * part of wal_ba_peer_handle_t.
14264      */
14265     A_UINT32 opaque_debug_tx_pending_delba_tid_bmap;
14266     /* opaque_debug_link_monitor_tid_num:
14267      * link monitor tid num in bss_peer ba_peer_handle,
14268      * part of wal_ba_peer_handle_t.
14269      */
14270     A_UINT32 opaque_debug_link_monitor_tid_num;
14271     /* opaque_debug_rc4_eapol_key_complete:
14272      * Flag that denotes rc4 eapol key exchange is complete,
14273      * part of wal_peer_ext.
14274      */
14275     A_UINT32 opaque_debug_rc4_eapol_key_complete;
14276     /* qcache peer flags, refer to qpeer_flags_t */
14277     A_UINT32 opaque_debug_qpeer_flags;
14278     /* bitmap of TIDs requested for flush, part of wal_qcache_peer */
14279     A_UINT32 opaque_debug_delete_requested_tidmask;
14280     /* bitmap of created TIDs, part of wal_qcache_peer */
14281     A_UINT32 opaque_debug_tid_created_tidmask;
14282     /* opaque_debug_qpeer_rt_flags0,_flags1,_flags2:
14283      * RT thread related fields in qpeer, refer to _wal_qcache_peer.
14284      */
14285     A_UINT32 opaque_debug_qpeer_rt_flags0;
14286     A_UINT32 opaque_debug_qpeer_rt_flags1;
14287     A_UINT32 opaque_debug_qpeer_rt_flags2;
14288     /* opaque_debug_qpeer_sa_flags0,_flags1:
14289      * SA thread related fields in qpeer, refer to _wal_qcache_peer.
14290      */
14291     A_UINT32 opaque_debug_qpeer_sa_flags0;
14292     A_UINT32 opaque_debug_qpeer_sa_flags1;
14293     /* BE thread related fields in qpeer, refer to _wal_qcache_peer */
14294     A_UINT32 opaque_debug_qpeer_be_flags;
14295     /* qpeer event bitmap, refer to wal_peer_event_type */
14296     A_UINT32 opaque_debug_event_bitmap;
14297     /* tx fail count for a peer, part of dcache peer */
14298     A_UINT32 opaque_debug_seq_no_tx_fail_cnt;
14299     /* Last transmission rate in kbps for a peer, part of dcache peer */
14300     A_UINT32 opaque_debug_last_tx_rate_kbps;
14301     /* opaque_debug_amsdu_size:
14302      * This word contains the following bitfields:
14303      *    - MAX AMSDU size of the peer, part of dcache peer.
14304      *      Use WMI_PEER_STATS_MAX_AMSDU_SIZE_SET,GET macros.
14305      */
14306     A_UINT32 opaque_debug_amsdu_size;
14307     /* opaque_debug_fake_sleep_time:
14308      * Time elapsed in ms after entering into fake sleep after xretry failure,
14309      * part of dcache peer.
14310      */
14311     A_UINT32 opaque_debug_fake_sleep_time;
14312     /* opaque_debug_tx_frame_qos_ctrl:
14313      * This word contains the following bitfields:
14314      *   - Tx frame control FC flags in ieee80211_defs.h, part of dcache peer.
14315      *     Use WMI_PEER_STATS_TX_FRAME_CTRL_SET,GET macros.
14316      *   - Tx QOS control FC flags in ieee80211_defs.h, part of dcache peer.
14317      *     Use WMI_PEER_STATS_TX_QOS_CTRL_SET,GET macros.
14318      */
14319     A_UINT32 opaque_debug_tx_frame_qos_ctrl;
14320     /* opaque_debug_consec_fail_subfrm_sz:
14321      * This word contains the following bitfields:
14322      *   - Consecutive tx fail count for the peer, part of dcache peer.
14323      *     Use WMI_PEER_STATS_CONSEC_FAIL_SET,GET macros.
14324      *   - subframe size configured for the peer, part of dcache peer.
14325      *     Use WMI_PEER_STATS_SUBFRAME_SIZE_SET,GET macros.
14326      */
14327     A_UINT32 opaque_debug_consec_fail_subfrm_sz;
14328     /* opaque_debug_tx_fail_partial_aid:
14329      * This word contains the following bitfields:
14330      *   - tx fail count for the peer, part of dcache peer.
14331      *     Use WMI_PEER_STATS_TX_FAIL_CNT_SET,GET macros.
14332      *   - Partial AID of the peer, part of dcache peer.
14333      *     Use WMI_PEER_STATS_TX_PARTIAL_AID_SET,GET macros.
14334      */
14335     A_UINT32 opaque_debug_tx_fail_partial_aid;
14336     /* opaque_debug_max_nss:
14337      * Part of dcache peer.
14338      * This word contains the following bitfields:
14339      *   - Peer NSS value sent by host during WMI_PEER_ASSOC cmd.
14340      *     Use WMI_PEER_STATS_MAX_NSS_SET,GET macros.
14341      */
14342     A_UINT32 opaque_debug_max_nss;
14343     /* opaque_debug_he_cap_info:
14344      * Peer HE capabilities info sent during peer assoc cmd.
14345      * Refer to WMI_HECAP_* macros in wmi_unified.h.
14346      * Part of dcache peer.
14347      */
14348     A_UINT32 opaque_debug_he_cap_info;
14349     /* opaque_debug_he_cap_info_ext:
14350      * Peer extended HE capabilities info sent during peer assoc cmd.
14351      * Refer to WMI_HECAP_* macros in wmi_unified.h.
14352      * Part of dcache peer.
14353      */
14354     A_UINT32 opaque_debug_he_cap_info_ext;
14355     /* opaque_debug_eht_cap_info:
14356      * Peer EHT capabilities info.
14357      * Refer to ieee80211_defs.h, part of dcache peer.
14358      */
14359     A_UINT32 opaque_debug_eht_cap_info;
14360     /* TAC thread related fields in dcache peer refer wal_dcache_peer_t */
14361     A_UINT32 opaque_debug_dcache_tac_flags;
14362     /* RT thread related fields in dcache peer refer wal_dcache_peer_t */
14363     A_UINT32 opaque_debug_dcache_rt_flags;
14364     /* Supported RC modes for the peer refer enum RC_MODE, part of dcache */
14365     A_UINT32 opaque_debug_rc_mode_supported_mask;
14366     /* opaque_debug_wlan_peer_bitfield_mask:
14367      * Part of wlan peer. This word contains the following bitfields:
14368      *   - Flag that denotes whether peer delete response is being sent
14369      *     to host or not.
14370      *     Use WMI_PEER_STATS_DEL_RESP_TO_HOST_SET,GET macros.
14371      *   - Flag that denotes if peer delete is in progress or not.
14372      *     Use WMI_PEER_STATS_DELETE_IN_PROGRESS_SET,GET macros.
14373      *   - Flag that denotes if peer migration is in progress or not.
14374      *     Use WMI_PEER_STATS_MIGRATION_IN_PROGRESS_SET,GET macros.
14375      *   - Flag that denotes peer's connection/authorized state.
14376      *     Refer WAL_PEER_STATE_* macros in wal_peer.h.
14377      *     Use WMI_PEER_STATS_CONN_STATE_SET,GET macros.
14378      *   - TX chain mask at 160MHz of the peer set during peer assoc command.
14379      *     Use WMI_PEER_STATS_TX_CHAIN_MASK_160_SET,GET macros.
14380      *   - Tx chain mask set during peer assoc command.
14381      *     Use WMI_PEER_STATS_TX_CHAIN_MASK_SET,GET macros.
14382      *   - copy of tx chain mask of peer saved for AP MIMO PS.
14383      *     Use WMI_PEER_STATS_ASSOC_CHAIN_MASK_SET,GET macros.
14384      */
14385     A_UINT32 opaque_debug_wlan_peer_bitfield_mask;
14386     /* opaque_debug_wal_peer_bitfields:
14387      * Part of wal_peer. This word contains the following bitfields:
14388      *   - Flag that denotes if QOS null is sent over WMI or not.
14389      *     Use WMI_PEER_STATS_QOS_NULL_OVER_WMI_SET,GET macros.
14390      *   - Flag that denotes whether peer assoc is received
14391      *     for the first time or not.
14392      *     Use WMI_PEER_STATS_NEW_ASSOC_SET,GET macros.
14393      *   - Flag that denotes whether TWT filter is enabled or not.
14394      *     Use WMI_PEER_STATS_TWT_FILT_FLAG_SET,GET macros.
14395      *   - Flag that denotes whether TWT is registered or not.
14396      *     Use WMI_PEER_STATS_TWT_REG_FLAG_SET,GET macros.
14397      *   - Flag that denotes whether WMM txQ uplink trigger is disabled or not.
14398      *     Use WMI_PEER_STATS_WMM_UL_TRIG_FLAG_SET,GET macros.
14399      *   - Number of active TIDs that do not have BA setup.
14400      *     Use WMI_PEER_STATS_ACTIVE_NOT_BA_TID_SET,GET macros.
14401      */
14402     A_UINT32 opaque_debug_wal_peer_bitfields;
14403     /* flags in RT context refer wal_peer_ext_t */
14404     A_UINT32 opaque_debug_wal_peer_rt_flags;
14405     /* opaque_debug_ml_attributes:
14406      * Part of wal_ml_peer. This word contains the following bitfields:
14407      *   - Num of MLO links
14408      *     Use WMI_PEER_STATS_NUM_LINKS_SET,GET macros.
14409      *   - ML peer id
14410      *     Use WMI_PEER_STATS_ML_PEER_ID_SET,GET macros.
14411      *   - Primary link ID
14412      *     Use WMI_PEER_STATS_PRI_LINK_ID_SET,GET macros.
14413      *   - Primary chip ID
14414      *     Use WMI_PEER_STATS_PRI_CHIP_ID_SET,GET macros.
14415      *   - Initial link count
14416      *     Use WMI_PEER_STATS_LINK_INIT_CNT_SET,GET macros.
14417      *   - Number of local links
14418      *     Use WMI_PEER_STATS_NUM_LOCAL_LINKS_SET,GET macros.
14419      *   - Bitmap of participating chips
14420      *     Use WMI_PEER_STATS_CHIPS_BITMAP_SET,GET macros.
14421      */
14422     A_UINT32 opaque_debug_ml_attributes;
14423     /* wal peer MLO flags refer ml_peer_flags_t */
14424     A_UINT32 opaque_debug_ml_flags;
14425     /* opaque_debug_ml_link_info_flags:
14426      * Part of link_info in wlan_peer_ml_info_t.
14427      * This word contains the following bitfields:
14428      *   - flag denoting if MLO-link is valid or not
14429      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_VALID_SET,GET macros.
14430      *   - flag denoting if MLO-link is active or not
14431      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_ACTIVE_SET,GET macros.
14432      *   - flag denoting if MLO-link is primary or not
14433      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_PRI_SET,GET macros.
14434      *   - flag denoting if MLO-link is assoc link or not
14435      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_ASSOC_LINK_SET,GET macros.
14436      *   - Chip ID of the MLO-link
14437      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_CHIP_ID_SET,GET macros.
14438      *   - IEEE link ID of the MLO-link
14439      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_IEEE_LINK_SET,GET macros.
14440      *   - HW link ID of the MLO-link
14441      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_HW_LINK_SET,GET macros.
14442      *   - logical link ID of the MLO-link
14443      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_LOGICAL_LINK_SET,GET macros.
14444      *   - flag denoting if MLO-link is master link or not
14445      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_MASTER_LINK_SET,GET macros.
14446      *   - flag denoting if MLO-link is anchor link or not
14447      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_ANCHOR_LINK_SET,GET macros.
14448      *   - flag denoting if MLO-link is initialized or not
14449      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_INIT_SET,GET macros.
14450      */
14451     A_UINT32 opaque_debug_ml_link_info_flags[WMI_MAX_MLO_LINKS];
14452     /* opaque_debug_ml_link_info_id:
14453      * Part of link_info in wlan_peer_ml_info_t.
14454      * This word contains the following bitfields:
14455      *   - sw_peer_id corresponding to the link
14456      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_PEER_ID_SET,GET macros.
14457      *   - vdev id corresponding to the link
14458      *     Use WMI_PEER_STATS_ML_PEER_LINK_INFO_VDEV_ID_SET,GET macros.
14459      */
14460     A_UINT32 opaque_debug_ml_link_info_id[WMI_MAX_MLO_LINKS];
14461     /* MLO link info primary tid mask, part of link_info in wlan_peer_ml_info_t */
14462     A_UINT32 opaque_debug_ml_link_info_pri_tidmask[WMI_MAX_MLO_LINKS];
14463     /* opaque_debug_rc_node_params:
14464      * Part of struct TX_PEER_PARAMS.
14465      * This word contains the following bitfields:
14466      *   - NSS of the peer in 160MHZ
14467      *     Use WMI_PEER_STATS_NSS_160_SET,GET macros.
14468      *   - phymode of the peer - refer enum WLAN_PHY_MODE
14469      *     Use WMI_PEER_STATS_RC_PHYMODE_SET,GET macros.
14470      *   - legacy rate set for the peer
14471      *     Use WMI_PEER_STATS_LEGACY_RATE_SET,GET macros.
14472      */
14473     A_UINT32 opaque_debug_rc_node_params;
14474     /* opaque_debug_rc_vht_mcs_set:
14475      * Rate node param - negotiated VHT MCS map,
14476      * part of struct TX_PEER_PARAMS
14477      */
14478     A_UINT32 opaque_debug_rc_vht_mcs_set;
14479     /* opaque_debug_rc_node_params1:
14480      * Part of link_info in wlan_peer_ml_info_t.
14481      * This word contains the following bitfields:
14482      *   - Minimum data rate set for the peer in Mbps
14483      *     Use WMI_PEER_STATS_MIN_DATA_RATE_SET,GET macros.
14484      *   - Max VHT rate set for the peer
14485      *     Use WMI_PEER_STATS_VHT_MAX_RATE_SET,GET macros.
14486      *   - Max VHT streams set for the peer
14487      *     Use WMI_PEER_STATS_VHT_MAX_STREAMS_SET,GET macros.
14488      *   - BSS - Channel frequency set for the peer in MHz
14489      *     Use WMI_PEER_STATS_RC_CHAN_FREQ_SET,GET macros.
14490      */
14491     A_UINT32 opaque_debug_rc_node_params1;
14492     /* opaque_debug_he_mcs_nss_set_tx,_rx:
14493      * Rate node param - negotiated HE MCS tx+rx maps,
14494      * part of struct TX_PEER_PARAMS.
14495      * The lower 8 bits (bits 23:16) within the upper 16 bits indicate
14496      * MCS 12/13 enablement for BW <= 80MHz; the upper 8 bits (bits 31:24)
14497      * within the 16 bits indicate MCS 12/13 enablement for BW > 80MHz.
14498      * The 16 bits for the index values are within the upper bits (bits 31:16)
14499      * of a 32-bit word. and WMI_HE_MAP_COUNT is based on HE_MCS_MAP_CNT
14500      * in ieee80211_defs.h.
14501      */
14502     A_UINT32 opaque_debug_he_mcs_nss_set_tx[WMI_HE_MAP_COUNT];
14503     A_UINT32 opaque_debug_he_mcs_nss_set_rx[WMI_HE_MAP_COUNT];
14504     /* opaque_debug_eht_mcs_nss_set_tx,_rx:
14505      * Rate node param - negotiated EHT MCS tx+rx maps,
14506      * part of struct TX_PEER_PARAMS.
14507      * B0-B3 indicates max NSS that supports mcs 0-7
14508      * B4-B7 indicates max NSS that supports mcs 8-9
14509      * B8-B11 indicates max NSS that supports mcs 10-11
14510      * B12-B15 indicates max NSS that supports mcs 12-13
14511      * B16-B31 reserved.
14512      * WMI_EHT_MAP_COUNT is based on EHT_MCS_MAP_CNT in ieee80211_defs.h.
14513      */
14514     A_UINT32 opaque_debug_eht_mcs_nss_set_tx[WMI_EHT_MAP_COUNT];
14515     A_UINT32 opaque_debug_eht_mcs_nss_set_rx[WMI_EHT_MAP_COUNT];
14516     /* opaque_debug_rc_user_start_mcs_rate:
14517      * Rate node user_start_rate is MCS value set based on phymode.
14518      * For possible values refer "INITIAL_" macros in ratectrl.h.
14519      * Part of struct TX_PEER_PARAMS.
14520      * This is the starting value of MCS that was used by rate control
14521      * for the first transmissions to the peer, until PER information
14522      * from the peer allowed the rate control algorithm to determine
14523      * the suitable MCS.
14524      */
14525     A_UINT32 opaque_debug_rc_user_start_mcs_rate;
14526     /*
14527      * The following 4 opaque_debug_field variables are provided purely
14528      * for debugging by technicians who have outside knowledge of what
14529      * kind of values the target has placed into these fields.
14530      * They are not to be interpreted by the host driver in any manner.
14531      */
14532     A_UINT32 opaque_debug_field_1;
14533     A_UINT32 opaque_debug_field_2;
14534     A_UINT32 opaque_debug_field_3;
14535     A_UINT32 opaque_debug_field_4;
14536 } wmi_ctrl_path_peer_stats_struct;
14537 
14538 #define WMI_PEER_STATS_SM_MASK_SET(flag, val) \
14539     WMI_SET_BITS(flag, 0, 16, val)
14540 #define WMI_PEER_STATS_SM_MASK_GET(flag) \
14541     WMI_GET_BITS(flag, 0, 16)
14542 #define WMI_PEER_STATS_EOSP_RETRY_CNT_SET(flag, val) \
14543     WMI_SET_BITS(flag, 16, 8, val)
14544 #define WMI_PEER_STATS_EOSP_RETRY_CNT_GET(flag) \
14545     WMI_GET_BITS(flag, 16, 8)
14546 /* bits 31:24 unused/reserved */
14547 
14548 #define WMI_PEER_STATS_ASSOCIATE_ID_SET(flag, val) \
14549     WMI_SET_BITS(flag, 0, 16, val)
14550 #define WMI_PEER_STATS_ASSOCIATE_ID_GET(flag) \
14551     WMI_GET_BITS(flag, 0, 16)
14552 #define WMI_PEER_STATS_USAGE_CNT_SET(flag, val) \
14553     WMI_SET_BITS(flag, 16, 16, val)
14554 #define WMI_PEER_STATS_USAGE_CNT_GET(flag) \
14555     WMI_GET_BITS(flag, 16, 16)
14556 
14557 #define WMI_PEER_STATS_DEF_CAPS_SET(flag, val) \
14558     WMI_SET_BITS(flag, 0, 16, val)
14559 #define WMI_PEER_STATS_DEF_CAPS_GET(flag) \
14560     WMI_GET_BITS(flag, 0, 16)
14561 #define WMI_PEER_STATS_HT_CAPS_SET(flag, val) \
14562     WMI_SET_BITS(flag, 16, 16, val)
14563 #define WMI_PEER_STATS_HT_CAPS_GET(flag) \
14564     WMI_GET_BITS(flag, 16, 16)
14565 
14566 #define WMI_PEER_STATS_INACT_GEN_SET(flag, val) \
14567     WMI_SET_BITS(flag, 0, 16, val)
14568 #define WMI_PEER_STATS_INACT_GEN_GET(flag) \
14569     WMI_GET_BITS(flag, 0, 16)
14570 #define WMI_PEER_STATS_DATA_INACT_GEN_SET(flag, val) \
14571     WMI_SET_BITS(flag, 16, 16, val)
14572 #define WMI_PEER_STATS_DATA_INACT_GEN_GET(flag) \
14573     WMI_GET_BITS(flag, 16, 16)
14574 
14575 #define WMI_PEER_STATS_PEER_TYPE_SET(flag, val) \
14576     WMI_SET_BITS(flag, 0, 8, val)
14577 #define WMI_PEER_STATS_PEER_TYPE_GET(flag) \
14578     WMI_GET_BITS(flag, 0, 8)
14579 #define WMI_PEER_STATS_MAC_ID_SET(flag, val) \
14580     WMI_SET_BITS(flag, 8, 8, val)
14581 #define WMI_PEER_STATS_MAC_ID_GET(flag) \
14582     WMI_GET_BITS(flag, 8, 8)
14583 #define WMI_PEER_STATS_PEER_ID_SET(flag, val) \
14584     WMI_SET_BITS(flag, 16, 16, val)
14585 #define WMI_PEER_STATS_PEER_ID_GET(flag) \
14586     WMI_GET_BITS(flag, 16, 16)
14587 
14588 #define WMI_PEER_STATS_BSS_NON_DATA_RC_SET(flag, val) \
14589     WMI_SET_BITS(flag, 0, 8, val)
14590 #define WMI_PEER_STATS_BSS_NON_DATA_RC_GET(flag) \
14591     WMI_GET_BITS(flag, 0, 8)
14592 #define WMI_PEER_STATS_CH_WIDTH_SET(flag, val) \
14593     WMI_SET_BITS(flag, 8, 8, val)
14594 #define WMI_PEER_STATS_CH_WIDTH_GET(flag) \
14595     WMI_GET_BITS(flag, 8, 8)
14596 #define WMI_PEER_STATS_RX_MCS_SET(flag, val) \
14597     WMI_SET_BITS(flag, 16, 8, val)
14598 #define WMI_PEER_STATS_RX_MCS_GET(flag) \
14599     WMI_GET_BITS(flag, 16, 8)
14600 /* bits 31:24 unused/reserved */
14601 
14602 #define WMI_PEER_STATS_DELETE_ALL_FLAG_SET(flag, val) \
14603     WMI_SET_BITS(flag, 0, 8, val)
14604 #define WMI_PEER_STATS_DELETE_ALL_FLAG_GET(flag) \
14605     WMI_GET_BITS(flag, 0, 8)
14606 #define WMI_PEER_STATS_RC4_REKEY_CNT_SET(flag, val) \
14607     WMI_SET_BITS(flag, 8, 8, val)
14608 #define WMI_PEER_STATS_RC4_REKEY_CNT_GET(flag) \
14609     WMI_GET_BITS(flag, 8, 8)
14610 /* bits 31:16 unused/reserved */
14611 
14612 #define WMI_PEER_STATS_TWT_AP_FLAGS_SET(flag, val) \
14613     WMI_SET_BITS(flag, 0, 16, val)
14614 #define WMI_PEER_STATS_TWT_AP_FLAGS_GET(flag) \
14615     WMI_GET_BITS(flag, 0, 16)
14616 #define WMI_PEER_STATS_TWT_AP_SESSION_CNT_SET(flag, val) \
14617     WMI_SET_BITS(flag, 16, 8, val)
14618 #define WMI_PEER_STATS_TWT_AP_SESSION_CNT_GET(flag) \
14619     WMI_GET_BITS(flag, 16, 8)
14620 #define WMI_PEER_STATS_TWT_FRM_RETRY_SET(flag, val) \
14621     WMI_SET_BITS(flag, 24, 8, val)
14622 #define WMI_PEER_STATS_TWT_FRM_RETRY_GET(flag) \
14623     WMI_GET_BITS(flag, 24, 8)
14624 
14625 #define WMI_PEER_STATS_TWT_UL_TRIGGER_SET(flag, val) \
14626     WMI_SET_BITS(flag, 0, 8, val)
14627 #define WMI_PEER_STATS_TWT_UL_TRIGGER_GET(flag) \
14628     WMI_GET_BITS(flag, 0, 8)
14629 #define WMI_PEER_STATS_TWT_BC_SESSION_SET(flag, val) \
14630     WMI_SET_BITS(flag, 8, 8, val)
14631 #define WMI_PEER_STATS_TWT_BC_SESSION_GET(flag) \
14632     WMI_GET_BITS(flag, 8, 8)
14633 #define WMI_PEER_STATS_TWT_PENDING_REPORT_SET(flag, val) \
14634     WMI_SET_BITS(flag, 16, 8, val)
14635 #define WMI_PEER_STATS_TWT_PENDING_REPORT_GET(flag) \
14636     WMI_GET_BITS(flag, 16, 8)
14637 #define WMI_PEER_STATS_TWT_FLOW_IDS_SET(flag, val) \
14638     WMI_SET_BITS(flag, 24, 8, val)
14639 #define WMI_PEER_STATS_TWT_FLOW_IDS_GET(flag) \
14640     WMI_GET_BITS(flag, 24, 8)
14641 
14642 #define WMI_PEER_STATS_ADDBBA_TX_MODE_SET(flag, val) \
14643     WMI_SET_BITS(flag, 0, 16, val)
14644 #define WMI_PEER_STATS_ADDBBA_TX_MODE_GET(flag) \
14645     WMI_GET_BITS(flag, 0, 16)
14646 #define WMI_PEER_STATS_ADDBBA_RESP_MODE_SET(flag, val) \
14647     WMI_SET_BITS(flag, 16, 16, val)
14648 #define WMI_PEER_STATS_ADDBBA_RESP_MODE_GET(flag) \
14649     WMI_GET_BITS(flag, 16, 16)
14650 
14651 #define WMI_PEER_STATS_MAX_AMSDU_SIZE_SET(flag, val) \
14652     WMI_SET_BITS(flag, 0, 16, val)
14653 #define WMI_PEER_STATS_MAX_AMSDU_SIZE_GET(flag) \
14654     WMI_GET_BITS(flag, 0, 16)
14655 /* bits 31:16 unused/reserved */
14656 
14657 #define WMI_PEER_STATS_TX_FRAME_CTRL_SET(flag, val) \
14658     WMI_SET_BITS(flag, 0, 16, val)
14659 #define WMI_PEER_STATS_TX_FRAME_CTRL_GET(flag) \
14660     WMI_GET_BITS(flag, 0, 16)
14661 #define WMI_PEER_STATS_TX_QOS_CTRL_SET(flag, val) \
14662     WMI_SET_BITS(flag, 16, 16, val)
14663 #define WMI_PEER_STATS_TX_QOS_CTRL_GET(flag) \
14664     WMI_GET_BITS(flag, 16, 16)
14665 
14666 #define WMI_PEER_STATS_CONSEC_FAIL_SET(flag, val) \
14667     WMI_SET_BITS(flag, 0, 16, val)
14668 #define WMI_PEER_STATS_CONSEC_FAIL_GET(flag) \
14669     WMI_GET_BITS(flag, 0, 16)
14670 #define WMI_PEER_STATS_SUBFRAME_SIZE_SET(flag, val) \
14671     WMI_SET_BITS(flag, 16, 16, val)
14672 #define WMI_PEER_STATS_SUBFRAME_SIZE_GET(flag) \
14673     WMI_GET_BITS(flag, 16, 16)
14674 
14675 #define WMI_PEER_STATS_TX_FAIL_CNT_SET(flag, val) \
14676     WMI_SET_BITS(flag, 0, 16, val)
14677 #define WMI_PEER_STATS_TX_FAIL_CNT_GET(flag) \
14678     WMI_GET_BITS(flag, 0, 16)
14679 #define WMI_PEER_STATS_TX_PARTIAL_AID_SET(flag, val) \
14680     WMI_SET_BITS(flag, 16, 16, val)
14681 #define WMI_PEER_STATS_TX_PARTIAL_AID_GET(flag) \
14682     WMI_GET_BITS(flag, 16, 16)
14683 
14684 #define WMI_PEER_STATS_MAX_NSS_SET(flag, val) \
14685     WMI_SET_BITS(flag, 0, 8, val)
14686 #define WMI_PEER_STATS_MAX_NSS_GET(flag) \
14687     WMI_GET_BITS(flag, 0, 8)
14688 /* bits 31:8 unused/reserved */
14689 
14690 #define WMI_PEER_STATS_DEL_RESP_TO_HOST_SET(flag, val) \
14691     WMI_SET_BITS(flag, 0, 1, val)
14692 #define WMI_PEER_STATS_DEL_RESP_TO_HOST_GET(flag) \
14693     WMI_GET_BITS(flag, 0, 1)
14694 #define WMI_PEER_STATS_DELETE_IN_PROGRESS_SET(flag, val) \
14695     WMI_SET_BITS(flag, 1, 1, val)
14696 #define WMI_PEER_STATS_DELETE_IN_PROGRESS_GET(flag) \
14697     WMI_GET_BITS(flag, 1, 1)
14698 #define WMI_PEER_STATS_MIGRATION_IN_PROGRESS_SET(flag, val) \
14699     WMI_SET_BITS(flag, 2, 1, val)
14700 #define WMI_PEER_STATS_MIGRATION_IN_PROGRESS_GET(flag) \
14701     WMI_GET_BITS(flag, 2, 1)
14702 #define WMI_PEER_STATS_CONN_STATE_SET(flag, val) \
14703     WMI_SET_BITS(flag, 3, 4, val)
14704 #define WMI_PEER_STATS_CONN_STATE_GET(flag) \
14705     WMI_GET_BITS(flag, 3, 4)
14706 #define WMI_PEER_STATS_TX_CHAIN_MASK_160_SET(flag, val) \
14707     WMI_SET_BITS(flag, 8, 8, val)
14708 #define WMI_PEER_STATS_TX_CHAIN_MASK_160_GET(flag) \
14709     WMI_GET_BITS(flag, 8, 8)
14710 #define WMI_PEER_STATS_TX_CHAIN_MASK_SET(flag, val) \
14711     WMI_SET_BITS(flag, 16, 8, val)
14712 #define WMI_PEER_STATS_TX_CHAIN_MASK_GET(flag) \
14713     WMI_GET_BITS(flag, 16, 8)
14714 #define WMI_PEER_STATS_ASSOC_CHAIN_MASK_SET(flag, val) \
14715     WMI_SET_BITS(flag, 24, 8, val)
14716 #define WMI_PEER_STATS_ASSOC_CHAIN_MASK_GET(flag) \
14717     WMI_GET_BITS(flag, 24, 8)
14718 
14719 #define WMI_PEER_STATS_QOS_NULL_OVER_WMI_SET(flag, val) \
14720     WMI_SET_BITS(flag, 0, 1, val)
14721 #define WMI_PEER_STATS_QOS_NULL_OVER_WMI_GET(flag) \
14722     WMI_GET_BITS(flag, 0, 1)
14723 #define WMI_PEER_STATS_NEW_ASSOC_SET(flag, val) \
14724     WMI_SET_BITS(flag, 1, 1, val)
14725 #define WMI_PEER_STATS_NEW_ASSOC_GET(flag) \
14726     WMI_GET_BITS(flag, 1, 1)
14727 #define WMI_PEER_STATS_TWT_FILT_FLAG_SET(flag, val) \
14728     WMI_SET_BITS(flag, 2, 1, val)
14729 #define WMI_PEER_STATS_TWT_FILT_FLAG_GET(flag) \
14730     WMI_GET_BITS(flag, 2, 1)
14731 #define WMI_PEER_STATS_TWT_REG_FLAG_SET(flag, val) \
14732     WMI_SET_BITS(flag, 3, 1, val)
14733 #define WMI_PEER_STATS_TWT_REG_FLAG_GET(flag) \
14734     WMI_GET_BITS(flag, 3, 1)
14735 #define WMI_PEER_STATS_WMM_UL_TRIG_FLAG_SET(flag, val) \
14736     WMI_SET_BITS(flag, 4, 1, val)
14737 #define WMI_PEER_STATS_WMM_UL_TRIG_FLAG_GET(flag) \
14738     WMI_GET_BITS(flag, 4, 1)
14739 #define WMI_PEER_STATS_ACTIVE_NOT_BA_TID_SET(flag, val) \
14740     WMI_SET_BITS(flag, 5, 4, val)
14741 #define WMI_PEER_STATS_ACTIVE_NOT_BA_TID_GET(flag) \
14742     WMI_GET_BITS(flag, 5, 4)
14743 /* bits 31:10 unused/reserved */
14744 
14745 #define WMI_PEER_STATS_NUM_LINKS_SET(flag, val) \
14746     WMI_SET_BITS(flag, 0, 2, val)
14747 #define WMI_PEER_STATS_NUM_LINKS_GET(flag) \
14748     WMI_GET_BITS(flag, 0, 2)
14749 #define WMI_PEER_STATS_ML_PEER_ID_SET(flag, val) \
14750     WMI_SET_BITS(flag, 2, 12, val)
14751 #define WMI_PEER_STATS_ML_PEER_ID_GET(flag) \
14752     WMI_GET_BITS(flag, 2, 12)
14753 #define WMI_PEER_STATS_PRI_LINK_ID_SET(flag, val) \
14754     WMI_SET_BITS(flag, 14, 3, val)
14755 #define WMI_PEER_STATS_PRI_LINK_ID_GET(flag) \
14756     WMI_GET_BITS(flag, 14, 3)
14757 #define WMI_PEER_STATS_PRI_CHIP_ID_SET(flag, val) \
14758     WMI_SET_BITS(flag, 17, 2, val)
14759 #define WMI_PEER_STATS_PRI_CHIP_ID_GET(flag) \
14760     WMI_GET_BITS(flag, 17, 2)
14761 #define WMI_PEER_STATS_LINK_INIT_CNT_SET(flag, val) \
14762     WMI_SET_BITS(flag, 19, 3, val)
14763 #define WMI_PEER_STATS_LINK_INIT_CNT_GET(flag) \
14764     WMI_GET_BITS(flag, 19, 3)
14765 #define WMI_PEER_STATS_NUM_LOCAL_LINKS_SET(flag, val) \
14766     WMI_SET_BITS(flag, 22, 2, val)
14767 #define WMI_PEER_STATS_NUM_LOCAL_LINKS_GET(flag) \
14768     WMI_GET_BITS(flag, 22, 2)
14769 #define WMI_PEER_STATS_CHIPS_BITMAP_SET(flag, val) \
14770     WMI_SET_BITS(flag, 24, 8, val)
14771 #define WMI_PEER_STATS_CHIPS_BITMAP_GET(flag) \
14772     WMI_GET_BITS(flag, 24, 8)
14773 
14774 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_VALID_SET(flag, val) \
14775     WMI_SET_BITS(flag, 0, 1, val)
14776 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_VALID_GET(flag) \
14777     WMI_GET_BITS(flag, 0, 1)
14778 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ACTIVE_SET(flag, val) \
14779     WMI_SET_BITS(flag, 1, 1, val)
14780 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ACTIVE_GET(flag) \
14781     WMI_GET_BITS(flag, 1, 1)
14782 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_PRI_SET(flag, val) \
14783     WMI_SET_BITS(flag, 2, 1, val)
14784 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_PRI_GET(flag) \
14785     WMI_GET_BITS(flag, 2, 1)
14786 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ASSOC_LINK_SET(flag, val) \
14787     WMI_SET_BITS(flag, 3, 1, val)
14788 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ASSOC_LINK_GET(flag) \
14789     WMI_GET_BITS(flag, 3, 1)
14790 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_CHIP_ID_SET(flag, val) \
14791     WMI_SET_BITS(flag, 4, 3, val)
14792 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_CHIP_ID_GET(flag) \
14793     WMI_GET_BITS(flag, 4, 3)
14794 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_IEEE_LINK_SET(flag, val) \
14795     WMI_SET_BITS(flag, 7, 8, val)
14796 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_IEEE_LINK_GET(flag) \
14797     WMI_GET_BITS(flag, 7, 8)
14798 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_HW_LINK_SET(flag, val) \
14799     WMI_SET_BITS(flag, 15, 3, val)
14800 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_HW_LINK_GET(flag) \
14801     WMI_GET_BITS(flag, 15, 3)
14802 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_LOGICAL_LINK_SET(flag, val) \
14803     WMI_SET_BITS(flag, 18, 2, val)
14804 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_LOGICAL_LINK_GET(flag) \
14805     WMI_GET_BITS(flag, 18, 2)
14806 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_MASTER_LINK_SET(flag, val) \
14807     WMI_SET_BITS(flag, 20, 1, val)
14808 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_MASTER_LINK_GET(flag) \
14809     WMI_GET_BITS(flag, 20, 1)
14810 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ANCHOR_LINK_SET(flag, val) \
14811     WMI_SET_BITS(flag, 21, 1, val)
14812 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_ANCHOR_LINK_GET(flag) \
14813     WMI_GET_BITS(flag, 21, 1)
14814 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_INIT_SET(flag, val) \
14815     WMI_SET_BITS(flag, 22, 1, val)
14816 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_INIT_GET(flag) \
14817     WMI_GET_BITS(flag, 22, 1)
14818 /* bits 31:23 unused/reserved */
14819 
14820 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_PEER_ID_SET(flag, val) \
14821     WMI_SET_BITS(flag, 0, 16, val)
14822 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_PEER_ID_GET(flag) \
14823     WMI_GET_BITS(flag, 0, 16)
14824 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_VDEV_ID_SET(flag, val) \
14825     WMI_SET_BITS(flag, 16, 8, val)
14826 #define WMI_PEER_STATS_ML_PEER_LINK_INFO_VDEV_ID_GET(flag) \
14827     WMI_GET_BITS(flag, 16, 8)
14828 /* bits 31:24 unused/reserved */
14829 
14830 #define WMI_PEER_STATS_NSS_160_SET(flag, val) \
14831     WMI_SET_BITS(flag, 0, 8, val)
14832 #define WMI_PEER_STATS_NSS_160_GET(flag) \
14833     WMI_GET_BITS(flag, 0, 8)
14834 #define WMI_PEER_STATS_RC_PHYMODE_SET(flag, val) \
14835     WMI_SET_BITS(flag, 8, 8, val)
14836 #define WMI_PEER_STATS_RC_PHYMODE_GET(flag) \
14837     WMI_GET_BITS(flag, 8, 8)
14838 #define WMI_PEER_STATS_LEGACY_RATE_SET(flag, val) \
14839     WMI_SET_BITS(flag, 16, 16, val)
14840 #define WMI_PEER_STATS_LEGACY_RATE_GET(flag) \
14841     WMI_GET_BITS(flag, 16, 16)
14842 
14843 #define WMI_PEER_STATS_MIN_DATA_RATE_SET(flag, val) \
14844     WMI_SET_BITS(flag, 0, 8, val)
14845 #define WMI_PEER_STATS_MIN_DATA_RATE_GET(flag) \
14846     WMI_GET_BITS(flag, 0, 8)
14847 #define WMI_PEER_STATS_VHT_MAX_RATE_SET(flag, val) \
14848     WMI_SET_BITS(flag, 8, 4, val)
14849 #define WMI_PEER_STATS_VHT_MAX_RATE_GET(flag) \
14850     WMI_GET_BITS(flag, 8, 4)
14851 #define WMI_PEER_STATS_VHT_MAX_STREAMS_SET(flag, val) \
14852     WMI_SET_BITS(flag, 12, 4, val)
14853 #define WMI_PEER_STATS_VHT_MAX_STREAMS_GET(flag) \
14854     WMI_GET_BITS(flag, 12, 4)
14855 #define WMI_PEER_STATS_RC_CHAN_FREQ_SET(flag, val) \
14856     WMI_SET_BITS(flag, 16, 16, val)
14857 #define WMI_PEER_STATS_RC_CHAN_FREQ_GET(flag) \
14858     WMI_GET_BITS(flag, 16, 16)
14859 
14860 
14861 typedef struct {
14862     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_cfr_stats_struct */
14863     A_UINT32 tlv_header;
14864     /* blanking_mode:
14865      * blanking configuration. Refer to WMI_SCAN_BLANKING_MODE
14866      */
14867     A_UINT32 blanking_mode;
14868     /* is_blanking_enabled:
14869      * current blanking status. 0 = disabled, 1 = enabled
14870      */
14871     A_UINT32 is_blanking_enabled;
14872     A_UINT32 gate_2g_enabled; /* 2.4GHZ gate pin state */
14873     A_UINT32 gate_5g_enabled; /* 5GHz gate pin state */
14874     A_UINT32 gate_6g_enabled; /* 6GHz gate pin state */
14875     A_UINT32 blanking_count; /* scan radio blanking count */
14876     A_UINT32 blanking_duration; /* scan radio blanking duration in us */
14877 } wmi_ctrl_path_blanking_stats_struct;
14878 
14879 typedef struct {
14880     /** TLV tag and len; tag equals
14881     *  WMITLV_TAG_STRUC_wmi_ctrl_path_stats_event_fixed_param */
14882     A_UINT32 tlv_header;
14883     /** Request ID */
14884     A_UINT32 request_id;
14885     /** more flag
14886      *  1 - More events sent after this event.
14887      *  0 - no more events after this event.
14888      */
14889     A_UINT32 more;
14890     /** status:
14891      * The status field's value shows whether the WMI_REQUEST_CTRL_PATH_STATS
14892      * request was completed successfully,
14893      *     0 - status is success
14894      *     1 - status is failure
14895      */
14896     A_UINT32 status;
14897     /** This TLV is (optionally) followed by TLV arrays containing
14898      *  different types of stats:
14899      *  1.  wmi_ctrl_path_pdev_stats_struct ctrl_path_pdev_stats[];
14900      *      This TLV array contains zero or more pdev stats instances.
14901      *  2.  wmi_vdev_extd_stats vdev_extd_stats[];
14902      *      This TLV array contains zero or more vdev_extd_stats instances.
14903      */
14904 } wmi_ctrl_path_stats_event_fixed_param;
14905 
14906 typedef struct {
14907     /** TLV tag and len; tag equals
14908      * WMITLV_TAG_STRUC_wmi_halphy_ctrl_path_stats_event_fixed_param
14909      */
14910     A_UINT32 tlv_header;
14911 
14912     /** Process id requested */
14913     A_UINT32 request_id;
14914 
14915     /* end_of_event - single event or Multiple Event */
14916     A_UINT32 end_of_event;
14917 
14918     /*
14919      * event_count - If Multiple Events are send, this is to identify
14920      * particular event out of Multiple Events that are send to host
14921      */
14922     A_UINT32 event_count;
14923 
14924     /** Pdev id requested */
14925     A_UINT32 pdev_id;
14926 } wmi_halphy_ctrl_path_stats_event_fixed_param;
14927 
14928 typedef struct {
14929     /** TLV tag and len; tag equals
14930      *  WMITLV_TAG_STRUC_wmi_radio_chan_stats */
14931     A_UINT32 tlv_header;
14932     /** primary channel freq of the channel whose stats is sent */
14933     A_UINT32 chan_mhz;
14934     /** accumulation of time the radio is tuned to this channel,
14935      *  in units of microseconds */
14936     A_UINT32 on_chan_us;
14937     /** accumulation of the TX PPDU duration over the measurement period,
14938      *  in units of microseconds */
14939     A_UINT32 tx_duration_us;
14940     /** accumulation of the RX PPDU duration over the measurement period,
14941      *  in units of microseconds */
14942     A_UINT32 rx_duration_us;
14943     /** ratio of channel busy time to on_chan_us, in units of percent */
14944     A_UINT32 chan_busy_ratio;
14945     /** ratio of on_chan_us to the measurement period, in units of percent */
14946     A_UINT32 on_chan_ratio;
14947     /** measurement period, in units of microseconds */
14948     A_UINT32 measurement_period_us;
14949     /** MPDUs transmitted on this channel */
14950     A_UINT32 tx_mpdus;
14951     /** MSDUs transmitted on this channel */
14952     A_UINT32 tx_msdus;
14953     /** MPDUS successfully received on this channel */
14954     A_UINT32 rx_succ_mpdus;
14955     /** Failed MPDUs (CRC failures) received on this channel */
14956     A_UINT32 rx_fail_mpdus;
14957 } wmi_radio_chan_stats;
14958 
14959 typedef struct {
14960     /** TLV tag and len; tag equals
14961      *  WMITLV_TAG_STRUC_wmi_radio_chan_stats_event_fixed_param */
14962     A_UINT32 tlv_header;
14963     /** number of channel stats in radio_chan_stats[] */
14964     A_UINT32 num_chans;
14965     /* This TLV is followed by another TLV of array of structs
14966      * wmi_radio_chan_stats radio_chan_stats[];
14967      */
14968 } wmi_radio_chan_stats_event_fixed_param;
14969 
14970 /**
14971  *  PDEV statistics
14972  *
14973  *  This struct incorporates the wlan_dbg_stats struct, which is
14974  *  conditionally defined, based on the AR900B flag.
14975  *  The below _v1 struct variant is the unconditional definition
14976  *  that matches what would be conditionally defined by builds that
14977  *  don't use the AR900B flag.  The _v2 struct variant is the
14978  *  unconditional definition that matches what would be conditionally
14979  *  defined by builds that use the AR900B flag.
14980  *  The _v2 struct def can be used within host or target builds
14981  *  that don't use the AR900B flag, but needs to interoperate with a
14982  *  target or host build that does use the AR900B flag.
14983  *  Similarly, the _v1 struct def can be used by a host or target build
14984  *  that does use the AR900B flag, but needs to interoperate with a
14985  *  target or host build that doesn't use the AR900B flag.
14986  *
14987  *  For backwards compatibility, wmi_pdev_stats is still (conditionally)
14988  *  defined, as an alias for either the _v1 or _v2 variant.
14989  */
14990 typedef struct {
14991     /** Channel noise floor */
14992     A_INT32 chan_nf;
14993     /** TX frame count */
14994     A_UINT32 tx_frame_count;
14995     /** RX frame count */
14996     A_UINT32 rx_frame_count;
14997     /** rx clear count */
14998     A_UINT32 rx_clear_count;
14999     /** cycle count */
15000     A_UINT32 cycle_count;
15001     /** Phy error count */
15002     A_UINT32 phy_err_count;
15003     /** Channel Tx Power */
15004     A_UINT32 chan_tx_pwr;
15005     /** WAL dbg stats */
15006     struct wlan_dbg_stats_v1 pdev_stats;
15007 } wmi_pdev_stats_v1;
15008 
15009 typedef struct {
15010     /** Channel noise floor */
15011     A_INT32 chan_nf;
15012     /** TX frame count */
15013     A_UINT32 tx_frame_count;
15014     /** RX frame count */
15015     A_UINT32 rx_frame_count;
15016     /** rx clear count */
15017     A_UINT32 rx_clear_count;
15018     /** cycle count */
15019     A_UINT32 cycle_count;
15020     /** Phy error count */
15021     A_UINT32 phy_err_count;
15022     /** Channel Tx Power */
15023     A_UINT32 chan_tx_pwr;
15024     /** WAL dbg stats */
15025     struct wlan_dbg_stats_v2 pdev_stats;
15026 } wmi_pdev_stats_v2;
15027 
15028 #if defined(AR900B)
15029 #define wmi_pdev_stats wmi_pdev_stats_v2
15030 #else
15031 #define wmi_pdev_stats wmi_pdev_stats_v1
15032 #endif
15033 
15034 /**
15035  *  pdev extension statistics
15036  */
15037 typedef struct {
15038     A_UINT32 tlv_header;
15039     /* pdev id */
15040     A_UINT32 pdev_id;
15041     /** my_rx_count
15042      * What portion of time, as measured by the MAC HW clock was occupied
15043      * by receiving PPDUs addressed to one of the vdevs within this pdev.
15044      */
15045     A_UINT32 my_rx_count;
15046     /** rx_matched_11ax_msdu_cnt
15047      * number of Rx 11ax MSDUs with matching BSS color counter
15048      * updated at EOP (end of packet)
15049      */
15050     A_UINT32 rx_matched_11ax_msdu_cnt;
15051     /** rx_other_11ax_msdu_cnt
15052      * number of Rx 11ax MSDUs with other BSS color counter updated at EOP
15053      * (end of packet)
15054      */
15055     A_UINT32 rx_other_11ax_msdu_cnt;
15056 } wmi_pdev_extd_stats;
15057 
15058 /**
15059  *  pdev telemetry statistics
15060  */
15061 typedef struct{
15062     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_telemetry_stats */
15063     A_UINT32 pdev_id;
15064     /*
15065      * Average channel latency per AC, units in micro seconds.
15066      * avg_chan_lat_per_ac[0] : AC_VO
15067      * avg_chan_lat_per_ac[1] : AC_VI
15068      * avg_chan_lat_per_ac[2] : AC_BE
15069      * avg_chan_lat_per_ac[3] : AC_BK
15070      */
15071     A_UINT32 avg_chan_lat_per_ac[WMI_AC_MAX];
15072     /*
15073      * Percentage of air time available for each AC, units in percentage.
15074      * BIT[0-7]   : AC_BE
15075      * BIT[8-15]  : AC_BK
15076      * BIT[16-23] : AC_VI
15077      * BIT[24-31] : AC_VO
15078      * Please refer to WMI_ESP_ESTIMATE_GET_* and WMI_ESP_ESTIMATE_SET_* macros
15079      * to retrieve values for each access category in estimated_air_time_per_ac.
15080      */
15081     A_UINT32 estimated_air_time_per_ac;
15082 } wmi_pdev_telemetry_stats;
15083 
15084 /**
15085  *  VDEV statistics
15086  *  @todo
15087  *  add all VDEV stats here
15088  */
15089 
15090 typedef struct {
15091     A_INT32 bcn_snr;
15092     A_INT32 dat_snr;
15093 } wmi_snr_info;
15094 
15095 typedef struct {
15096     /** unique id identifying the VDEV, generated by the caller */
15097     A_UINT32 vdev_id;
15098     wmi_snr_info vdev_snr;
15099     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) */
15100     A_UINT32 rx_frm_cnt; /* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast) */
15101     A_UINT32 multiple_retry_cnt[WLAN_MAX_AC]; /* The number of MSDU packets and MMPDU frames per AC
15102      that the 802.11 station successfully transmitted after more than one retransmission attempt */
15103     A_UINT32 fail_cnt[WLAN_MAX_AC]; /* Total number packets(per AC) failed to transmit */
15104     A_UINT32 rts_fail_cnt; /* Total number of RTS/CTS sequence failures for transmission of a packet */
15105     A_UINT32 rts_succ_cnt; /* Total number of RTS/CTS sequence success for transmission of a packet */
15106     A_UINT32 rx_err_cnt; /* The receive error count. HAL will provide the RxP FCS error global */
15107     A_UINT32 rx_discard_cnt; /* The sum of the receive error count and dropped-receive-buffer error count. (FCS error) */
15108     A_UINT32 ack_fail_cnt; /* Total number packets failed transmit because of no ACK from the remote entity */
15109     A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES];/*History of last ten transmit rate, in units of 500 kbit/sec */
15110     A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES];/*History of last ten Beacon RSSI of the connected Bss */
15111 } wmi_vdev_stats;
15112 
15113 /*
15114  * vdev ext stats with additional bcn stats
15115  * (Due to backward compatibility requirements, these new stats fields cannot be
15116  * added inside wmi_vdev_stats.)
15117  */
15118 typedef struct {
15119     A_UINT32 vdev_id;
15120     A_UINT32 tx_bcn_succ_cnt; /* Total number of beacon frame transmitted successfully */
15121     A_UINT32 tx_bcn_outage_cnt; /* Total number of failed beacons */
15122 } wmi_bcn_stats;
15123 
15124 #define WMI_VDEV_STATS_FLAGS_LINK_ACTIVE_FLAG_IS_VALID_BIT 0
15125 #define WMI_VDEV_STATS_FLAGS_LINK_ACTIVE_FLAG_IS_VALID_MASK \
15126     (1 << WMI_VDEV_STATS_FLAGS_LINK_ACTIVE_FLAG_IS_VALID_BIT)
15127 
15128 #define WMI_VDEV_STATS_FLAGS_IS_LINK_ACTIVE_BIT 1
15129 #define WMI_VDEV_STATS_FLAGS_IS_LINK_ACTIVE_MASK \
15130     (1 << WMI_VDEV_STATS_FLAGS_IS_LINK_ACTIVE_BIT)
15131 
15132 /**
15133  *  vdev extension statistics
15134  */
15135 typedef struct {
15136     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_vdev_extd_stats */
15137     A_UINT32 tlv_header;
15138     /* vdev id */
15139     A_UINT32 vdev_id;
15140     /* Total number of Fils Discovery frames transmitted successfully */
15141     A_UINT32 fd_succ_cnt;
15142     /* Total number of Fils Discovery frames failed */
15143     A_UINT32 fd_fail_cnt;
15144     /* Total number of unsolicited probe response frames transmitted successfully */
15145     A_UINT32 unsolicited_prb_succ_cnt;
15146     /* Total number of unsolicited probe response frames failed */
15147     A_UINT32 unsolicited_prb_fail_cnt;
15148     /* vdev info flags:
15149      * bit 0: WMI_VDEV_STATS_FLAGS_LINK_ACTIVE_FLAG_IS_VALID,
15150      *     0: the "is link active" flag is not valid
15151      *     1: the "is link active" flag is valid
15152      * bit 1: WMI_VDEV_STATS_FLAGS_IS_LINK_ACTIVE,
15153      *     1:link_active; 0:link_inactive
15154      * Refer to WMI_VDEV_STATS_FLAGS_ defs.
15155      */
15156     A_UINT32 flags;
15157     A_INT32 vdev_tx_power; /* dBm units */
15158 } wmi_vdev_extd_stats;
15159 
15160 /**
15161  * Vdev debug stats to be used for wmi control path stats.
15162  * This is an extension to vdev_extd_stats,
15163  * vdev_extd_stats display is part of apstats.
15164  */
15165 typedef struct {
15166     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_vdev_stats_struct */
15167     A_UINT32 tlv_header;
15168     /* vdev id */
15169     A_UINT32 vdev_id;
15170     /** opaque_debug_wal_vdev_flags:
15171      * This will contain the value from wal_vdev wal vdev flags for vdev state
15172      */
15173     A_UINT32 opaque_debug_wal_vdev_flags;
15174     /** control flags for this vdev */
15175     A_UINT32 opaque_debug_vdev_flags;
15176     /**  vdevid of transmitted AP (mbssid case) */
15177     A_UINT32 opaque_debug_vdevid_trans;
15178     /** opaque_debug_profile_idx:
15179      * the profile index of the connected non-trans ap (mbssid case).
15180      * 0 means invalid.
15181      */
15182     A_UINT32 opaque_debug_profile_idx;
15183     /** opaque_debug_profile_num:
15184      * the total profile numbers of non-trans aps (mbssid case).
15185      * 0 means legacy AP.
15186      */
15187     A_UINT32 opaque_debug_profile_num;
15188     /* Contains the value of multi_vdev_restart status */
15189     A_UINT32 opaque_debug_multi_vdev_restart;
15190     /* Contains the value of created mac_id from wal_vdev */
15191     A_UINT32 opaque_debug_created_mac_id;
15192     /* Contains the value of consecutive count of the leaky AP */
15193     A_UINT32 opaque_debug_consec_detect_leaky_ap_cnt;
15194     /* Contains the value of Vdev manager debug flags */
15195     A_UINT32 opaque_debug_vdev_mgr_dbg_flags;
15196     /* Contains the value of max vdev pause delay in microseconds */
15197     A_UINT32 opaque_debug_max_pause_delay_us;
15198     /* opaque_debug_sta_offset:
15199      * Contains the value of the offset of vdev TSF with BI (vdev_tsf%BI)
15200      * for STA vdev.
15201      */
15202     A_UINT32 opaque_debug_sta_offset;
15203     /* Contains the value of vdev pn sequence receive filter */
15204     A_UINT32 opaque_debug_vdev_pn_rx_filter;
15205     /* Contains the value of config params */
15206     A_UINT32 opaque_debug_traffic_config;
15207     /* opaque_debug_he_bss_rts_thld_tu:
15208      * Contains Period of time in units for a non-AP STA to reserve the medium.
15209      */
15210     A_UINT32 opaque_debug_he_bss_rts_thld_tu;
15211     /* opaque_debug_rts_threshold:
15212      * Contains the value of Request to Send (RTS) Threshold of the packet size.
15213      */
15214     A_UINT32 opaque_debug_rts_threshold; /* dot11RTSThreshold */
15215     /* Contains the value of Tx failure count threshold */
15216     A_UINT32 opaque_debug_tx_fail_cnt_thres;
15217     /* Contains the value of ratio = HI_WORD/LO_WORD */
15218     A_UINT32 opaque_debug_mu_edca_sifs_ratio;
15219     /* opaque_debug_kickout_th:
15220      * Contains the value of kickout threshold that denotes units of
15221      * lost block acks of consecutive tx failure threshold.
15222      */
15223     A_UINT32 opaque_debug_kickout_th;
15224     /* opaque_debug_rate_dd_bmap:
15225      * Contains the value of per vap config related to VAP aggregation
15226      * of ratectrl drop-down limits.
15227      */
15228     A_UINT32 opaque_debug_rate_dd_bmap;
15229     /* Contains the value of Maximum Transmission Unit frame size */
15230     A_UINT32 opaque_debug_mtu_size;
15231     /* Contains the value of vdev event bitmap from wal_vdev */
15232     A_UINT32 opaque_debug_event_bitmap;
15233     /* Contains the value of peer event bitmap from wal_vdev */
15234     A_UINT32 opaque_debug_peer_event_bitmap;
15235     /* Contains the value of Sched config of vdev allowed time during ATF */
15236     A_UINT32 opaque_debug_atf_vdev_allowed_time;
15237     /* opaque_debug_atf_vdev_used_unallocated_time:
15238      * Contains the value of Sched config of vdev used unallocated time
15239      * during ATF.
15240      */
15241     A_UINT32 opaque_debug_atf_vdev_used_unallocated_time;
15242     /* Contains the value of Sched config of vdev unused time during ATF */
15243     A_UINT32 opaque_debug_atf_vdev_unused_time;
15244     /* Contains the value of Carrier frequency offset last programmed time */
15245     A_UINT32 opaque_debug_last_prog_time;
15246     /* Contains the value of Carrier frequency offset last receive time */
15247     A_UINT32 opaque_debug_last_recv_time;
15248     /* Contains the value of Packet count of received frames on the channel */
15249     A_UINT32 opaque_debug_rx_pkt_on_channel;
15250     /* Contains the value of Target beacon transmission time offset value */
15251     A_UINT32 opaque_debug_tbtt_offset;
15252     /* Contains the value of tid pause bitmap of the peer from wal_vdev */
15253     A_UINT32 opaque_debug_peer_all_tid_pause_bitmap;
15254     /* Contains the value of tid block bitmap of the peer from wal_vdev */
15255     A_UINT32 opaque_debug_peer_all_tid_block_bitmap;
15256     /* Contains the value of tdls peer kickout threshold */
15257     A_UINT32 opaque_debug_tdls_peer_kickout_th;
15258     /* opaque_debug_num_of_remote_peers_connected:
15259      * Contains the value of num_of_remote_peers_connected;
15260      * Below field is valid only for AP vap.
15261      */
15262     A_UINT32 opaque_debug_num_of_remote_peers_connected;
15263     /* Contains the value of num of Multi group key support */
15264     A_UINT32 opaque_debug_num_group_key_enabled;
15265     /* Contains the value of delete all peer command flags */
15266     A_UINT32 opaque_debug_delete_all_peer_flags;
15267     /* Contains the value of Keepalive ARP sender address time */
15268     A_UINT32 opaque_debug_keepalive_arp_sender_ipv4;
15269     /* Contains the value of Keepalive ARP Target address time */
15270     A_UINT32 opaque_debug_keepalive_arp_target_ipv4;
15271     /* Contains the value of Keepalive interval duration time */
15272     A_UINT32 opaque_debug_keepalive_interval;
15273     /* Contains the value of Keepalive start timer timestamp */
15274     A_UINT32 opaque_debug_keepalive_timer_start_timestamp;
15275     /* Contains the value of max idle interval and status of STA */
15276     A_UINT32 opaque_debug_sta_maxidle_interval;
15277     A_UINT32 opaque_debug_sta_maxidle_method;
15278     /* Contains the value of Timing synchronization function (TSF) time diff */
15279     A_UINT32 opaque_debug_tsf_curr_time_diff;
15280     /* opaque_debug_sleep_duration_us:
15281      * Contains the value of Time in microsends to detect sleep duration
15282      * of the client.
15283      */
15284     A_UINT32 opaque_debug_sleep_duration_us;
15285     /* Contains the value of pause start time and to calculate pause delay */
15286     A_UINT32 opaque_debug_pause_start_time_us;
15287     A_UINT32 opaque_debug_pause_delay_us;
15288     /* Contains the value of number of supported group key */
15289     A_UINT32 opaque_debug_num_supported_group_key;
15290     /* opaque_debug_avg_data_null_tx_delay:
15291      * Contains the value of Average time taken to calculate data frame
15292      * tx delay.
15293      */
15294     A_UINT32 opaque_debug_avg_data_null_tx_delay;
15295     /* opaque_debug_avg_rx_leak_window:
15296      * Contains the value of Average time taken to calculate data frame
15297      * in receive window.
15298      */
15299     A_UINT32 opaque_debug_avg_rx_leak_window;
15300     /* Contains the value of count for number of received deauth frames */
15301     A_UINT32 opaque_debug_num_recv_deauth;
15302     /* Contains the value of Beacon interval in microseconds */
15303     A_UINT32 opaque_debug_bcn_intval_us;
15304     /* opaque_debug_fils_period
15305      * Contains the value of us, period configured through
15306      * WMI_ENABLE_FILS_CMDID.
15307      */
15308     A_UINT32 opaque_debug_fils_period;
15309     /* Contains the value of previous Timing synchronization function (TSF) */
15310     A_UINT32 opaque_debug_prev_tsf;
15311     /* Contains the value of time taken during client sleep */
15312     A_UINT32 opaque_debug_sleep_entry_time;
15313     /* Contains the value of Total sleep duration from wal_vdev */
15314     A_UINT32 opaque_debug_tot_sleep_dur;
15315     /* Contains the value of Vdev pause bitmap from wal_vdev */
15316     A_UINT32 opaque_debug_pause_bitmap;
15317     /* opaque_debug_last_send_to_host_deauth_tsf:
15318      * Contains the value of Last TSF time last_send_to_host_deauth_tsf
15319      * from wlan_vdev.
15320      */
15321     A_UINT32 opaque_debug_last_send_to_host_deauth_tsf;
15322     /* Contains the value of debug_short_ssid from wlan_vdev */
15323     A_UINT32 opaque_debug_short_ssid;
15324     /* Bitfield macro's expansion variables */
15325     /* opaque_debug_vdev_amsdu_bitfield:
15326      * bit  7:0  - Contains the value of dis_dyn_bw_rts from wlan_vdev,
15327      *     15:8  - max_amsdu,
15328      *     23:16 - def_amsdu,
15329      *     31:24 - he_bss_color
15330      */
15331     A_UINT32 opaque_debug_vdev_amsdu_bitfield;
15332     /* opaque_debug_vdev_ac_failure_configs:
15333      * bit  7:0  - Contains the value of dhe_def_pe_duratio from wal_vdev,
15334      *     15:8  - minimum_allowed_mcs,
15335      *     23:16 - max_11ac_to_leg_rts_fallback_th,
15336      *     31:24 - max_11ac_rts_consec_failure_th
15337      */
15338     A_UINT32 opaque_debug_vdev_ac_failure_configs;
15339     /* opaque_debug_vdev_pkt_type_info:
15340      * bit  7:0  - Contains the value of input_pkt_type from wal_vdev,
15341      *     15:8  - recv_pkt_type,
15342      *     23:16 - disable_intra_fwd,
15343      *     31:24 - ps_awake
15344      */
15345     A_UINT32 opaque_debug_vdev_pkt_type_info;
15346     /* opaque_debug_vdev_ba_param_bitfield:
15347      * bit  7:0  - Contains the value of snr_cal_count from wal_vdev,
15348      *     15:8  - amsdu_auto_enable,
15349      *     23:16 - param_ba_timeout,
15350      *     31:24 - param_ba_buffer_size
15351      */
15352     A_UINT32 opaque_debug_vdev_ba_param_bitfield;
15353     /* opaque_debug_vdev_aggr_bitfield:
15354      * bit  7:0  - Contains the value of param_amsdu_support from wal_vdev,
15355      *     15:8  - param_ba_retry_max,
15356      *     23:16 - tx_aggr_size,
15357      *     31:24 - rx_aggr_size
15358      */
15359     A_UINT32 opaque_debug_vdev_aggr_bitfield;
15360     /* opaque_debug_vdev_event_delivery:
15361      * bit  7:0  - Contains the value of tqm_bypass_enabled from wal_vdev,
15362      *     15:8  - wmmac_timer_vote_cnt,
15363      *     23:16 - peer_event_delivery_in_progress,
15364      *     31:24 - vdev_event_delivery_in_progress
15365      */
15366     A_UINT32 opaque_debug_vdev_event_delivery;
15367      /* opaque_debug_vdev_cap_slot_bitfield:
15368      * bit  7:0  - Contains the value of bcn_max_slot from wal_vdev,
15369      *     15:8  - bcn_curr_slot,
15370      *     23:16 - mgmt_tx_power,
15371      *     31:24 - mbssid_capable_association
15372      */
15373     A_UINT32 opaque_debug_vdev_cap_slot_bitfield;
15374     /* opaque_debug_vdev_bcn_configs:
15375      * bit  7:0  - Contains the value of mbssid_txbssid_association from
15376      *             wal_vdev,
15377      *     15:8  - consec_beacon_skip,
15378      *     23:16 - consec_beacon_skip_cnt,
15379      *     31:24 - max_consec_beacon_skip
15380      */
15381     A_UINT32 opaque_debug_vdev_bcn_configs;
15382     /* Contains the value of opaque_debug_vdev_cmd_info */
15383     A_UINT32 opaque_debug_vdev_cmd_info;
15384     /* opaque_debug_vdev_mac_configs:
15385      * bit  7:0  - Contains the value of pause_cnt from wlan_vdev,
15386      *     15:8  - e_mac_id,
15387      *     23:16 - is_transmit_bssid,
15388      *     31:24 - rts_rc_flag
15389      */
15390     A_UINT32 opaque_debug_vdev_mac_configs;
15391     /* opaque_debug_vdev_mode_configs:
15392      * bit  7:0  - Contains the value of ic_opmode from wlan_vdev,
15393      *     15:8  - ic_subopmode,
15394      *     23:16 - ic_curmode,
15395      *     31:24 - vdev_up_cmd_cnt
15396      */
15397     A_UINT32 opaque_debug_vdev_mode_configs;
15398     /* opaque_debug_vdev_keepalive_bitfields:
15399      * bit  7:0  - keepalive_method
15400      *     15:8  - keepalive_prohibit_data_mgmt
15401      *     23:16 - resp_type
15402      *     31:24 - ap_detect_out_of_sync_sleeping_sta_time_secs
15403      */
15404     A_UINT32 opaque_debug_vdev_keepalive_bitfields;
15405     /* opaque_debug_vdev_bcn_drift_info:
15406      * bit  7:0  - bcn_drift_cnt
15407      *     15:8  - bcn_drift_calibration
15408      *     23:16 - rts_cts_default
15409      *     31:24 - vdev_down_cmd_cnt
15410      */
15411     A_UINT32 opaque_debug_vdev_bcn_drift_info;
15412     /* opaque_debug_vdev_arp_configs:
15413      * bit  7:0  - Contains the value of tbtt_link_type from wlan_vdev,
15414      *     15:8  - is_arp_in_air,
15415      *     23:16 - is_ns_in_air,
15416      *     31:24 - num_of_keepalive_attempts
15417      */
15418     A_UINT32 opaque_debug_vdev_arp_configs;
15419     /* opaque_debug_vdev_streams_configs:
15420      * bit  7:0  - n_beacons_since_last_rssi_report
15421      *     15:8  - num_ofld_peer_alloced
15422      *     23:16 - preferred_tx_streams
15423      *     31:24 - preferred_rx_streams
15424      */
15425     A_UINT32 opaque_debug_vdev_streams_configs;
15426     /* opaque_debug_vdev_chains_configs:
15427      * bit  7:0  - Contains the value of preferred_tx_streams_160 from
15428      *             wlan_vdev,
15429      *     15:8  - preferred_rx_streams_160,
15430      *     23:16 - tx_chains_num_11b,
15431      *     31:24 - tx_chains_num_11ag
15432      */
15433     A_UINT32 opaque_debug_vdev_chains_configs;
15434     /* opaque_debug_vdev_power_cap_configs:
15435      * bit  7:0  - Contains the value of supp_op_cls_ie_len from wlan_vdev,
15436      *     15:8  - rm_en_cap_ie_len,
15437      *     23:16 - power_cap_ie_len,
15438      *     31:24 - supp_channel_ie_len
15439      */
15440     A_UINT32 opaque_debug_vdev_power_cap_configs;
15441     /* opaque_debug_vdev_wmm_mbo_configs:
15442      * bit  7:0  - Contains the value of wmm_tspec_ie_len from wlan_vdev,
15443      *     15:8  - ccx_version_ie_len,
15444      *     23:16 - extn_dh_ie_len,
15445      *     31:24 - mbo_ie_len
15446      */
15447     A_UINT32 opaque_debug_vdev_wmm_mbo_configs;
15448     /* opaque_debug_vdev_remote_configs:
15449      * bit  7:0  - Contains the value of rsnxe_ie_len from wlan_vdev,
15450      *     15:8  - remote_peer_cnt
15451      *     23:16 - p2p_cli_pause_type
15452      *     31:24 - mu_edca_update_count
15453      */
15454     A_UINT32 opaque_debug_vdev_remote_configs;
15455     /* opaque_debug_vdev_stats_id_configs:
15456      * bit  7:0  - vdev_stats_id
15457      *     15:8  - vdev_stats_id_valid
15458      *     23:16 - preferred_tx_streams_320
15459      *     31:24 - preferred_rx_streams_320
15460      */
15461     A_UINT32 opaque_debug_vdev_stats_id_configs;
15462     /* opaque_debug_vdev_assoc_peer_configs:
15463      * bit  7:0  - unused / reserved
15464      *     15:8  - group_cipher
15465      *     31:16 - assoc_id
15466      */
15467     A_UINT32 opaque_debug_vdev_assoc_peer_configs;
15468     /* opaque_debug_vdev_mhz_fils_configs:
15469      * bit 15:0  - Contains the value of bss_channel_mhz from wal_vdev,
15470      *     31:16 - config_fils_period
15471      */
15472     A_UINT32 opaque_debug_vdev_mhz_fils_configs;
15473     /* opaque_debug_vdev_fils_period:
15474      * bit 15:0  - Contains the value of calc_fils_period from wal_vdev,
15475      *     31:16 - ic_txseqs_cmn
15476      */
15477     A_UINT32 opaque_debug_vdev_fils_period;
15478     /* opaque_debug_vdev_inactive_time:
15479      * bit 15:0  - Contains the value of
15480      *             ap_keepalive_min_idle_inactive_time_secs from wlan_vdev,
15481      *     31:16 - ap_keepalive_max_idle_inactive_time_secs
15482      */
15483     A_UINT32 opaque_debug_vdev_inactive_time;
15484     /* opaque_debug_vdev_chain_mask_configs:
15485      * bit 15:0  - Contains the value of
15486      *             ap_keepalive_max_unresponsive_time_secs from wlan_vdev,
15487      *     31:16 - chain_mask
15488      */
15489     A_UINT32 opaque_debug_vdev_chain_mask_configs;
15490     /* opaque_debug_vdev_ie_len_configs:
15491      * bit 15:0  - num_mcast_filters
15492      *     31:16 - ext_cap_ie_len
15493      */
15494     A_UINT32 opaque_debug_vdev_ie_len_configs;
15495     /* opaque_debug_vdev_fils_configs:
15496      * bit 15:0  - Contains the value of fils_channel_guard_time from wlan_vdev,
15497      *     31:16 - fd_tmpl_len
15498      */
15499     A_UINT32 opaque_debug_vdev_fils_configs;
15500     /* opaque_debug_vdev_chan_configs:
15501      * bit 15:0  - Contains the value of common_rsn_caps from wlan_vdev,
15502      *     31:16 - off_ch_active_dwell_time
15503      */
15504     A_UINT32 opaque_debug_vdev_chan_configs;
15505     /* opaque_debug_vdev_dwell_configs:
15506      * bit 15:0  - Contains the value of off_ch_passive_dwell_time from
15507      *             wlan_vdev,
15508      *     31:16 - current_pause_request_id
15509      */
15510     A_UINT32 opaque_debug_vdev_dwell_configs;
15511     /* opaque_debug_vdev_wmi_configs:
15512      * bit  0 - Contains the value of hide_ssid_enable from wlan_vdev,
15513      *      1 - b_none_protocol_paused
15514      *      2 - dpd_cal_state
15515      *      4 - req_bcn_q_unpause
15516      *      5 - bt_coex_enable_cts2s
15517      *      6 - dpd_delay_n_beacon
15518      *      8 - b_need_check_first_beacon
15519      *      9 - ap_peer_keepalive_max_idle_time_reached
15520      *     10 - leakyap_cts2s_enable
15521      *     11 - stasapscc_in_mcc
15522      *     12 - stasapscc_in_mcc_cts2s_enable
15523      *     13 - is_vdev_stopping
15524      *     14 - is_wmi_vdev_down
15525      *     15 - is_vdev_down_pending
15526      *     16 - vdev_delete_in_progress
15527      *     17 - cac_enabled
15528      *     18 - is_quaterrate
15529      *     19 - is_halfrate
15530      *     20 - stop_resp_event_blocked
15531      *     21 - use_enhanced_mcast_filter
15532      *     22 - is_start_pending_on_asm
15533      *     23 - no_null_to_ap_for_roaming
15534      *     24 - is_loopback_cal_pending
15535      *     25 - vdev_delete_acked
15536      *     26 - bc_proberesp_enable
15537      *     27 - is_wmm_param
15538      *     28 - is_connect_in_progress
15539      *     29 - is_mu_edca_param
15540      *     30 - send_del_resp_tohost
15541      *     31 - is_restart_different_ch
15542      */
15543     A_UINT32 opaque_debug_vdev_wmi_configs;
15544     /* opaque_debug_vdev_hu_mu_configs:
15545      * bit     0 - Contains the value of proto_ps_status from wlan_vdev,
15546      *         1 - smps_intolerant
15547      *         2 - is_offload_registered_for_connection
15548      *         3 - is_bss_beacon_offload_registered
15549      *         4 - is_prob_resp_offload_registered
15550      *         5 - is_ibss_beacon_offload_registered
15551      *         6 - is_keepalive_attempts_exhausted
15552      *         7 - is_bcn_tx_ie_changed_log
15553      *         8 - he_su_bfee
15554      *         9 - he_su_bfer
15555      *        10 - he_mu_bfee
15556      *        11 - he_mu_bfer
15557      *        12 - he_dl_ofdma
15558      *        13 - he_ul_ofdma
15559      *        14 - he_ul_mumimo
15560      *        15 - ul_mu_resp
15561      *     23:16 - alt_rssi_non_srg
15562      *     31:24 - alt_rssi_srg
15563      */
15564     A_UINT32 opaque_debug_vdev_hu_mu_configs;
15565     /* opaque_debug_vdev_sm_chan_configs:
15566      * bit    0 - Contains the value of he_bss_color_en from wlan_vdev,
15567      *        1 - he_txbf_ofdma
15568      *        2 - non_srg_enable
15569      *        3 - srg_enable
15570      *        4 - srp_enable
15571      *        5 - sr_initialized
15572      *        6 - sr_rings_initialized
15573      *     10:7 - per_ac_obss_pd_enable
15574      *       11 - ifup
15575      *       12 - ifactive
15576      *       13 - ifpaused
15577      *       14 - ifoutofsync
15578      *       15 - is_free
15579      *       16 - is_nawds
15580      *       17 - hw_flag
15581      *       18 - ch_req_flag
15582      *       20 - restart_resp
15583      *       21 - first_beacon_recv_wait
15584      *       22 - erpenabled
15585      *       23 - start_responded
15586      *       24 - bcn_sync_crit_req_act
15587      *       25 - recal_notif_registered
15588      *       26 - bcn_tx_paused
15589      *       27 - he_bss_color_en_bypass
15590      *       28 - default_ba_mode
15591      *       29 - ba_256_bitmap_enable
15592      *       30 - ba_256_bitmap_tx_disable
15593      *       31 - is_multi_group_key_enabled
15594      */
15595     A_UINT32 opaque_debug_vdev_sm_chan_configs;
15596     /*
15597      * The following 4 opaque_debug variables are provided purely for
15598      * debugging by technicians who have outside knowledge of what kind of
15599      * values the target has placed into these fields.
15600      * The host must not interpret the values of these fields, since the
15601      * meaning of the values provided in these fields may change without
15602      * regard for backwards compatibility or interoperability.
15603      */
15604     A_UINT32 opaque_debug_field_1;
15605     A_UINT32 opaque_debug_field_2;
15606     A_UINT32 opaque_debug_field_3;
15607     A_UINT32 opaque_debug_field_4;
15608 } wmi_ctrl_path_vdev_stats_struct;
15609 
15610 
15611 #define WMI_VDEV_STATS_DIS_DYN_BW_RTS_SET(flag, val) \
15612     WMI_SET_BITS(flag, 0, 8, val)
15613 #define WMI_VDEV_STATS_DIS_DYN_BW_RTS_GET(flag) \
15614     WMI_GET_BITS(flag, 0, 8)
15615 #define WMI_VDEV_STATS_MAX_AMSDU_SET(flag, val) \
15616     WMI_SET_BITS(flag, 8, 8, val)
15617 #define WMI_VDEV_STATS_MAX_AMSDU_GET(flag) \
15618     WMI_GET_BITS(flag, 8, 8)
15619 #define WMI_VDEV_STATS_DEF_AMSDU_SET(flag, val) \
15620     WMI_SET_BITS(flag, 16, 8, val)
15621 #define WMI_VDEV_STATS_DEF_AMSDU_GET(flag) \
15622     WMI_GET_BITS(flag, 16, 8)
15623 #define WMI_VDEV_STATS_HW_BSS_COLOR_SET(flag, val) \
15624     WMI_SET_BITS(flag, 24, 8, val)
15625 #define WMI_VDEV_STATS_HW_BSS_COLOR_GET(flag) \
15626     WMI_GET_BITS(flag, 24, 8)
15627 
15628 #define WMI_VDEV_STATS_HE_DEF_PE_DURATION_SET(flag, val) \
15629     WMI_SET_BITS(flag, 0, 8, val)
15630 #define WMI_VDEV_STATS_HE_DEF_PE_DURATION_GET(flag) \
15631     WMI_GET_BITS(flag, 0, 8)
15632 #define WMI_VDEV_STATS_MINIMUM_ALLOWED_MCS_SET(flag, val) \
15633     WMI_SET_BITS(flag, 8, 8, val)
15634 #define WMI_VDEV_STATS_MINIMUM_ALLOWED_MCS_GET(flag) \
15635     WMI_GET_BITS(flag, 8, 8)
15636 #define WMI_VDEV_STATS_MAX_11AC_TO_LEG_RTS_FALLBACK_TH_SET(flag, val) \
15637     WMI_SET_BITS(flag, 16, 8, val)
15638 #define WMI_VDEV_STATS_MAX_11AC_TO_LEG_RTS_FALLBACK_TH_GET(flag) \
15639     WMI_GET_BITS(flag, 16, 8)
15640 #define WMI_VDEV_STATS_MAX_11AC_RTS_CONSEC_FAILURE_SET(flag, val) \
15641     WMI_SET_BITS(flag, 24, 8, val)
15642 #define WMI_VDEV_STATS_MAX_11AC_RTS_CONSEC_FAILURE_GET(flag) \
15643     WMI_GET_BITS(flag, 24, 8)
15644 
15645 #define WMI_VDEV_STATS_INPUT_PKT_TYPE_SET(flag, val) \
15646     WMI_SET_BITS(flag, 0, 8, val)
15647 #define WMI_VDEV_STATS_INPUT_PKT_TYPE_GET(flag) \
15648     WMI_GET_BITS(flag, 0, 8)
15649 #define WMI_VDEV_STATS_RECV_PKT_TYPE_SET(flag, val) \
15650     WMI_SET_BITS(flag, 8, 8, val)
15651 #define WMI_VDEV_STATS_RECV_PKT_TYPE_GET(flag) \
15652     WMI_GET_BITS(flag, 8, 8)
15653 #define WMI_VDEV_STATS_DISABLE_INTRA_FWD_SET(flag, val) \
15654     WMI_SET_BITS(flag, 16, 8, val)
15655 #define WMI_VDEV_STATS_DISABLE_INTRA_FWD_GET(flag) \
15656     WMI_GET_BITS(flag, 16, 8)
15657 #define WMI_VDEV_STATS_PS_AWAKE_SET(flag, val) \
15658     WMI_SET_BITS(flag, 24, 8, val)
15659 #define WMI_VDEV_STATS_PS_AWAKE_GET(flag) \
15660     WMI_GET_BITS(flag, 24, 8)
15661 
15662 #define WMI_VDEV_STATS_SNR_CAL_COUNT_SET(flag, val) \
15663     WMI_SET_BITS(flag, 0, 8, val)
15664 #define WMI_VDEV_STATS_SNR_CAL_COUNT_GET(flag) \
15665     WMI_GET_BITS(flag, 0, 8)
15666 #define WMI_VDEV_STATS_AMSDU_AUTO_ENABLE_SET(flag, val) \
15667     WMI_SET_BITS(flag, 8, 8, val)
15668 #define WMI_VDEV_STATS_AMSDU_AUTO_ENABLE_GET(flag) \
15669     WMI_GET_BITS(flag, 8, 8)
15670 #define WMI_VDEV_STATS_PARAM_BA_TIMEOUT_SET(flag, val) \
15671     WMI_SET_BITS(flag, 16, 8, val)
15672 #define WMI_VDEV_STATS_PARAM_BA_TIMEOUT_GET(flag) \
15673     WMI_GET_BITS(flag, 16, 8)
15674 #define WMI_VDEV_STATS_PARAM_BA_BUFFER_SIZE_SET(flag, val) \
15675     WMI_SET_BITS(flag, 24, 8, val)
15676 #define WMI_VDEV_STATS_PARAM_BA_BUFFER_SIZE_GET(flag) \
15677     WMI_GET_BITS(flag, 24, 8)
15678 
15679 #define WMI_VDEV_STATS_PARAM_AMSDU_SUPPORT_SET(flag, val) \
15680     WMI_SET_BITS(flag, 0, 8, val)
15681 #define WMI_VDEV_STATS_PARAM_AMSDU_SUPPORT_GET(flag) \
15682     WMI_GET_BITS(flag, 0, 8)
15683 #define WMI_VDEV_STATS_PARAM_BA_RETRY_MAX_SET(flag, val) \
15684     WMI_SET_BITS(flag, 8, 8, val)
15685 #define WMI_VDEV_STATS_PARAM_BA_RETRY_MAX_GET(flag) \
15686     WMI_GET_BITS(flag, 8, 8)
15687 #define WMI_VDEV_STATS_TX_AGGR_SIZE_SET(flag, val) \
15688     WMI_SET_BITS(flag, 16, 8, val)
15689 #define WMI_VDEV_STATS_TX_AGGR_SIZE_GET(flag) \
15690     WMI_GET_BITS(flag, 16, 8)
15691 #define WMI_VDEV_STATS_RX_AGGR_SIZE_SET(flag, val) \
15692     WMI_SET_BITS(flag, 24, 8, val)
15693 #define WMI_VDEV_STATS_RX_AGGR_SIZE_GET(flag) \
15694     WMI_GET_BITS(flag, 24, 8)
15695 
15696 #define WMI_VDEV_STATS_TQM_BYPASS_ENABLED_SET(flag, val) \
15697     WMI_SET_BITS(flag, 0, 8, val)
15698 #define WMI_VDEV_STATS_TQM_BYPASS_ENABLED_GET(flag) \
15699     WMI_GET_BITS(flag, 0, 8)
15700 #define WMI_VDEV_STATS_WMMAC_TIMER_VOTE_CNT_SET(flag, val) \
15701     WMI_SET_BITS(flag, 8, 8, val)
15702 #define WMI_VDEV_STATS_WMMAC_TIMER_VOTE_CNT_GET(flag) \
15703     WMI_GET_BITS(flag, 8, 8)
15704 #define WMI_VDEV_STATS_PEER_EVENT_DELIVERY_IN_PROGRESS_SET(flag, val) \
15705     WMI_SET_BITS(flag, 16, 8, val)
15706 #define WMI_VDEV_STATS_PEER_EVENT_DELIVERY_IN_PROGRESS_GET(flag) \
15707     WMI_GET_BITS(flag, 16, 8)
15708 #define WMI_VDEV_STATS_VDEV_EVENT_DELIVERY_IN_PROGRESS_SET(flag, val) \
15709     WMI_SET_BITS(flag, 24, 8, val)
15710 #define WMI_VDEV_STATS_VDEV_EVENT_DELIVERY_IN_PROGRESS_GET(flag) \
15711     WMI_GET_BITS(flag, 24, 8)
15712 
15713 #define WMI_VDEV_STATS_BCN_MAX_SLOT_SET(flag, val) \
15714     WMI_SET_BITS(flag, 0, 8, val)
15715 #define WMI_VDEV_STATS_BCN_MAX_SLOT_GET(flag) \
15716     WMI_GET_BITS(flag, 0, 8)
15717 #define WMI_VDEV_STATS_BCN_CURR_SLOT_SET(flag, val) \
15718     WMI_SET_BITS(flag, 8, 8, val)
15719 #define WMI_VDEV_STATS_BCN_CURR_SLOT_GET(flag) \
15720     WMI_GET_BITS(flag, 8, 8)
15721 #define WMI_VDEV_STATS_MGMT_TX_POWER_SET(flag, val) \
15722     WMI_SET_BITS(flag, 16, 8, val)
15723 #define WMI_VDEV_STATS_MGMT_TX_POWER_GET(flag) \
15724     WMI_GET_BITS(flag, 16, 8)
15725 #define WMI_VDEV_STATS_MBSSID_CAPABLE_ASSOCIATION_SET(flag, val) \
15726     WMI_SET_BITS(flag, 24, 8, val)
15727 #define WMI_VDEV_STATS_MBSSID_CAPABLE_ASSOCIATION_GET(flag) \
15728     WMI_GET_BITS(flag, 24, 8)
15729 
15730 #define WMI_VDEV_STATS_MBSSID_TXBSSID_ASSOCIATION_SET(flag, val) \
15731     WMI_SET_BITS(flag, 0, 8, val)
15732 #define WMI_VDEV_STATS_MBSSID_TXBSSID_ASSOCIATION_GET(flag) \
15733     WMI_GET_BITS(flag, 0, 8)
15734 #define WMI_VDEV_STATS_CONSEC_BEACON_SKIP_SET(flag, val) \
15735     WMI_SET_BITS(flag, 8, 8, val)
15736 #define WMI_VDEV_STATS_CONSEC_BEACON_SKIP_GET(flag) \
15737     WMI_GET_BITS(flag, 8, 8)
15738 #define WMI_VDEV_STATS_CONSEC_BEACON_SKIP_CNT_SET(flag, val) \
15739     WMI_SET_BITS(flag, 16, 8, val)
15740 #define WMI_VDEV_STATS_CONSEC_BEACON_SKIP_CNT_GET(flag) \
15741     WMI_GET_BITS(flag, 16, 8)
15742 #define WMI_VDEV_STATS_MAX_CONSEC_BEACON_SKIP_SET(flag, val) \
15743     WMI_SET_BITS(flag, 24, 8, val)
15744 #define WMI_VDEV_STATS_MAX_CONSEC_BEACON_SKIP_GET(flag) \
15745     WMI_GET_BITS(flag, 24, 8)
15746 
15747 #define WMI_VDEV_STATS_BCN_DRIFT_CNT_SET(flag, val) \
15748     WMI_SET_BITS(flag, 0, 8, val)
15749 #define WMI_VDEV_STATS_BCN_DRIFT_CNT_GET(flag) \
15750     WMI_GET_BITS(flag, 0, 8)
15751 #define WMI_VDEV_STATS_BCN_DRIFT_CALIBRATION_SET(flag, val) \
15752     WMI_SET_BITS(flag, 8, 8, val)
15753 #define WMI_VDEV_STATS_BCN_DRIFT_CALIBRATION_GET(flag) \
15754     WMI_GET_BITS(flag, 8, 8)
15755 #define WMI_VDEV_STATS_VDEV_DOWN_CMD_CNT_SET(flag, val) \
15756     WMI_SET_BITS(flag, 16, 8, val)
15757 #define WMI_VDEV_STATS_VDEV_DOWN_CMD_CNT_GET(flag) \
15758     WMI_GET_BITS(flag, 16, 8)
15759 #define WMI_VDEV_STATS_RTS_CTS_DEFAULT_SET(flag, val) \
15760     WMI_SET_BITS(flag, 24, 8, val)
15761 #define WMI_VDEV_STATS_RTS_CTS_DEFAULT_GET(flag) \
15762     WMI_GET_BITS(flag, 24, 8)
15763 
15764 #define WMI_VDEV_STATS_PAUSE_CNT_SET(flag, val) \
15765     WMI_SET_BITS(flag, 0, 8, val)
15766 #define WMI_VDEV_STATS_PAUSE_CNT_GET(flag) \
15767     WMI_GET_BITS(flag, 0, 8)
15768 #define WMI_VDEV_STATS_E_MAC_ID_SET(flag, val) \
15769     WMI_SET_BITS(flag, 8, 8, val)
15770 #define WMI_VDEV_STATS_E_MAC_ID_GET(flag) \
15771     WMI_GET_BITS(flag, 8, 8)
15772 #define WMI_VDEV_STATS_IS_TRANSMIT_BSSID_SET(flag, val) \
15773     WMI_SET_BITS(flag, 16, 8, val)
15774 #define WMI_VDEV_STATS_IS_TRANSMIT_BSSID_GET(flag) \
15775     WMI_GET_BITS(flag, 16, 8)
15776 #define WMI_VDEV_STATS_RTS_RC_FLAG_SET(flag, val) \
15777     WMI_SET_BITS(flag, 24, 8, val)
15778 #define WMI_VDEV_STATS_RTS_RC_FLAG_GET(flag) \
15779     WMI_GET_BITS(flag, 24, 8)
15780 
15781 #define WMI_VDEV_STATS_IC_OPMODE_SET(flag, val) \
15782     WMI_SET_BITS(flag, 0, 8, val)
15783 #define WMI_VDEV_STATS_IC_OPMODE_GET(flag) \
15784     WMI_GET_BITS(flag, 0, 8)
15785 #define WMI_VDEV_STATS_IC_SUBOPMODE_SET(flag, val) \
15786     WMI_SET_BITS(flag, 8, 8, val)
15787 #define WMI_VDEV_STATS_IC_SUBOPMODE_GET(flag) \
15788     WMI_GET_BITS(flag, 8, 8)
15789 #define WMI_VDEV_STATS_IC_CURMODE_SET(flag, val) \
15790     WMI_SET_BITS(flag, 16, 8, val)
15791 #define WMI_VDEV_STATS_IC_CURMODE_GET(flag) \
15792     WMI_GET_BITS(flag, 16, 8)
15793 #define WMI_VDEV_STATS_VDEV_UP_CMD_CNT_SET(flag, val) \
15794     WMI_SET_BITS(flag, 24, 8, val)
15795 #define WMI_VDEV_STATS_VDEV_UP_CMD_CNT_GET(flag) \
15796     WMI_GET_BITS(flag, 24, 8)
15797 
15798 #define WMI_VDEV_STATS_KEEPALIVE_METHOD_SET(flag, val) \
15799     WMI_SET_BITS(flag, 0, 8, val)
15800 #define WMI_VDEV_STATS_KEEPALIVE_METHOD_GET(flag) \
15801     WMI_GET_BITS(flag, 0, 8)
15802 #define WMI_VDEV_STATS_KEEPALIVE_PROHIBIT_DATA_MGMT_SET(flag, val) \
15803     WMI_SET_BITS(flag, 8, 8, val)
15804 #define WMI_VDEV_STATS_KEEPALIVE_PROHIBIT_DATA_MGMT_GET(flag) \
15805     WMI_GET_BITS(flag, 8, 8)
15806 #define WMI_VDEV_STATS_RESP_TYPE_SET(flag, val) \
15807     WMI_SET_BITS(flag, 16, 8, val)
15808 #define WMI_VDEV_STATS_RESP_TYPE_GET(flag) \
15809     WMI_GET_BITS(flag, 16, 8)
15810 #define WMI_VDEV_STATS_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS_SET(flag, val) \
15811     WMI_SET_BITS(flag, 24, 8, val)
15812 #define WMI_VDEV_STATS_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS_GET(flag) \
15813     WMI_GET_BITS(flag, 24, 8)
15814 
15815 #define WMI_VDEV_STATS_BCN_DRIFT_CNT_SET(flag, val) \
15816     WMI_SET_BITS(flag, 0, 8, val)
15817 #define WMI_VDEV_STATS_BCN_DRIFT_CNT_GET(flag) \
15818     WMI_GET_BITS(flag, 0, 8)
15819 #define WMI_VDEV_STATS_BCN_DRIFT_CALIBRATION_SET(flag, val) \
15820     WMI_SET_BITS(flag, 8, 8, val)
15821 #define WMI_VDEV_STATS_BCN_DRIFT_CALIBRATION_GET(flag) \
15822     WMI_GET_BITS(flag, 8, 8)
15823 #define WMI_VDEV_STATS_VDEV_DOWN_CMD_CNT_SET(flag, val) \
15824     WMI_SET_BITS(flag, 16, 8, val)
15825 #define WMI_VDEV_STATS_VDEV_DOWN_CMD_CNT_GET(flag) \
15826     WMI_GET_BITS(flag, 16, 8)
15827 #define WMI_VDEV_STATS_RTS_CTS_DEFAULT_SET(flag, val) \
15828     WMI_SET_BITS(flag, 24, 8, val)
15829 #define WMI_VDEV_STATS_RTS_CTS_DEFAULT_GET(flag) \
15830     WMI_GET_BITS(flag, 24, 8)
15831 
15832 #define WMI_VDEV_STATS_TBTT_LINK_TYPE_SET(flag, val) \
15833     WMI_SET_BITS(flag, 0, 8, val)
15834 #define WMI_VDEV_STATS_TBTT_LINK_TYPE_GET(flag) \
15835     WMI_GET_BITS(flag, 0, 8)
15836 #define WMI_VDEV_STATS_IS_ARP_IN_AIR_SET(flag, val) \
15837     WMI_SET_BITS(flag, 8, 8, val)
15838 #define WMI_VDEV_STATS_IS_ARP_IN_AIR_GET(flag) \
15839     WMI_GET_BITS(flag, 8, 8)
15840 #define WMI_VDEV_STATS_IS_NS_IN_AIR_SET(flag, val) \
15841     WMI_SET_BITS(flag, 16, 8, val)
15842 #define WMI_VDEV_STATS_IS_NS_IN_AIR_GET(flag) \
15843     WMI_GET_BITS(flag, 16, 8)
15844 #define WMI_VDEV_STATS_NUM_OF_KEEPALIVE_ATTEMPTS_SET(flag, val) \
15845     WMI_SET_BITS(flag, 24, 8, val)
15846 #define WMI_VDEV_STATS_NUM_OF_KEEPALIVE_ATTEMPTS_GET(flag) \
15847     WMI_GET_BITS(flag, 24, 8)
15848 
15849 #define WMI_VDEV_STATS_N_BEACONS_SINCE_LAST_RSSI_REPORT_SET(flag, val) \
15850     WMI_SET_BITS(flag, 0, 8, val)
15851 #define WMI_VDEV_STATS_N_BEACONS_SINCE_LAST_RSSI_REPORT_GET(flag) \
15852     WMI_GET_BITS(flag, 0, 8)
15853 #define WMI_VDEV_STATS_NUM_OFLD_PEER_ALLOCED_SET(flag, val) \
15854     WMI_SET_BITS(flag, 8, 8, val)
15855 #define WMI_VDEV_STATS_NUM_OFLD_PEER_ALLOCED_GET(flag) \
15856     WMI_GET_BITS(flag, 8, 8)
15857 #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_SET(flag, val) \
15858     WMI_SET_BITS(flag, 16, 8, val)
15859 #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_GET(flag) \
15860     WMI_GET_BITS(flag, 16, 8)
15861 #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_SET(flag, val) \
15862     WMI_SET_BITS(flag, 24, 8, val)
15863 #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_GET(flag) \
15864     WMI_GET_BITS(flag, 24, 8)
15865 
15866 #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_160_SET(flag, val) \
15867     WMI_SET_BITS(flag, 0, 8, val)
15868 #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_160_GET(flag) \
15869     WMI_GET_BITS(flag, 0, 8)
15870 #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_160_SET(flag, val) \
15871     WMI_SET_BITS(flag, 8, 8, val)
15872 #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_160_GET(flag) \
15873     WMI_GET_BITS(flag, 8, 8)
15874 #define WMI_VDEV_STATS_TX_CHAINS_NUM_11B_SET(flag, val) \
15875     WMI_SET_BITS(flag, 16, 8, val)
15876 #define WMI_VDEV_STATS_TX_CHAINS_NUM_11B_GET(flag) \
15877     WMI_GET_BITS(flag, 16, 8)
15878 #define WMI_VDEV_STATS_TX_CHAINS_NUM_11AG_SET(flag, val) \
15879     WMI_SET_BITS(flag, 24, 8, val)
15880 #define WMI_VDEV_STATS_TX_CHAINS_NUM_11AG_GET(flag) \
15881     WMI_GET_BITS(flag, 24, 8)
15882 
15883 #define WMI_VDEV_STATS_SUPP_OP_CLS_IE_LEN_SET(flag, val) \
15884     WMI_SET_BITS(flag, 0, 8, val)
15885 #define WMI_VDEV_STATS_SUPP_OP_CLS_IE_LEN_GET(flag) \
15886     WMI_GET_BITS(flag, 0, 8)
15887 #define WMI_VDEV_STATS_RM_EN_CAP_IE_LEN_SET(flag, val) \
15888     WMI_SET_BITS(flag, 8, 8, val)
15889 #define WMI_VDEV_STATS_RM_EN_CAP_IE_LEN_GET(flag) \
15890     WMI_GET_BITS(flag, 8, 8)
15891 #define WMI_VDEV_STATS_POWER_CAP_IE_LEN_SET(flag, val) \
15892     WMI_SET_BITS(flag, 16, 8, val)
15893 #define WMI_VDEV_STATS_POWER_CAP_IE_LEN_GET(flag) \
15894     WMI_GET_BITS(flag, 16, 8)
15895 #define WMI_VDEV_STATS_SUPP_CHANNEL_IE_LEN_SET(flag, val) \
15896     WMI_SET_BITS(flag, 24, 8, val)
15897 #define WMI_VDEV_STATS_SUPP_CHANNEL_IE_LEN_GET(flag) \
15898     WMI_GET_BITS(flag, 24, 8)
15899 
15900 #define WMI_VDEV_STATS_WMM_TSPEC_IE_LEN_SET(flag, val) \
15901     WMI_SET_BITS(flag, 0, 8, val)
15902 #define WMI_VDEV_STATS_WMM_TSPEC_IE_LEN_GET(flag) \
15903     WMI_GET_BITS(flag, 0, 8)
15904 #define WMI_VDEV_STATS_CCX_VERSION_IE_LEN_SET(flag, val) \
15905     WMI_SET_BITS(flag, 8, 8, val)
15906 #define WMI_VDEV_STATS_CCX_VERSION_IE_LEN_GET(flag) \
15907     WMI_GET_BITS(flag, 8, 8)
15908 #define WMI_VDEV_STATS_EXTN_DH_IE_LEN_SET(flag, val) \
15909     WMI_SET_BITS(flag, 16, 8, val)
15910 #define WMI_VDEV_STATS_EXTN_DH_IE_LEN_GET(flag) \
15911     WMI_GET_BITS(flag, 16, 8)
15912 #define WMI_VDEV_STATS_MBO_IE_LEN_SET(flag, val) \
15913     WMI_SET_BITS(flag, 24, 8, val)
15914 #define WMI_VDEV_STATS_MBO_IE_LEN_GET(flag) \
15915     WMI_GET_BITS(flag, 24, 8)
15916 
15917 #define WMI_VDEV_STATS_RSNXE_IE_LEN_SET(flag, val) \
15918     WMI_SET_BITS(flag, 0, 8, val)
15919 #define WMI_VDEV_STATS_RSNXE_IE_LEN_GET(flag) \
15920     WMI_GET_BITS(flag, 0, 8)
15921 #define WMI_VDEV_STATS_REMOTE_PEER_CNT_SET(flag, val) \
15922     WMI_SET_BITS(flag, 8, 8, val)
15923 #define WMI_VDEV_STATS_REMOTE_PEER_CNT_GET(flag) \
15924     WMI_GET_BITS(flag, 8, 8)
15925 #define WMI_VDEV_STATS_P2P_CLI_PAUSE_TYPE_SET(flag, val) \
15926     WMI_SET_BITS(flag, 16, 8, val)
15927 #define WMI_VDEV_STATS_P2P_CLI_PAUSE_TYPE_GET(flag) \
15928     WMI_GET_BITS(flag, 16, 8)
15929 #define WMI_VDEV_STATS_MU_EDCA_UPDATE_COUNT_SET(flag, val) \
15930     WMI_SET_BITS(flag, 24, 8, val)
15931 #define WMI_VDEV_STATS_MU_EDCA_UPDATE_COUNT_GET(flag) \
15932     WMI_GET_BITS(flag, 24, 8)
15933 
15934 #define WMI_VDEV_STATS_ID_SET(flag, val) \
15935     WMI_SET_BITS(flag, 0, 8, val)
15936 #define WMI_VDEV_STATS_ID_GET(flag) \
15937     WMI_GET_BITS(flag, 0, 8)
15938 #define WMI_VDEV_STATS_ID_VALID_SET(flag, val) \
15939     WMI_SET_BITS(flag, 8, 8, val)
15940 #define WMI_VDEV_STATS_ID_VALID_GET(flag) \
15941     WMI_GET_BITS(flag, 8, 8)
15942 #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_320_SET(flag, val) \
15943     WMI_SET_BITS(flag, 16, 8, val)
15944 #define WMI_VDEV_STATS_PREFERRED_TX_STREAMS_320_GET(flag) \
15945     WMI_GET_BITS(flag, 16, 8)
15946 #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_320_SET(flag, val) \
15947     WMI_SET_BITS(flag, 24, 8, val)
15948 #define WMI_VDEV_STATS_PREFERRED_RX_STREAMS_320_GET(flag) \
15949     WMI_GET_BITS(flag, 24, 8)
15950 
15951 /* bits 7:0 unused / reserved */
15952 #define WMI_VDEV_STATS_GROUP_CIPHER_SET(flag, val) \
15953     WMI_SET_BITS(flag, 8, 8, val)
15954 #define WMI_VDEV_STATS_GROUP_CIPHER_GET(flag) \
15955     WMI_GET_BITS(flag, 8, 8)
15956 #define WMI_VDEV_STATS_ASSOC_ID_SET(flag, val) \
15957     WMI_SET_BITS(flag, 16, 16, val)
15958 #define WMI_VDEV_STATS_ASSOC_ID_GET(flag) \
15959     WMI_GET_BITS(flag, 16, 16)
15960 
15961 #define WMI_VDEV_STATS_BSS_CHANNEL_MHZ_SET(flag, val) \
15962     WMI_SET_BITS(flag, 0, 16, val)
15963 #define WMI_VDEV_STATS_BSS_CHANNEL_MHZ_GET(flag) \
15964     WMI_GET_BITS(flag, 0, 16)
15965 #define WMI_VDEV_STATS_CONFIG_FILS_PERIOD_SET(flag, val) \
15966     WMI_SET_BITS(flag, 16, 16, val)
15967 #define WMI_VDEV_STATS_CONFIG_FILS_PERIOD_GET(flag) \
15968     WMI_GET_BITS(flag, 16, 16)
15969 
15970 #define WMI_VDEV_STATS_CALC_FILS_PERIOD_SET(flag, val) \
15971     WMI_SET_BITS(flag, 0, 16, val)
15972 #define WMI_VDEV_STATS_CALC_FILS_PERIOD_GET(flag) \
15973     WMI_GET_BITS(flag, 0, 16)
15974 #define WMI_VDEV_STATS_IC_TXSEQS_CMN_SET(flag, val) \
15975     WMI_SET_BITS(flag, 16, 16, val)
15976 #define WMI_VDEV_STATS_IC_TXSEQS_CMN_GET(flag) \
15977     WMI_GET_BITS(flag, 16, 16)
15978 
15979 #define WMI_VDEV_STATS_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS_SET(flag, val) \
15980     WMI_SET_BITS(flag, 0, 16, val)
15981 #define WMI_VDEV_STATS_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS_GET(flag) \
15982     WMI_GET_BITS(flag, 0, 16)
15983 #define WMI_VDEV_STATS_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS_SET(flag, val) \
15984     WMI_SET_BITS(flag, 16, 16, val)
15985 #define WMI_VDEV_STATS_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS_GET(flag) \
15986     WMI_GET_BITS(flag, 16, 16)
15987 
15988 #define WMI_VDEV_STATS_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS_SET(flag, val) \
15989     WMI_SET_BITS(flag, 0, 16, val)
15990 #define WMI_VDEV_STATS_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS_GET(flag) \
15991     WMI_GET_BITS(flag, 0, 16)
15992 #define WMI_VDEV_STATS_CHAIN_MASK_SET(flag, val) \
15993     WMI_SET_BITS(flag, 16, 16, val)
15994 #define WMI_VDEV_STATS_CHAIN_MASK_GET(flag) \
15995     WMI_GET_BITS(flag, 16, 16)
15996 
15997 #define WMI_VDEV_STATS_NUM_MCAST_FILTERS_SET(flag, val) \
15998     WMI_SET_BITS(flag, 0, 16, val)
15999 #define WMI_VDEV_STATS_NUM_MCAST_FILTERS_GET(flag) \
16000     WMI_GET_BITS(flag, 0, 16)
16001 #define WMI_VDEV_STATS_EXT_CAP_IE_LEN_SET(flag, val) \
16002     WMI_SET_BITS(flag, 16, 16, val)
16003 #define WMI_VDEV_STATS_EXT_CAP_IE_LEN_GET(flag) \
16004     WMI_GET_BITS(flag, 16, 16)
16005 
16006 #define WMI_VDEV_STATS_FILS_CHANNEL_GUARD_TIME_SET(flag, val) \
16007     WMI_SET_BITS(flag, 0, 16, val)
16008 #define WMI_VDEV_STATS_FILS_CHANNEL_GUARD_TIME_GET(flag) \
16009     WMI_GET_BITS(flag, 0, 16)
16010 #define WMI_VDEV_STATS_FD_TMPL_LEN_SET(flag, val) \
16011     WMI_SET_BITS(flag, 16, 16, val)
16012 #define WMI_VDEV_STATS_FD_TMPL_LEN_GET(flag) \
16013     WMI_GET_BITS(flag, 16, 16)
16014 
16015 #define WMI_VDEV_STATS_COMMON_RSN_CAPS_SET(flag, val) \
16016     WMI_SET_BITS(flag, 0, 16, val)
16017 #define WMI_VDEV_STATS_COMMON_RSN_CAPS_GET(flag) \
16018     WMI_GET_BITS(flag, 0, 16)
16019 #define WMI_VDEV_STATS_OFF_CH_ACTIVE_DWELL_TIME_SET(flag, val) \
16020     WMI_SET_BITS(flag, 16, 16, val)
16021 #define WMI_VDEV_STATS_OFF_CH_ACTIVE_DWELL_TIME_GET(flag) \
16022     WMI_GET_BITS(flag, 16, 16)
16023 
16024 #define WMI_VDEV_STATS_OFF_CH_PASSIVE_DWELL_TIME_SET(flag, val) \
16025     WMI_SET_BITS(flag, 0, 16, val)
16026 #define WMI_VDEV_STATS_OFF_CH_PASSIVE_DWELL_TIME_GET(flag) \
16027     WMI_GET_BITS(flag, 0, 16)
16028 #define WMI_VDEV_STATS_CURRENT_PAUSE_REQUEST_ID_SET(flag, val) \
16029     WMI_SET_BITS(flag, 16, 16, val)
16030 #define WMI_VDEV_STATS_CURRENT_PAUSE_REQUEST_ID_GET(flag) \
16031     WMI_GET_BITS(flag, 16, 16)
16032 
16033 #define WMI_VDEV_STATS_HIDE_SSID_ENABLE_SET(flag, val) \
16034     WMI_SET_BITS(flag, 0, 1, val)
16035 #define WMI_VDEV_STATS_HIDE_SSID_ENABLE_GET(flag) \
16036     WMI_GET_BITS(flag, 0, 1)
16037 #define WMI_VDEV_STATS_B_NONE_PROTOCOL_PAUSED_SET(flag, val) \
16038     WMI_SET_BITS(flag, 1, 1, val)
16039 #define WMI_VDEV_STATS_B_NONE_PROTOCOL_PAUSED_GET(flag) \
16040     WMI_GET_BITS(flag, 1, 1)
16041 #define WMI_VDEV_STATS_DPD_CAL_STATE_SET(flag, val) \
16042     WMI_SET_BITS(flag, 2, 2, val)
16043 #define WMI_VDEV_STATS_DPD_CAL_STATE_GET(flag) \
16044     WMI_GET_BITS(flag, 2, 2)
16045 #define WMI_VDEV_STATS_REQ_BCN_Q_UNPAUSE_SET(flag, val) \
16046     WMI_SET_BITS(flag, 4, 1, val)
16047 #define WMI_VDEV_STATS_REQ_BCN_Q_UNPAUSE_GET(flag) \
16048     WMI_GET_BITS(flag, 4, 1)
16049 #define WMI_VDEV_STATS_BT_COEX_ENABLE_CTS2S_SET(flag, val) \
16050     WMI_SET_BITS(flag, 5, 1, val)
16051 #define WMI_VDEV_STATS_BT_COEX_ENABLE_CTS2S_GET(flag) \
16052     WMI_GET_BITS(flag, 5, 1)
16053 #define WMI_VDEV_STATS_DPD_DELAY_N_BEACON_SET(flag, val) \
16054     WMI_SET_BITS(flag, 6, 2, val)
16055 #define WMI_VDEV_STATS_DPD_DELAY_N_BEACON_GET(flag) \
16056     WMI_GET_BITS(flag, 6, 2)
16057 #define WMI_VDEV_STATS_B_NEED_CHECK_FIRST_BEACON_SET(flag, val) \
16058     WMI_SET_BITS(flag, 8, 1, val)
16059 #define WMI_VDEV_STATS_B_NEED_CHECK_FIRST_BEACON_GET(flag) \
16060     WMI_GET_BITS(flag, 8, 1)
16061 #define WMI_VDEV_STATS_AP_PEER_KEEPALIVE_MAX_IDLE_TIME_REACHED_SET(flag, val) \
16062     WMI_SET_BITS(flag, 9, 1, val)
16063 #define WMI_VDEV_STATS_AP_PEER_KEEPALIVE_MAX_IDLE_TIME_REACHED_GET(flag) \
16064     WMI_GET_BITS(flag, 9, 1)
16065 #define WMI_VDEV_STATS_LEAKYAP_CTS2S_ENABLE_SET(flag, val) \
16066     WMI_SET_BITS(flag, 10, 1, val)
16067 #define WMI_VDEV_STATS_LEAKYAP_CTS2S_ENABLE_GET(flag) \
16068     WMI_GET_BITS(flag, 10, 1)
16069 #define WMI_VDEV_STATS_STASAPSCC_IN_MCC_SET(flag, val) \
16070     WMI_SET_BITS(flag, 11, 1, val)
16071 #define WMI_VDEV_STATS_STASAPSCC_IN_MCC_GET(flag) \
16072     WMI_GET_BITS(flag, 11, 1)
16073 #define WMI_VDEV_STATS_STASAPSCC_IN_MCC_CTS2S_ENABLE_SET(flag, val) \
16074     WMI_SET_BITS(flag, 12, 1, val)
16075 #define WMI_VDEV_STATS_STASAPSCC_IN_MCC_CTS2S_ENABLE_GET(flag) \
16076     WMI_GET_BITS(flag, 12, 1)
16077 #define WMI_VDEV_STATS_IS_VDEV_STOPPING_SET(flag, val) \
16078     WMI_SET_BITS(flag, 13, 1, val)
16079 #define WMI_VDEV_STATS_IS_VDEV_STOPPING_GET(flag) \
16080     WMI_GET_BITS(flag, 13, 1)
16081 #define WMI_VDEV_STATS_IS_WMI_VDEV_DOWN_SET(flag, val) \
16082     WMI_SET_BITS(flag, 14, 1, val)
16083 #define WMI_VDEV_STATS_IS_WMI_VDEV_DOWN_GET(flag) \
16084     WMI_GET_BITS(flag, 14, 1)
16085 #define WMI_VDEV_STATS_IS_VDEV_DOWN_PENDING_SET(flag, val) \
16086     WMI_SET_BITS(flag, 15, 1, val)
16087 #define WMI_VDEV_STATS_IS_VDEV_DOWN_PENDING_GET(flag) \
16088     WMI_GET_BITS(flag, 15, 1)
16089 #define WMI_VDEV_STATS_VDEV_DELETE_IN_PROGRESS_SET(flag, val) \
16090     WMI_SET_BITS(flag, 16, 1, val)
16091 #define WMI_VDEV_STATS_VDEV_DELETE_IN_PROGRESS_GET(flag) \
16092     WMI_GET_BITS(flag, 16, 1)
16093 #define WMI_VDEV_STATS_CAC_ENABLED_SET(flag, val) \
16094     WMI_SET_BITS(flag, 17, 1, val)
16095 #define WMI_VDEV_STATS_CAC_ENABLED_GET(flag) \
16096     WMI_GET_BITS(flag, 17, 1)
16097 #define WMI_VDEV_STATS_IS_QUATERRATE_SET(flag, val) \
16098     WMI_SET_BITS(flag, 18, 1, val)
16099 #define WMI_VDEV_STATS_IS_QUATERRATE_GET(flag) \
16100     WMI_GET_BITS(flag, 18, 1)
16101 #define WMI_VDEV_STATS_IS_HALFRATE_SET(flag, val) \
16102     WMI_SET_BITS(flag, 19, 1, val)
16103 #define WMI_VDEV_STATS_IS_HALFRATE_GET(flag) \
16104     WMI_GET_BITS(flag, 19, 1)
16105 #define WMI_VDEV_STATS_STOP_RESP_EVENT_BLOCKED_SET(flag, val) \
16106     WMI_SET_BITS(flag, 20, 1, val)
16107 #define WMI_VDEV_STATS_STOP_RESP_EVENT_BLOCKED_GET(flag) \
16108     WMI_GET_BITS(flag, 20, 1)
16109 #define WMI_VDEV_STATS_USE_ENHANCED_MCAST_FILTER_SET(flag, val) \
16110     WMI_SET_BITS(flag, 21, 1, val)
16111 #define WMI_VDEV_STATS_USE_ENHANCED_MCAST_FILTER_GET(flag) \
16112     WMI_GET_BITS(flag, 21, 1)
16113 #define WMI_VDEV_STATS_IS_START_PENDING_ON_ASM_SET(flag, val) \
16114     WMI_SET_BITS(flag, 22, 1, val)
16115 #define WMI_VDEV_STATS_IS_START_PENDING_ON_ASM_GET(flag) \
16116     WMI_GET_BITS(flag, 22, 1)
16117 #define WMI_VDEV_STATS_NO_NULL_TO_AP_FOR_ROAMING_SET(flag, val) \
16118     WMI_SET_BITS(flag, 23, 1, val)
16119 #define WMI_VDEV_STATS_NO_NULL_TO_AP_FOR_ROAMING_GET(flag) \
16120     WMI_GET_BITS(flag, 23, 1)
16121 #define WMI_VDEV_STATS_IS_LOOPBACK_CAL_PENDING_SET(flag, val) \
16122     WMI_SET_BITS(flag, 24, 1, val)
16123 #define WMI_VDEV_STATS_IS_LOOPBACK_CAL_PENDING_GET(flag) \
16124     WMI_GET_BITS(flag, 24, 1)
16125 #define WMI_VDEV_STATS_VDEV_DELETE_ACKED_SET(flag, val) \
16126     WMI_SET_BITS(flag, 25, 1, val)
16127 #define WMI_VDEV_STATS_VDEV_DELETE_ACKED_GET(flag) \
16128     WMI_GET_BITS(flag, 25, 1)
16129 #define WMI_VDEV_STATS_BC_PROBERESP_ENABLE_SET(flag, val) \
16130     WMI_SET_BITS(flag, 26, 1, val)
16131 #define WMI_VDEV_STATS_BC_PROBERESP_ENABLE_GET(flag) \
16132     WMI_GET_BITS(flag, 26, 1)
16133 #define WMI_VDEV_STATS_IS_WMM_PARAM_SET_SET(flag, val) \
16134     WMI_SET_BITS(flag, 27, 1, val)
16135 #define WMI_VDEV_STATS_IS_WMM_PARAM_SET_GET(flag) \
16136     WMI_GET_BITS(flag, 27, 1)
16137 #define WMI_VDEV_STATS_IS_CONNECT_IN_PROGRESS_SET(flag, val) \
16138     WMI_SET_BITS(flag, 28, 1, val)
16139 #define WMI_VDEV_STATS_IS_CONNECT_IN_PROGRESS_GET(flag) \
16140     WMI_GET_BITS(flag, 28, 1)
16141 #define WMI_VDEV_STATS_IS_MU_EDCA_PARAM_SET_SET(flag, val) \
16142     WMI_SET_BITS(flag, 29, 1, val)
16143 #define WMI_VDEV_STATS_IS_MU_EDCA_PARAM_SET_GET(flag) \
16144     WMI_GET_BITS(flag, 29, 1)
16145 #define WMI_VDEV_STATS_SEND_DEL_RESP_TOHOST_SET(flag, val) \
16146     WMI_SET_BITS(flag, 30, 1, val)
16147 #define WMI_VDEV_STATS_SEND_DEL_RESP_TOHOST_GET(flag) \
16148     WMI_GET_BITS(flag, 30, 1)
16149 #define WMI_VDEV_STATS_IS_RESTART_DIFFERENT_CH_SET(flag, val) \
16150     WMI_SET_BITS(flag, 31, 1, val)
16151 #define WMI_VDEV_STATS_IS_RESTART_DIFFERENT_CH_GET(flag) \
16152     WMI_GET_BITS(flag, 31, 1)
16153 
16154 #define WMI_VDEV_STATS_PROTO_PS_STATUS_SET(flag, val) \
16155     WMI_SET_BITS(flag, 0, 1, val)
16156 #define WMI_VDEV_STATS_PROTO_PS_STATUS_GET(flag) \
16157     WMI_GET_BITS(flag, 0, 1)
16158 #define WMI_VDEV_STATS_SMPS_INTOLERANT_SET(flag, val) \
16159     WMI_SET_BITS(flag, 1, 1, val)
16160 #define WMI_VDEV_STATS_SMPS_INTOLERANT_GET(flag) \
16161     WMI_GET_BITS(flag, 1, 1)
16162 #define WMI_VDEV_STATS_IS_OFFLOAD_REGISTERED_FOR_CONNECTION_SET(flag, val) \
16163     WMI_SET_BITS(flag, 2, 1, val)
16164 #define WMI_VDEV_STATS_IS_OFFLOAD_REGISTERED_FOR_CONNECTION_GET(flag) \
16165     WMI_GET_BITS(flag, 2, 1)
16166 #define WMI_VDEV_STATS_IS_BSS_BEACON_OFFLOAD_REGISTERED_SET(flag, val) \
16167     WMI_SET_BITS(flag, 3, 1, val)
16168 #define WMI_VDEV_STATS_IS_BSS_BEACON_OFFLOAD_REGISTERED_GET(flag) \
16169     WMI_GET_BITS(flag, 3, 1)
16170 #define WMI_VDEV_STATS_IS_PROB_RESP_OFFLOAD_REGISTERED_SET(flag, val) \
16171     WMI_SET_BITS(flag, 4, 1, val)
16172 #define WMI_VDEV_STATS_IS_PROB_RESP_OFFLOAD_REGISTERED_GET(flag) \
16173     WMI_GET_BITS(flag, 4, 1)
16174 #define WMI_VDEV_STATS_IS_IBSS_BEACON_OFFLOAD_REGISTERED_SET(flag, val) \
16175     WMI_SET_BITS(flag, 5, 1, val)
16176 #define WMI_VDEV_STATS_IS_IBSS_BEACON_OFFLOAD_REGISTERED_GET(flag) \
16177     WMI_GET_BITS(flag, 5, 1)
16178 #define WMI_VDEV_STATS_IS_KEEPALIVE_ATTEMPTS_EXHAUSTED_SET(flag, val) \
16179     WMI_SET_BITS(flag, 6, 1, val)
16180 #define WMI_VDEV_STATS_IS_KEEPALIVE_ATTEMPTS_EXHAUSTED_GET(flag) \
16181     WMI_GET_BITS(flag, 6, 1)
16182 #define WMI_VDEV_STATS_IS_BCN_TX_IE_CHANGED_LOG_SET(flag, val) \
16183     WMI_SET_BITS(flag, 7, 1, val)
16184 #define WMI_VDEV_STATS_IS_BCN_TX_IE_CHANGED_LOG_GET(flag) \
16185     WMI_GET_BITS(flag, 7, 1)
16186 #define WMI_VDEV_STATS_HE_SU_BFEE_SET(flag, val) \
16187     WMI_SET_BITS(flag, 8, 1, val)
16188 #define WMI_VDEV_STATS_HE_SU_BFEE_GET(flag) \
16189     WMI_GET_BITS(flag, 8, 1)
16190 #define WMI_VDEV_STATS_HE_SU_BFER_SET(flag, val) \
16191     WMI_SET_BITS(flag, 9, 1, val)
16192 #define WMI_VDEV_STATS_HE_SU_BFER_GET(flag) \
16193     WMI_GET_BITS(flag, 9, 1)
16194 #define WMI_VDEV_STATS_HE_MU_BFEE_SET(flag, val) \
16195     WMI_SET_BITS(flag, 10, 1, val)
16196 #define WMI_VDEV_STATS_HE_MU_BFEE_GET(flag) \
16197     WMI_GET_BITS(flag, 10, 1)
16198 #define WMI_VDEV_STATS_HE_MU_BFER_SET(flag, val) \
16199     WMI_SET_BITS(flag, 11, 1, val)
16200 #define WMI_VDEV_STATS_HE_MU_BFER_GET(flag) \
16201     WMI_GET_BITS(flag, 11, 1)
16202 #define WMI_VDEV_STATS_HE_DL_OFDMA_SET(flag, val) \
16203     WMI_SET_BITS(flag, 12, 1, val)
16204 #define WMI_VDEV_STATS_HE_DL_OFDMA_GET(flag) \
16205     WMI_GET_BITS(flag, 12, 1)
16206 #define WMI_VDEV_STATS_HE_UL_OFDMA_SET(flag, val) \
16207     WMI_SET_BITS(flag, 13, 1, val)
16208 #define WMI_VDEV_STATS_HE_UL_OFDMA_GET(flag) \
16209     WMI_GET_BITS(flag, 13, 1)
16210 #define WMI_VDEV_STATS_HE_UL_MUMIMO_SET(flag, val) \
16211     WMI_SET_BITS(flag, 14, 1, val)
16212 #define WMI_VDEV_STATS_HE_UL_MUMIMO_GET(flag) \
16213     WMI_GET_BITS(flag, 14, 1)
16214 #define WMI_VDEV_STATS_UL_MU_RESP_SET(flag, val) \
16215     WMI_SET_BITS(flag, 15, 1, val)
16216 #define WMI_VDEV_STATS_UL_MU_RESP_GET(flag) \
16217     WMI_GET_BITS(flag, 15, 1)
16218 #define WMI_VDEV_STATS_ALT_RSSI_NON_SRG_SET(flag, val) \
16219     WMI_SET_BITS(flag, 16, 8, val)
16220 #define WMI_VDEV_STATS_ALT_RSSI_NON_SRG_GET(flag) \
16221     WMI_GET_BITS(flag, 16, 8)
16222 #define WMI_VDEV_STATS_ALT_RSSI_SRG_SET(flag, val) \
16223     WMI_SET_BITS(flag, 24, 8, val)
16224 #define WMI_VDEV_STATS_ALT_RSSI_SRG_GET(flag) \
16225     WMI_GET_BITS(flag, 24, 8)
16226 
16227 #define WMI_VDEV_STATS_HE_BSS_COLOR_EN_SET(flag, val) \
16228     WMI_SET_BITS(flag, 0, 1, val)
16229 #define WMI_VDEV_STATS_HE_BSS_COLOR_EN_GET(flag) \
16230     WMI_GET_BITS(flag, 0, 1)
16231 #define WMI_VDEV_STATS_HE_TXBF_OFDMA_SET(flag, val) \
16232     WMI_SET_BITS(flag, 1, 1, val)
16233 #define WMI_VDEV_STATS_HE_TXBF_OFDMA_GET(flag) \
16234     WMI_GET_BITS(flag, 1, 1)
16235 #define WMI_VDEV_STATS_NON_SRG_ENABLE_SET(flag, val) \
16236     WMI_SET_BITS(flag, 2, 1, val)
16237 #define WMI_VDEV_STATS_NON_SRG_ENABLE_GET(flag) \
16238     WMI_GET_BITS(flag, 2, 1)
16239 #define WMI_VDEV_STATS_SRG_ENABLE_SET(flag, val) \
16240     WMI_SET_BITS(flag, 3, 1, val)
16241 #define WMI_VDEV_STATS_SRG_ENABLE_GET(flag) \
16242     WMI_GET_BITS(flag, 3, 1)
16243 #define WMI_VDEV_STATS_SRP_ENABLE_SET(flag, val) \
16244     WMI_SET_BITS(flag, 4, 1, val)
16245 #define WMI_VDEV_STATS_SRP_ENABLE_GET(flag) \
16246     WMI_GET_BITS(flag, 4, 1)
16247 #define WMI_VDEV_STATS_SR_INITIALIZED_SET(flag, val) \
16248     WMI_SET_BITS(flag, 5, 1, val)
16249 #define WMI_VDEV_STATS_SR_INITIALIZED_GET(flag) \
16250     WMI_GET_BITS(flag, 5, 1)
16251 #define WMI_VDEV_STATS_SR_RINGS_INITIALIZED_SET(flag, val) \
16252     WMI_SET_BITS(flag, 6, 1, val)
16253 #define WMI_VDEV_STATS_SR_RINGS_INITIALIZED_GET(flag) \
16254     WMI_GET_BITS(flag, 6, 1)
16255 #define WMI_VDEV_STATS_PER_AC_OBSS_PD_ENABLE_SET(flag, val) \
16256     WMI_SET_BITS(flag, 7, 4, val)
16257 #define WMI_VDEV_STATS_PER_AC_OBSS_PD_ENABLE_GET(flag) \
16258     WMI_GET_BITS(flag, 7, 4)
16259 #define WMI_VDEV_STATS_IFUP_SET(flag, val) \
16260     WMI_SET_BITS(flag, 11, 1, val)
16261 #define WMI_VDEV_STATS_IFUP_GET(flag) \
16262     WMI_GET_BITS(flag, 11, 1)
16263 #define WMI_VDEV_STATS_IFACTIVE_SET(flag, val) \
16264     WMI_SET_BITS(flag, 12, 1, val)
16265 #define WMI_VDEV_STATS_IFACTIVE_GET(flag) \
16266     WMI_GET_BITS(flag, 12, 1)
16267 #define WMI_VDEV_STATS_IFPAUSED_SET(flag, val) \
16268     WMI_SET_BITS(flag, 13, 1, val)
16269 #define WMI_VDEV_STATS_IFPAUSED_GET(flag) \
16270     WMI_GET_BITS(flag, 13, 1)
16271 #define WMI_VDEV_STATS_IFOUTOFSYNC_SET(flag, val) \
16272     WMI_SET_BITS(flag, 14, 1, val)
16273 #define WMI_VDEV_STATS_IFOUTOFSYNC_GET(flag) \
16274     WMI_GET_BITS(flag, 14, 1)
16275 #define WMI_VDEV_STATS_IS_FREE_SET(flag, val) \
16276     WMI_SET_BITS(flag, 15, 1, val)
16277 #define WMI_VDEV_STATS_IS_FREE_GET(flag) \
16278     WMI_GET_BITS(flag, 15, 1)
16279 #define WMI_VDEV_STATS_IS_NAWDS_SET(flag, val) \
16280     WMI_SET_BITS(flag, 16, 1, val)
16281 #define WMI_VDEV_STATS_IS_NAWDS_GET(flag) \
16282     WMI_GET_BITS(flag, 16, 1)
16283 #define WMI_VDEV_STATS_HW_FLAG_SET(flag, val) \
16284     WMI_SET_BITS(flag, 17, 1, val)
16285 #define WMI_VDEV_STATS_HW_FLAG_GET(flag) \
16286     WMI_GET_BITS(flag, 17, 1)
16287 #define WMI_VDEV_STATS_CH_REQ_FLAG_SET(flag, val) \
16288     WMI_SET_BITS(flag, 18, 2, val)
16289 #define WMI_VDEV_STATS_CH_REQ_FLAG_GET(flag) \
16290     WMI_GET_BITS(flag, 18, 2)
16291 #define WMI_VDEV_STATS_RESTART_RESP_SET(flag, val) \
16292     WMI_SET_BITS(flag, 20, 1, val)
16293 #define WMI_VDEV_STATS_RESTART_RESP_GET(flag) \
16294     WMI_GET_BITS(flag, 20, 1)
16295 #define WMI_VDEV_STATS_FIRST_BEACON_RECV_WAIT_SET(flag, val) \
16296     WMI_SET_BITS(flag, 21, 1, val)
16297 #define WMI_VDEV_STATS_FIRST_BEACON_RECV_WAIT_GET(flag) \
16298     WMI_GET_BITS(flag, 21, 1)
16299 #define WMI_VDEV_STATS_ERPENABLED_SET(flag, val) \
16300     WMI_SET_BITS(flag, 22, 1, val)
16301 #define WMI_VDEV_STATS_ERPENABLED_GET(flag) \
16302     WMI_GET_BITS(flag, 22, 1)
16303 #define WMI_VDEV_STATS_START_RESPONDED_SET(flag, val) \
16304     WMI_SET_BITS(flag, 23, 1, val)
16305 #define WMI_VDEV_STATS_START_RESPONDED_GET(flag) \
16306     WMI_GET_BITS(flag, 23, 1)
16307 #define WMI_VDEV_STATS_BCN_SYNC_CRIT_REQ_ACT_SET(flag, val) \
16308     WMI_SET_BITS(flag, 24, 1, val)
16309 #define WMI_VDEV_STATS_BCN_SYNC_CRIT_REQ_ACT_GET(flag) \
16310     WMI_GET_BITS(flag, 24, 1)
16311 #define WMI_VDEV_STATS_RECAL_NOTIF_REGISTERED_SET(flag, val) \
16312     WMI_SET_BITS(flag, 25, 1, val)
16313 #define WMI_VDEV_STATS_RECAL_NOTIF_REGISTERED_GET(flag) \
16314     WMI_GET_BITS(flag, 25, 1)
16315 #define WMI_VDEV_STATS_BCN_TX_PAUSED_SET(flag, val) \
16316     WMI_SET_BITS(flag, 26, 1, val)
16317 #define WMI_VDEV_STATS_BCN_TX_PAUSED_GET(flag) \
16318     WMI_GET_BITS(flag, 26, 1)
16319 #define WMI_VDEV_STATS_HE_BSS_COLOR_EN_BYPASS_SET(flag, val) \
16320     WMI_SET_BITS(flag, 27, 1, val)
16321 #define WMI_VDEV_STATS_HE_BSS_COLOR_EN_BYPASS_GET(flag) \
16322     WMI_GET_BITS(flag, 27, 1)
16323 #define WMI_VDEV_STATS_DEFAULT_BA_MODE_SET(flag, val) \
16324     WMI_SET_BITS(flag, 28, 1, val)
16325 #define WMI_VDEV_STATS_DEFAULT_BA_MODE_GET(flag) \
16326     WMI_GET_BITS(flag, 28, 1)
16327 #define WMI_VDEV_STATS_BA_256_BITMAP_ENABLE_SET(flag, val) \
16328     WMI_SET_BITS(flag, 29, 1, val)
16329 #define WMI_VDEV_STATS_BA_256_BITMAP_ENABLE_GET(flag) \
16330     WMI_GET_BITS(flag, 29, 1)
16331 #define WMI_VDEV_STATS_BA_256_BITMAP_TX_DISABLE_SET(flag, val) \
16332     WMI_SET_BITS(flag, 30, 1, val)
16333 #define WMI_VDEV_STATS_BA_256_BITMAP_TX_DISABLE_GET(flag) \
16334     WMI_GET_BITS(flag, 30, 1)
16335 #define WMI_VDEV_STATS_IS_MULTI_GROUP_KEY_ENABLED_SET(flag, val) \
16336     WMI_SET_BITS(flag, 31, 1, val)
16337 #define WMI_VDEV_STATS_IS_MULTI_GROUP_KEY_ENABLED_GET(flag) \
16338     WMI_GET_BITS(flag, 31, 1)
16339 
16340 typedef struct {
16341     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_sta_rrm_stats_struct */
16342     A_UINT32 tlv_header;
16343     A_UINT32 dot11GroupTransmittedFrameCount;
16344     A_UINT32 dot11GroupReceivedFrameCount;
16345     A_UINT32 dot11TransmittedFrameCount;
16346     A_UINT32 dot11AckFailureCount;
16347     A_UINT32 dot11FailedCount;
16348     A_UINT32 dot11FCSErrorCount;
16349     A_UINT32 dot11RTSSuccessCount;
16350     A_UINT32 dot11RTSFailureCount;
16351 } wmi_ctrl_path_sta_rrm_stats_struct;
16352 
16353 typedef struct {
16354     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_vdev_bcn_stats_struct */
16355     A_UINT32 tlv_header;
16356     A_UINT32 vdev_id;
16357     A_UINT32 beacon_succ_cnt;
16358     A_UINT32 beacon_outage_cnt;
16359     A_UINT32 beacon_cons_miss_cnt;
16360     A_UINT32 beacon_curr_miss_cnt;
16361     A_UINT32 beacon_sw_abort_cnt;
16362     A_UINT32 beacon_tx_filter_cnt;
16363     A_UINT32 beacon_tx_xretry_cnt;
16364     A_UINT32 beacon_tx_drop_cnt;
16365     A_UINT32 beacon_tx_abort_cnt;
16366     A_UINT32 beacon_tx_tid_del_cnt;
16367     A_UINT32 beacon_tx_mig_drop_cnt;
16368     A_UINT32 beacon_fail_others_cnt;
16369     A_UINT32 beacon_stuck_cnt;
16370     A_UINT32 beacon_tbtt_skip_cnt;
16371     A_UINT32 beacon_swba_cnt;
16372     A_UINT32 beacon_enque_fail;
16373     A_UINT32 scan_time_exceed_cnt;
16374     A_UINT32 beacon_miss_systime_gap_us;
16375     A_UINT32 beacon_last_miss_time_low_us;
16376     A_UINT32 beacon_last_miss_time_high_us;
16377     A_UINT32 last_tbtt_time_low_us;
16378     A_UINT32 last_tbtt_time_high_us;
16379     A_UINT32 last_tbtt_update_low_us;
16380     A_UINT32 last_tbtt_update_high_us;
16381 } wmi_ctrl_path_vdev_bcn_tx_stats_struct;
16382 
16383 typedef struct {
16384     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ctrl_path_pdev_bcn_stats_struct */
16385     A_UINT32 tlv_header;
16386     A_UINT32 pdev_id;
16387     A_UINT32 beacon_succ_cnt;
16388     A_UINT32 beacon_outage_cnt;
16389     A_UINT32 beacon_sw_abort_cnt;
16390     A_UINT32 beacon_tx_filter_cnt;
16391     A_UINT32 beacon_tx_xretry_cnt;
16392     A_UINT32 beacon_tx_drop_cnt;
16393     A_UINT32 beacon_tx_abort_cnt;
16394     A_UINT32 beacon_tx_tid_del_cnt;
16395     A_UINT32 beacon_tx_mig_drop_cnt;
16396     A_UINT32 beacon_fail_others_cnt;
16397     A_UINT32 beacon_stuck_cnt;
16398     A_UINT32 beacon_swba_cnt;
16399     A_UINT32 beacon_enque_fail;
16400 } wmi_ctrl_path_pdev_bcn_tx_stats_struct;
16401 
16402 /**
16403  *  peer statistics.
16404  */
16405 typedef struct {
16406     /** peer MAC address */
16407     wmi_mac_addr peer_macaddr;
16408     /** RSSI */
16409     A_UINT32 peer_rssi;
16410     /** last tx data rate used for peer */
16411     A_UINT32 peer_tx_rate;
16412     /** last rx data rate used for peer */
16413     A_UINT32 peer_rx_rate;
16414 } wmi_peer_stats;
16415 
16416 /**
16417  *  Peer extension statistics
16418  */
16419 typedef struct {
16420     /** peer MAC address */
16421     wmi_mac_addr peer_macaddr;
16422     /* lower 32 bits of rx duration in microseconds */
16423     A_UINT32 rx_duration;
16424     /** Total TX bytes (including dot11 header) sent to peer */
16425     A_UINT32 peer_tx_bytes;
16426     /** Total RX bytes (including dot11 header) received from peer */
16427     A_UINT32 peer_rx_bytes;
16428     /** last TX ratecode */
16429     A_UINT32 last_tx_rate_code;
16430     /** TX power used by peer - units are 0.5 dBm */
16431     A_INT32 last_tx_power;
16432 
16433     /* Total number of received multicast & broadcast data frames corresponding to this peer */
16434     A_UINT32 rx_mc_bc_cnt; /* 1 in the MSB of rx_mc_bc_cnt represents a valid data */
16435     /* upper 32 bits of rx duration in microseconds */
16436     A_UINT32 rx_duration_u32; /* 1 in the most significant bit indicates this field contains valid data */
16437     A_UINT32 reserved[2]; /** for future use - add new peer stats here */
16438 } wmi_peer_extd_stats;
16439 
16440 typedef struct {
16441     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_extd2_stats */
16442     /** peer MAC address */
16443     wmi_mac_addr peer_macaddr;
16444     /*
16445      * The following rx_bytes field (lower/upper pair) counts only the
16446      * MSDU bytes (after 802.11 decap, if applicable), and thus doesn't
16447      * count the 802.11 header, unlike the wmi_peer_extd_stats.peer_rx_bytes
16448      * and wmi_peer_stats_info.rx_bytes fields.
16449      */
16450     /** Lower 32 bits of the rx_bytes (size of MSDUs) excluding dot11 header from this peer */
16451     A_UINT32 rx_bytes_l32;
16452     /** Upper 32 bits of the rx_bytes (size of MSDUs) excluding dot11 header from this peer */
16453     A_UINT32 rx_bytes_u32;
16454     /** Number of MPDUS received with FCS error from this peer */
16455     A_UINT32 rx_fcs_err;
16456     /** Number of MPDUs(both data and non data) received from this peer */
16457     A_UINT32 rx_mpdus;
16458     /** nss of last tx data to peer */
16459     A_UINT32 last_tx_nss;
16460     /** nss of last rx data from peer */
16461     A_UINT32 last_rx_nss;
16462     /** chain mask used for last tx data to peer */
16463     A_UINT32 last_tx_chain_mask;
16464     /** chain mask used for last rx data from peer */
16465     A_UINT32 last_rx_chain_mask;
16466 } wmi_peer_extd2_stats;
16467 
16468 typedef struct {
16469     /** Primary channel freq of the channel for which stats are sent */
16470     A_UINT32 chan_mhz;
16471     /** Time spent on the channel */
16472     A_UINT32 sampling_period_us;
16473     /** Aggregate duration over a sampling period for which channel activity was observed */
16474     A_UINT32 rx_clear_count;
16475     /** Accumalation of the TX PPDU duration over a sampling period */
16476     A_UINT32 tx_duration_us;
16477     /** Accumalation of the RX PPDU duration over a sampling period */
16478     A_UINT32 rx_duration_us;
16479 } wmi_chan_stats;
16480 
16481 /**
16482  * MIB statistics.  See 802.11 spec for the meaning of each field.
16483  */
16484 typedef struct {
16485     A_UINT32 tx_mpdu_grp_frag_cnt;       /*dot11TransmittedFragmentCount */
16486     A_UINT32 tx_msdu_grp_frm_cnt;        /*dot11GroupTransmittedFrameCount */
16487     A_UINT32 tx_msdu_fail_cnt;           /*dot11FailedCount*/
16488     A_UINT32 rx_mpdu_frag_cnt;           /*dot11ReceivedFragmentCount*/
16489     A_UINT32 rx_msdu_grp_frm_cnt;        /*dot11GroupReceivedFrameCount*/
16490     A_UINT32 rx_mpdu_fcs_err;            /*dot11FCSErrorCount*/
16491     A_UINT32 tx_msdu_frm_cnt;            /*dot11TransmittedFrameCount*/
16492     A_UINT32 tx_msdu_retry_cnt;          /*dot11RetryCount*/
16493     A_UINT32 rx_frm_dup_cnt;             /*dot11FrameDuplicateCount */
16494     A_UINT32 tx_rts_success_cnt;         /*dot11RTSSuccessCount*/
16495     A_UINT32 tx_rts_fail_cnt;            /*dot11RTSFailureCount*/
16496     A_UINT32 tx_Qos_mpdu_grp_frag_cnt;   /*dot11QosTransmittedFragmentCount */
16497     A_UINT32 tx_Qos_msdu_fail_UP;        /*dot11QosFailedCount */
16498     A_UINT32 tx_Qos_msdu_retry_UP;       /*dot11QosRetryCount */
16499     A_UINT32 rx_Qos_frm_dup_cnt_UP;      /*dot11QosFrameDuplicateCount*/
16500     A_UINT32 tx_Qos_rts_success_cnt_UP;  /*dot11QosRTSSuccessCount*/
16501     A_UINT32 tx_Qos_rts_fail_cnt_UP;     /*dot11QosRTSFailureCount*/
16502     A_UINT32 rx_Qos_mpdu_frag_cnt_UP;    /*dot11QosReceivedFragmentCount*/
16503     A_UINT32 tx_Qos_msdu_frm_cnt_UP;     /*dot11QosTransmittedFrameCount*/
16504     A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/
16505     A_UINT32 rx_Qos_mpdu_cnt;            /*dot11QosMPDUsReceivedCount*/
16506     A_UINT32 rx_Qos_mpdu_retryBit_cnt;   /*dot11QosRetriesReceivedCount*/
16507     A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt; /*dot11RSNAStatsRobustMgmtCCMPReplays*/
16508     A_UINT32 rsna_TKIP_icv_err_cnt;      /*dot11RSNAStatsTKIPICVErrors*/
16509     A_UINT32 rsna_TKIP_replay_err_cnt;   /*dot11RSNAStatsTKIPReplays*/
16510     A_UINT32 rsna_CCMP_decrypt_err_cnt;  /*dot11RSNAStatsCCMPDecryptErrors*/
16511     A_UINT32 rsna_CCMP_replay_err_cnt;   /*dot11RSNAStatsCCMPReplays*/
16512     A_UINT32 tx_ampdu_cnt;               /*dot11TransmittedAMPDUCount*/
16513     A_UINT32 tx_mpdu_cnt_in_ampdu;       /*dot11TransmittedMPDUsInAMPDUCount*/
16514     union {
16515         A_UINT64 counter; /* for use by target only */
16516         struct {
16517             A_UINT32 low;
16518             A_UINT32 high;
16519         } upload; /* for use by host */
16520     } tx_octets_in_ampdu;                /*dot11TransmittedOctetsInAMPDUCount*/
16521     A_UINT32 rx_ampdu_cnt;               /*dot11AMPDUReceivedCount*/
16522     A_UINT32 rx_mpdu_cnt_in_ampdu;       /*dot11MPDUInReceivedAMPDUCount*/
16523     union {
16524         A_UINT64 counter; /* for use by target only */
16525         struct {
16526             A_UINT32 rx_octets_in_ampdu_low;
16527             A_UINT32 rx_octets_in_ampdu_high;
16528         } upload; /* for use by host */
16529     } rx_octets_in_ampdu;                /*dot11ReceivedOctetsInAMPDUCount*/
16530     A_UINT32 reserved_1;
16531     A_UINT32 reserved_2;
16532     A_UINT32 reserved_3;
16533     A_UINT32 reserved_4;
16534 } wmi_mib_stats;
16535 
16536 /**
16537  *  MIB extension statistics.
16538  */
16539 typedef struct {
16540     A_UINT32 tx_msdu_multi_retry_cnt;    /*dot11MultipleRetryCount*/
16541     A_UINT32 tx_ack_fail_cnt;            /*dot11ACKFailureCount*/
16542     A_UINT32 tx_qos_msdu_multi_retry_up; /*dot11QosMultipleRetryCount*/
16543     A_UINT32 tx_qos_ack_fail_cnt_up;     /*dot11QosACKFailureCount*/
16544     A_UINT32 rsna_cmac_icv_err_cnt;      /*dot11RSNAStatsCMACICVErrors*/
16545     A_UINT32 rsna_cmac_replay_err_cnt;   /*dot11RSNAStatsCMACReplays*/
16546     A_UINT32 rx_ampdu_deli_crc_err_cnt;  /*dot11AMPDUDelimiterCRCErrorCount*/
16547     A_UINT32 reserved[8];    /* Reserve more fields for future extension */
16548 } wmi_mib_extd_stats;
16549 
16550 /**
16551  *  Beacon protection statistics.
16552  */
16553 typedef struct {
16554     A_UINT32 tlv_header;        /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmf_bcn_protect_stats */
16555     A_UINT32 igtk_mic_fail_cnt; /* MIC failure count of management packets using IGTK */
16556     A_UINT32 igtk_replay_cnt;   /* Replay detection count of management packets using IGTK */
16557     A_UINT32 bcn_mic_fail_cnt;  /* MIC failure count of beacon packets using BIGTK */
16558     A_UINT32 bcn_replay_cnt;    /* Replay detection count of beacon packets using BIGTK */
16559 } wmi_pmf_bcn_protect_stats;
16560 
16561 typedef struct {
16562     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */
16563     A_UINT32 vdev_id;
16564     A_INT32  rssi_avg_beacon[WMI_MAX_CHAINS];
16565     A_INT32  rssi_avg_data[WMI_MAX_CHAINS];
16566     wmi_mac_addr peer_macaddr;
16567 } wmi_rssi_stats;
16568 
16569 typedef struct {
16570     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_congestion_stats */
16571     A_UINT32 vdev_id;
16572    /* congestion -
16573     * This field holds the congestion percentage = (busy_time/total_time)*100
16574     * for the interval from when the vdev was started to the current time
16575     * (or the time at which the vdev was stopped).
16576     */
16577     A_UINT32 congestion;
16578 } wmi_congestion_stats;
16579 
16580 typedef struct {
16581     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats */
16582     A_UINT32 num_per_chain_rssi_stats;
16583 /* This TLV is followed by another TLV of array of structs:
16584  *     wmi_rssi_stats rssi_stats[num_per_chain_rssi_stats];
16585  */
16586 } wmi_per_chain_rssi_stats;
16587 
16588 /* vdev control flags (per bits) */
16589 #define VDEV_FLAGS_NON_MBSSID_AP      0x00000001   /* legacy AP */
16590 #define VDEV_FLAGS_TRANSMIT_AP        0x00000002   /* indicate if this vdev is transmitting AP */
16591 #define VDEV_FLAGS_NON_TRANSMIT_AP    0x00000004   /* explicitly indicate this vdev is non-transmitting AP */
16592 #define VDEV_FLAGS_EMA_MODE           0x00000008   /* vdev is EMA and supports multiple beacon profiles.
16593                                                     * Once this flag set, flags VDEV_FLAGS_TRANSMIT_AP and
16594                                                     * VDEV_FLAGS_NON_TRANSMIT_AP classify it as either Tx vap
16595                                                     * or non Tx vap.
16596                                                     */
16597 #define VDEV_FLAGS_SCAN_MODE_VAP      0x00000010   /* for Scan Radio vdev will be special vap.
16598                                                     * There will not be WMI_VDEV_UP_CMD, there will be only WMI_VDEV_CREATE_CMD
16599                                                     * and WMI_VDEV_START_REQUEST_CMD. Based on this parameter need to make decision like
16600                                                     * vdev Pause/Unpause at WMI_VDEV_START_REQUEST_CMD.
16601                                                     */
16602 /* get/set/check macros for VDEV_FLAGS_SCAN_MODE_VAP flag */
16603 #define WMI_SCAN_MODE_VDEV_FLAG_GET(flag)            WMI_GET_BITS(flag, 4, 1)
16604 #define WMI_SCAN_MODE_VDEV_FLAG_SET(flag, val)       WMI_SET_BITS(flag, 4, 1, val)
16605 
16606 #define WMI_SCAN_MODE_VDEV_FLAG_ENABLED(flag)        ((flag & VDEV_FLAGS_SCAN_MODE_VAP) ? 1 : 0)
16607 
16608 typedef struct {
16609     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
16610     /** unique id identifying the VDEV, generated by the caller */
16611     A_UINT32 vdev_id;
16612     /** VDEV type (AP,STA,IBSS,MONITOR) */
16613     A_UINT32 vdev_type;
16614     /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0, BRIDGE) */
16615     A_UINT32 vdev_subtype;
16616     /** VDEV MAC address */
16617     wmi_mac_addr vdev_macaddr;
16618     /** Number of configured txrx streams */
16619     A_UINT32 num_cfg_txrx_streams;
16620     /**
16621      * pdev_id for identifying the MAC,
16622      * See macros starting with WMI_PDEV_ID_ for values.
16623      */
16624     A_UINT32 pdev_id;
16625     /** control flags for this vdev (DEPRECATED)
16626      * Use @mbss_capability_flags in vdev start instead.
16627      */
16628     A_UINT32 flags;
16629     /**  vdevid of transmitted AP (mbssid case) (DEPRECATED)
16630      * Use @vdevid_trans in vdev start instead.
16631      */
16632     A_UINT32 vdevid_trans;
16633     /* vdev_stats_id_valid indicates whether vdev_stats_id is valid */
16634     A_UINT32 vdev_stats_id_valid;
16635     /**
16636      * vdev_stats_id indicates the ID for the REO Rx stats collection
16637      * For Beryllium: 0-47 is the valid range and >=48 is invalid
16638      * This vdev_stats_id field should be ignored unless the
16639      * vdev_stats_id_valid field is non-zero.
16640      */
16641     A_UINT32 vdev_stats_id;
16642 /* This TLV is followed by another TLV of array of structures
16643  *   wmi_vdev_txrx_streams cfg_txrx_streams[];
16644  *   wmi_vdev_create_mlo_params mlo_params[0,1];
16645  *       optional TLV, only present for MLO vdev;
16646  *       if the vdev is not MLO the array length should be 0.
16647  */
16648 } wmi_vdev_create_cmd_fixed_param;
16649 
16650 typedef struct {
16651     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_txrx_streams */
16652     /* band - Should take values from wmi_channel_band_mask */
16653     A_UINT32 band;
16654     /* max supported tx streams per given band for this vdev */
16655     A_UINT32 supported_tx_streams;
16656     /* max supported rx streams per given band for this vdev */
16657     A_UINT32 supported_rx_streams;
16658 } wmi_vdev_txrx_streams;
16659 
16660 /* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
16661 typedef struct {
16662     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
16663     A_UINT32 type_count; /** 255: continuous schedule, 0: reserved */
16664     A_UINT32 duration; /** Absent period duration in micro seconds */
16665     A_UINT32 interval; /** Absent period interval in micro seconds */
16666     A_UINT32 start_time; /** 32 bit tsf time when in starts */
16667 } wmi_p2p_noa_descriptor;
16668 
16669 /*
16670  * mlo_flags sub-fields:
16671  * bits 0    - mlo enable flag;
16672  * bits 1    - assoc link flag;
16673  * bits 2    - primary_umac flag;
16674  * bits 3    - is logical link index valid
16675  * bits 4    - is mlo peer id valid
16676  */
16677 #define WMI_MLO_FLAGS_GET_ENABLED(mlo_flags)                WMI_GET_BITS(mlo_flags, 0, 1)
16678 #define WMI_MLO_FLAGS_SET_ENABLED(mlo_flags, value)         WMI_SET_BITS(mlo_flags, 0, 1, value)
16679 #define WMI_MLO_FLAGS_GET_ASSOC_LINK(mlo_flags)             WMI_GET_BITS(mlo_flags, 1, 1)
16680 #define WMI_MLO_FLAGS_SET_ASSOC_LINK(mlo_flags, value)      WMI_SET_BITS(mlo_flags, 1, 1, value)
16681 #define WMI_MLO_FLAGS_GET_PRIMARY_UMAC(mlo_flags)           WMI_GET_BITS(mlo_flags, 2, 1)
16682 #define WMI_MLO_FLAGS_SET_PRIMARY_UMAC(mlo_flags, value)    WMI_SET_BITS(mlo_flags, 2, 1, value)
16683 #define WMI_MLO_FLAGS_GET_LINK_INDEX_VALID(mlo_flags)       WMI_GET_BITS(mlo_flags, 3, 1)
16684 #define WMI_MLO_FLAGS_SET_LINK_INDEX_VALID(mlo_flags, value) WMI_SET_BITS(mlo_flags, 3, 1, value)
16685 #define WMI_MLO_FLAGS_GET_PEER_ID_VALID(mlo_flags)          WMI_GET_BITS(mlo_flags, 4, 1)
16686 #define WMI_MLO_FLAGS_SET_PEER_ID_VALID(mlo_flags, value)   WMI_SET_BITS(mlo_flags, 4, 1, value)
16687 #define WMI_MLO_FLAGS_GET_MCAST_VDEV(mlo_flags)             WMI_GET_BITS(mlo_flags, 5, 1)
16688 #define WMI_MLO_FLAGS_SET_MCAST_VDEV(mlo_flags, value)      WMI_SET_BITS(mlo_flags, 5, 1, value)
16689 #define WMI_MLO_FLAGS_GET_EMLSR_SUPPORT(mlo_flags)          WMI_GET_BITS(mlo_flags, 6, 1)
16690 #define WMI_MLO_FLAGS_SET_EMLSR_SUPPORT(mlo_flags, value)   WMI_SET_BITS(mlo_flags, 6, 1, value)
16691 #define WMI_MLO_FLAGS_GET_FORCE_LINK_INACTIVE(mlo_flags)    WMI_GET_BITS(mlo_flags, 7, 1)
16692 #define WMI_MLO_FLAGS_SET_FORCE_LINK_INACTIVE(mlo_flags, value) WMI_SET_BITS(mlo_flags, 7, 1, value)
16693 #define WMI_MLO_FLAGS_GET_LINK_ADD(mlo_flags)               WMI_GET_BITS(mlo_flags, 8, 1)
16694 #define WMI_MLO_FLAGS_SET_LINK_ADD(mlo_flags, value)        WMI_SET_BITS(mlo_flags, 8, 1, value)
16695 #define WMI_MLO_FLAGS_GET_LINK_DEL(mlo_flags)               WMI_GET_BITS(mlo_flags, 9, 1)
16696 #define WMI_MLO_FLAGS_SET_LINK_DEL(mlo_flags, value)        WMI_SET_BITS(mlo_flags, 9, 1, value)
16697 #define WMI_MLO_FLAGS_GET_BRIDGE_PEER(mlo_flags)            WMI_GET_BITS(mlo_flags, 10, 1)
16698 #define WMI_MLO_FLAGS_SET_BRIDGE_PEER(mlo_flags, value)     WMI_SET_BITS(mlo_flags, 10, 1, value)
16699 #define WMI_MLO_FLAGS_GET_NSTR_BITMAP_PRESENT(mlo_flags)    WMI_GET_BITS(mlo_flags, 11, 1)
16700 #define WMI_MLO_FLAGS_SET_NSTR_BITMAP_PRESENT(mlo_flags, value) WMI_SET_BITS(mlo_flags, 11, 1, value)
16701 #define WMI_MLO_FLAGS_GET_NSTR_BITMAP_SIZE(mlo_flags)       WMI_GET_BITS(mlo_flags, 12, 1)
16702 #define WMI_MLO_FLAGS_SET_NSTR_BITMAP_SIZE(mlo_flags, value) WMI_SET_BITS(mlo_flags, 12, 1, value)
16703 #define WMI_MLO_FLAGS_GET_MLO_LINK_SWITCH(mlo_flags)        WMI_GET_BITS(mlo_flags, 13, 1)
16704 #define WMI_MLO_FLAGS_SET_MLO_LINK_SWITCH(mlo_flags, value) WMI_SET_BITS(mlo_flags, 13, 1, value)
16705 #define WMI_MLO_FLAGS_GET_MLO_BRIDGE_LINK(mlo_flags)        WMI_GET_BITS(mlo_flags, 14, 1)
16706 #define WMI_MLO_FLAGS_SET_MLO_BRIDGE_LINK(mlo_flags, value) WMI_SET_BITS(mlo_flags, 14, 1, value)
16707 
16708 /* this structure used for pass mlo flags*/
16709 typedef struct {
16710     union {
16711         struct {
16712             A_UINT32 mlo_enabled:1, /* indicate is MLO enabled */
16713                      mlo_assoc_link:1, /* indicate is the link used to initialize the association of mlo connection */
16714                      mlo_primary_umac:1, /* indicate is the link on primary UMAC, WIN only flag */
16715                      mlo_logical_link_index_valid:1, /* indicate if the logial link index in wmi_peer_assoc_mlo_params is valid */
16716                      mlo_peer_id_valid:1, /* indicate if the mlo peer id in wmi_peer_assoc_mlo_params is valid */
16717                      mlo_mcast_vdev:1, /* indicate this is the MLO mcast primary vdev */
16718                      emlsr_support:1, /* indicate that eMLSR is supported */
16719                      mlo_force_link_inactive:1, /* indicate this link is forced inactive */
16720                      mlo_link_add:1, /* Indicate dynamic link addition in an MLD VAP */
16721                      mlo_link_del:1, /* Indicate dynamic link deletion in an MLD VAP */
16722                      mlo_bridge_peer:1, /* Indicate if this link has bridge_peer */
16723                      nstr_bitmap_present:1, /* Indicate if at least one NSTR link pair is present in the MLD */
16724                      /* nstr_bitmap_size:
16725                       * Set to 1 if the length of the corresponding NSTR
16726                       * Indication Bitmap subfield is equal to 2 octets.
16727                       * Set to 0 if the length of the corresponding NSTR
16728                       * Indication Bitmap subfield is equal to 1 octet.
16729                       */
16730                      nstr_bitmap_size:1,
16731                      mlo_link_switch: 1, /* indicate the command is a part of link switch procedure */
16732                      mlo_bridge_link:1, /* indicate link is bridge link */
16733                      unused: 17;
16734         };
16735         A_UINT32 mlo_flags;
16736     };
16737 /* NOTE:
16738  * Since this struct is embedded inside WMI TLV structs, it cannot
16739  * have any fields added, as expanding this struct would break
16740  * backwards-compatibility by changing the offsets of the subsequent
16741  * fields in the structs that contain this struct.
16742  */
16743 } wmi_mlo_flags;
16744 
16745 typedef struct {
16746     A_UINT32 tlv_header;/** TLV tag (WMITLV_TAG_STRUC_wmi_partner_link_params) and len;*/
16747     A_UINT32 vdev_id; /** partner vdev_id */
16748     A_UINT32 hw_link_id; /** hw_link_id: Unique link id across SOCs, got as part of QMI handshake */
16749     wmi_mac_addr vdev_macaddr; /** VDEV MAC address */
16750     wmi_mlo_flags mlo_flags;
16751 } wmi_partner_link_params;
16752 
16753 /* this TLV structure used for pass mlo parameters on vdev create*/
16754 typedef struct {
16755     A_UINT32 tlv_header; /** TLV tag and len; */
16756     /** MLD MAC address */
16757     wmi_mac_addr mld_macaddr;
16758 } wmi_vdev_create_mlo_params;
16759 
16760 /* this TLV structure used for pass mlo parameters on vdev start*/
16761 typedef struct {
16762     A_UINT32 tlv_header; /** TLV tag and len; */
16763     wmi_mlo_flags mlo_flags; /*only mlo enable and assoc link flag need by vdev start*/
16764 } wmi_vdev_start_mlo_params;
16765 
16766 /* this TLV structure used for passing mlo parameters on vdev stop */
16767 typedef struct {
16768     A_UINT32 tlv_header; /** TLV tag and len; */
16769     wmi_mlo_flags mlo_flags; /* only mlo_link_switch flag needed by vdev stop */
16770 } wmi_vdev_stop_mlo_params;
16771 
16772 typedef struct {
16773     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_update_mac_addr_cmd_fixed_param */
16774     /** Unique id identifying the VDEV to update mac addr */
16775     A_UINT32 vdev_id;
16776     /** New VDEV MAC address to configure */
16777     wmi_mac_addr vdev_macaddr;
16778     /** New MLD MAC address to configure */
16779     wmi_mac_addr mld_macaddr;
16780 } wmi_vdev_update_mac_addr_cmd_fixed_param;
16781 
16782 typedef struct {
16783     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_update_mac_addr_conf_event_fixed_param */
16784     /** Unique id identifying the VDEV */
16785     A_UINT32 vdev_id;
16786     /*
16787      * Status of mac address update request.
16788      * Refer to wmi_vdev_update_mac_addr_conf_status.
16789      */
16790     A_UINT32 status;
16791 } wmi_vdev_update_mac_addr_conf_event_fixed_param;
16792 
16793 /** VDEV update mac address event response status codes */
16794 typedef enum {
16795     /** VDEV mac address updated successfully */
16796     WMI_VDEV_UPDATE_MAC_ADDR_CONF_STATUS_SUCCESS = 0,
16797     /** Requested VDEV not found */
16798     WMI_VDEV_UPDATE_MAC_ADDR_CONF_STATUS_INVALID_VDEVID = 1,
16799     /** Unsupported VDEV combination.eg: received cmd in VDEV connected state */
16800     WMI_VDEV_UPDATE_MAC_ADDR_CONF_STATUS_NOT_SUPPORTED = 2,
16801     /** FW internal failure to update mac address */
16802     WMI_VDEV_UPDATE_MAC_ADDR_CONF_STATUS_INTERNAL_FAIL = 3,
16803 } wmi_vdev_update_mac_addr_conf_status;
16804 
16805 /** values for vdev_type */
16806 #define WMI_VDEV_TYPE_AP         0x1
16807 #define WMI_VDEV_TYPE_STA        0x2
16808 #define WMI_VDEV_TYPE_IBSS       0x3
16809 #define WMI_VDEV_TYPE_MONITOR    0x4
16810 
16811 /** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
16812 * by FW to execute the NAN specific WMI commands and also implement NAN specific
16813 * operations like Network discovery, service provisioning and service
16814 * subscription  ..etc. If FW needs NAN VDEV then Host should issue VDEV create
16815 * WMI command to create this VDEV once during initialization and host is not
16816 * expected to use any VDEV specific WMI commands on this VDEV.
16817 **/
16818 #define WMI_VDEV_TYPE_NAN        0x5
16819 
16820 #define WMI_VDEV_TYPE_OCB        0x6
16821 
16822 /* NAN Data Interface */
16823 #define WMI_VDEV_TYPE_NDI        0x7
16824 
16825 #define WMI_VDEV_TYPE_MESH_POINT 0x8
16826 
16827 /*
16828  * Param values to be sent for WMI_VDEV_PARAM_SGI command
16829  * which are used in 11ax, 11be systems
16830  */
16831 #define WMI_SGI_LEGACY         0x1 /* for HT and VHT   */
16832 #define WMI_SGI_HE_400_NS      0x2 /* for HE 400 nsec  */
16833 #define WMI_SGI_HE_800_NS      0x4 /* for HE 800 nsec  */
16834 #define WMI_SGI_HE_1600_NS     0x8 /* for HE 1600 nsec */
16835 #define WMI_SGI_HE_3200_NS    0x10 /* for HE 3200 nsec */
16836 #define WMI_SGI_EHT_800_NS    0x20 /* for EHT 800 nsec  */
16837 #define WMI_SGI_EHT_1600_NS   0x40 /* for EHT 1600 nsec */
16838 #define WMI_SGI_EHT_3200_NS   0x80 /* for EHT 3200 nsec */
16839 
16840 /*
16841  * Param values to be sent for WMI_VDEV_PARAM_HE_LTF command
16842  * which are used in 11ax systems
16843  */
16844 #define WMI_HE_LTF_DEFAULT 0x0
16845 #define WMI_HE_LTF_1X      0x1
16846 #define WMI_HE_LTF_2X      0x2
16847 #define WMI_HE_LTF_4X      0x3
16848 /*
16849  * Param values to be sent for WMI_VDEV_EHT_PARAM_LTF command
16850  * which are used in 11be systems
16851  */
16852 #define WMI_EHT_LTF_DEFAULT 0x4
16853 #define WMI_EHT_LTF_1X      0x5
16854 #define WMI_EHT_LTF_2X      0x6
16855 #define WMI_EHT_LTF_4X      0x7
16856 
16857 /** values for vdev_subtype */
16858 #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
16859 #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
16860 #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO     0x3
16861 #define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA  0x4
16862 #define WMI_UNIFIED_VDEV_SUBTYPE_MESH       0x5
16863 /* new subtype for 11S mesh is required as 11S functionality differs
16864  * in many ways from proprietary mesh
16865  * 11S uses 6-addr frame format and supports peering between mesh
16866  * stations and dynamic best path selection between mesh stations.
16867  * While in proprietary mesh, neighboring mesh station MAC is manually
16868  * added to AST table for traffic flow between mesh stations
16869  */
16870 #define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S   0x6
16871 /* Subtype to indicate that the AP VAP is in smart monitor mode
16872  * This is needed to differentiate in firmware between normal AP mode
16873  * with smart monitor AP mode
16874  */
16875 #define WMI_UNIFIED_VDEV_SUBTYPE_SMART_MON  0x7
16876 
16877 /* Subtype to indicate that the VDEV is in Bridge mode.
16878  * Bridge VDEV is dummy VDEV required for 4 chip MLO scenario.
16879  * Bridge Peer will be connected to Bridge VDEV.
16880  * Bridge VDEV/PEER will be required to seamlessly transmit
16881  * to diagonal links in 4 chip MLO.
16882  */
16883 #define WMI_UNIFIED_VDEV_SUBTYPE_BRIDGE  0x8
16884 
16885 /** values for vdev_start_request flags */
16886 /** Indicates that AP VDEV uses hidden ssid. only valid for
16887  *  AP/GO */
16888 #define WMI_UNIFIED_VDEV_START_HIDDEN_SSID  (1<<0)
16889 /** Indicates if robust management frame/management frame
16890  *  protection is enabled. For GO/AP vdevs, it indicates that
16891  *  it may support station/client associations with RMF enabled.
16892  *  For STA/client vdevs, it indicates that sta will
16893  *  associate with AP with RMF enabled. */
16894 #define WMI_UNIFIED_VDEV_START_PMF_ENABLED  (1<<1)
16895 /*
16896  * Host is sending bcn_tx_rate to override the beacon tx rates.
16897  */
16898 #define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
16899 /** Indicates if LDPC RX will be advertized inside HT/VHT Capabilities IE
16900  * of assoc request/response
16901  */
16902 #define WMI_UNIFIED_VDEV_START_LDPC_RX_ENABLED  (1<<3)
16903 /** Indicates HW encryption is disabled, and SW encryption is enabled.
16904  *  If This flag is set, indicates that HW encryption will be disabled
16905  *  and SW encryption will be enabled.
16906  *  If SW encryption is enabled, key plumbing will not happen in FW.
16907  */
16908 #define WMI_UNIFIED_VDEV_START_HW_ENCRYPTION_DISABLED  (1<<4)
16909 /** Indicates VAP is used for MLO repurpose.
16910  *  This Indicates that vap can be brought up as 11ax or 11be and can be
16911  *  repurposed based on the above stack on the fly to change from MLO to
16912  *  non MLO, currently we support only 11ax and 11be transition.
16913  */
16914 #define WMI_UNIFIED_VDEV_START_MLO_REPURPOSE_VAP (1<<5)
16915 
16916 /* BSS color 0-6 */
16917 #define WMI_HEOPS_COLOR_GET_D2(he_ops) WMI_GET_BITS(he_ops, 0, 6)
16918 #define WMI_HEOPS_COLOR_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 0, 6, value)
16919 
16920 /* Default PE Duration subfield indicates the PE duration in units of 4 us */
16921 #define WMI_HEOPS_DEFPE_GET_D2(he_ops) WMI_GET_BITS(he_ops, 6, 3)
16922 #define WMI_HEOPS_DEFPE_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 6, 3, value)
16923 
16924 /* TWT required */
16925 #define WMI_HEOPS_TWT_REQUIRED_GET_D2(he_ops) WMI_GET_BITS(he_ops, 9, 1)
16926 #define WMI_HEOPS_TWT_REQUIRED_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 9, 1, value)
16927 /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET instead */
16928 #define WMI_HEOPS_TWT_GET_D2(he_ops) \
16929     WMI_HEOPS_TWT_REQUIRED_GET_D2(he_ops)
16930 /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET instead */
16931 #define WMI_HEOPS_TWT_SET_D2(he_ops, value) \
16932     WMI_HEOPS_TWT_REQUIRED_SET_D2(he_ops, value)
16933 
16934 /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
16935 #define WMI_HEOPS_RTSTHLD_GET_D2(he_ops) WMI_GET_BITS(he_ops, 10, 10)
16936 #define WMI_HEOPS_RTSTHLD_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 10, 10, value)
16937 
16938 /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
16939 #define WMI_HEOPS_PARTBSSCOLOR_GET_D2(he_ops) WMI_GET_BITS(he_ops, 20, 1)
16940 #define WMI_HEOPS_PARTBSSCOLOR_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 20, 1, value)
16941 
16942 /* MAX BSS supported by MultiBSS element */
16943 #define WMI_HEOPS_MAXBSSID_GET_D2(he_ops) WMI_GET_BITS(he_ops, 21, 8)
16944 #define WMI_HEOPS_MAXBSSID_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 21, 8, value)
16945 
16946 /* Tx BSSID Indicator indicates whether HE AP corresponds to transmitted BSSID */
16947 #define WMI_HEOPS_TXBSSID_GET_D2(he_ops) WMI_GET_BITS(he_ops, 29, 1)
16948 #define WMI_HEOPS_TXBSSID_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 29, 1, value)
16949 
16950 /* when set to 1 disables use of BSS color */
16951 #define WMI_HEOPS_BSSCOLORDISABLE_GET_D2(he_ops) WMI_GET_BITS(he_ops, 30, 1)
16952 #define WMI_HEOPS_BSSCOLORDISABLE_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
16953 
16954 /**--- HEOPS_DUALBEACON: DO NOT USE - DEPRECATED ---*/
16955 /* When set to 1 HE AP transmits beacons using two PHY formats,
16956  * one in non-HE format and other in an HE_EXT_SU PHY format
16957  */
16958 #define WMI_HEOPS_DUALBEACON_GET_D2(he_ops) (0)
16959 #define WMI_HEOPS_DUALBEACON_SET_D2(he_ops, value) {;}
16960 
16961 #define WMI_MAX_HECAP_PHY_SIZE                 (3)
16962 
16963 /* Dual Band both 2.4 GHz and 5 GHz Supported */
16964 #define WMI_HECAP_PHY_DB_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 0, 1)
16965 #define WMI_HECAP_PHY_DB_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 0, 1, value)
16966 
16967 /*
16968  * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
16969  * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
16970  * B2: Indicates STA supports 160 MHz channel width in 5 GHz
16971  * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
16972  * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
16973  *     RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
16974  * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
16975  *     242-tone RU mapping in 40 MHz and 80
16976  * MHz channel width in 5 GHz. Otherwise Reserved.
16977  * B6: Reserved
16978  */
16979 #define WMI_HECAP_PHY_CBW_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
16980 #define WMI_HECAP_PHY_CBW_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
16981 
16982 /*
16983  * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
16984  *     where in the preamble only the secondary 20 MHz is punctured
16985  * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
16986  *     where in the preamble only one of the two 20 MHz sub-channels in the
16987  *     secondary 40 MHz is punctured
16988  * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
16989  *     or 80+80 MHz, where in the primary 80 MHz of the preamble only the
16990  *     secondary 20 MHz is punctured
16991  * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
16992  *     or 80+80 MHz, where in the primary 80 MHz of the preamble, the
16993  *     primary 40 MHz is present
16994  */
16995 #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
16996 #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
16997 
16998 /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
16999 #define WMI_HECAP_PHY_COD_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
17000 #define WMI_HECAP_PHY_COD_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
17001 
17002 /* Indicates support of transmission and reception of LDPC encoded packets */
17003 #define WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
17004 #define WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
17005 
17006 /* Below 2 macros are for maintaining backward compatibility - Deprecated use WMI_HECAP_PHY_LDPC instead */
17007 #define WMI_HECAP_PHY_TXLDPC_GET_D2(he_cap_phy) WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy)
17008 #define WMI_HECAP_PHY_TXLDPC_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value)
17009 /* Below 2 macros are for maintaining backward compatibility - Deprecated use WMI_HECAP_PHY_LDPC instead */
17010 #define WMI_HECAP_PHY_RXLDPC_GET_D2(he_cap_phy) WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy)
17011 #define WMI_HECAP_PHY_RXLDPC_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value)
17012 
17013 /*
17014  * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
17015  */
17016 #define WMI_HECAP_PHY_LTFGIFORHE_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
17017 #define WMI_HECAP_PHY_LTFGIFORHE_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
17018 
17019 /*
17020  * When the Doppler Rx subfield is 1, indicates the maximum number of space-
17021  * time streams supported for reception when midamble is used in the Data field.
17022  */
17023 #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
17024 #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
17025 
17026 /*
17027  * B0: For a transmitting STA acting as beamformee, it indicates support of
17028  *     NDP reception using 4x LTF and 3.2 us guard interval duration
17029  */
17030 #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
17031 #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
17032 
17033 /* indicates support for the transmission of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
17034 #define WMI_HECAP_PHY_TXSTBC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
17035 #define WMI_HECAP_PHY_TXSTBC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
17036 
17037 /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
17038 #define WMI_HECAP_PHY_RXSTBC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
17039 #define WMI_HECAP_PHY_RXSTBC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
17040 
17041 /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
17042 #define WMI_HECAP_PHY_TXDOPPLER_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
17043 #define WMI_HECAP_PHY_TXDOPPLER_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
17044 
17045 /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
17046 #define WMI_HECAP_PHY_RXDOPPLER_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
17047 #define WMI_HECAP_PHY_RXDOPPLER_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
17048 
17049 /*
17050  * If the transmitting STA is an AP:
17051  *     indicates STA supports of reception of full bandwidth UL MU-MIMO
17052  *     transmission.
17053  * If the transmitting STA is a non-AP STA:
17054  *     indicates STA supports of transmission of full bandwidth UL MU-MIMO
17055  *     transmission.
17056  */
17057 #define WMI_HECAP_PHY_UL_MU_MIMO_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
17058 #define WMI_HECAP_PHY_UL_MU_MIMO_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
17059 
17060 /*
17061  * If the transmitting STA is an AP:
17062  *     indicates STA supports of reception of UL MUMIMO transmission on an
17063  *     RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
17064  * If the transmitting STA is a non-AP STA:
17065  *     indicates STA supports of transmission of UL MU-MIMO transmission on an
17066  *     RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
17067  */
17068 #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
17069 #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
17070 
17071 /* Tx DCM
17072  * B0:B1
17073  *     00: Does not support DCM
17074  *     01: BPSK
17075  *     10: QPSK
17076  *     11: 16-QAM
17077  * B2 signals maximum number of spatial streams with DCM
17078  *     0: 1 spatial stream
17079  *     1: 2 spatial streams
17080  */
17081 #define WMI_HECAP_PHY_DCMTX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
17082 #define WMI_HECAP_PHY_DCMTX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
17083 
17084 /* Rx DCM
17085  * B0:B1
17086  *     00: Does not support DCM
17087  *     01: BPSK
17088  *     10: QPSK
17089  *     11: 16-QAM
17090  * B2 signals maximum number of spatial streams with DCM
17091  *     0: 1 spatial stream
17092  *     1: 2 spatial streams
17093  */
17094 #define WMI_HECAP_PHY_DCMRX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
17095 #define WMI_HECAP_PHY_DCMRX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
17096 
17097 
17098 /*
17099  * Indicates that the STA supports the reception of an HE MU PPDU payload
17100  * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
17101  */
17102 #define WMI_HECAP_PHY_ULHEMU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
17103 #define WMI_HECAP_PHY_ULHEMU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
17104 
17105 /* Indicates support for operation as an SU beamformer */
17106 #define WMI_HECAP_PHY_SUBFMR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
17107 #define WMI_HECAP_PHY_SUBFMR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
17108 
17109 /* Indicates support for operation as an SU beamformee */
17110 #define WMI_HECAP_PHY_SUBFME_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
17111 #define WMI_HECAP_PHY_SUBFME_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
17112 
17113 /* Indicates support for operation as an MU Beamformer */
17114 #define WMI_HECAP_PHY_MUBFMR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
17115 #define WMI_HECAP_PHY_MUBFMR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
17116 
17117 /*
17118  * Num STS -1 for <= 80MHz (min val 3)
17119  * The maximum number of space-time streams minus 1 that the STA can
17120  * receive in an HE NDP
17121  */
17122 #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
17123 #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
17124 
17125 
17126 /*
17127  * Num STS -1 for > 80MHz (min val 3)
17128  * The maximum number of space-time streams minus 1 that the STA can
17129  * receive in an HE NDP
17130  */
17131 #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
17132 #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
17133 
17134 /*
17135  * Number Of Sounding Dimensions For <= 80 MHz
17136  * If SU beamformer capable, set to the maximum supported value of the
17137  * TXVECTOR parameter NUM_STS minus 1.
17138  * Otherwise, reserved.
17139  */
17140 #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
17141 #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
17142 
17143 /*
17144  * Number Of Sounding Dimensions For > 80 MHz
17145  * If SU beamformer capable, set to the maximum supported value of the
17146  * TXVECTOR parameter NUM_STS minus 1.
17147  * Otherwise, reserved.
17148  */
17149 #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
17150 #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
17151 
17152 /*
17153  * Indicates if the HE beamformee is capable of feedback with tone
17154  * grouping of 16 in the HE Compressed Beamforming Report field for
17155  * a SU-type feedback.
17156  */
17157 #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
17158 #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
17159 
17160 /*
17161  * Indicates if the HE beamformee is capable of feedback with tone
17162  * grouping of 16 in the HE Compressed Beamforming Report field for
17163  * a MU-type feedback.
17164  */
17165 #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
17166 #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
17167 
17168 /*
17169  * Indicates if HE beamformee is capable of feedback with codebook
17170  * size {4, 2} in the HECompressed Beamforming Report field for
17171  * a SU-type feedback.
17172  */
17173 #define WMI_HECAP_PHY_CODBK42SU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
17174 #define WMI_HECAP_PHY_CODBK42SU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
17175 
17176 /*
17177  * Indicates if HE beamformee is capable of feedback with codebook
17178  * size {7, 5} in the HE Compressed Beamforming Report field for
17179  * a MU-type feedback.
17180  */
17181 #define WMI_HECAP_PHY_CODBK75MU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
17182 #define WMI_HECAP_PHY_CODBK75MU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
17183 
17184 /*
17185  * Beamforming Feedback With Trigger Frame
17186  * If the transmitting STA is an AP STA:
17187  * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
17188  * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
17189  * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
17190  * If the transmitting STA is a non-AP STA:
17191  * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
17192  * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
17193  * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
17194  */
17195 #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
17196 #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
17197 
17198 /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
17199  * over the right 106-tone RU or partial BW ER
17200  */
17201 #define WMI_HECAP_PHY_HEERSU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
17202 #define WMI_HECAP_PHY_HEERSU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
17203 
17204 /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
17205  * where the RU does not span the entire PPDU bandwidth.
17206  */
17207 #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
17208 #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
17209 
17210 /* Indicates whether or not the PPE Threshold field is present */
17211 #define WMI_HECAP_PHY_PETHRESPRESENT_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
17212 #define WMI_HECAP_PHY_PETHRESPRESENT_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
17213 
17214 /* Indicates that the STA supports SRP-based SR operation */
17215 #define WMI_HECAP_PHY_SRPSPRESENT_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
17216 #define WMI_HECAP_PHY_SRPPRESENT_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
17217 
17218 /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
17219 #define WMI_HECAP_PHY_PWRBOOSTAR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
17220 #define WMI_HECAP_PHY_PWRBOOSTAR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
17221 
17222 /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
17223 #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
17224 #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
17225 
17226 /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
17227  * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
17228  * minus 1. Otherwise, reserved.
17229  */
17230 #define WMI_HECAP_PHY_MAXNC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
17231 #define WMI_HECAP_PHY_MAXNC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
17232 
17233 /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
17234  * STBC with one spatial stream
17235  */
17236 #define WMI_HECAP_PHY_STBCTXGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
17237 #define WMI_HECAP_PHY_STBCTXGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
17238 
17239 /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
17240  * STBC with one spatial stream
17241  */
17242 #define WMI_HECAP_PHY_STBCRXGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
17243 #define WMI_HECAP_PHY_STBCRXGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
17244 
17245 /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
17246 #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
17247 #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
17248 
17249 /*
17250  * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
17251  * 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.
17252  */
17253 #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
17254 #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
17255 
17256 /*
17257  * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
17258  * 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.
17259  */
17260 #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
17261 #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
17262 
17263 /*
17264  * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
17265  * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
17266  * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
17267  * 160 MHz HE TB PPDU.
17268  */
17269 #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
17270 #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
17271 
17272 /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
17273 #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
17274 #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
17275 
17276 /*
17277  * When the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF
17278  * 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
17279  * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
17280  */
17281 #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
17282 #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
17283 
17284 /*HTC + HE Support  Set to 1 if STA supports reception of HE Variant HT control Field*/
17285 #define WMI_HECAP_MAC_HECTRL_GET_D2(he_cap) WMI_GET_BITS(he_cap, 0, 1)
17286 #define WMI_HECAP_MAC_HECTRL_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
17287 
17288 /* set to 1 to for TWT Requestor support*/
17289 #define WMI_HECAP_MAC_TWTREQ_GET_D2(he_cap) WMI_GET_BITS(he_cap, 1, 1)
17290 #define WMI_HECAP_MAC_TWTREQ_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
17291 
17292 /* set to 1 to for TWT Responder support*/
17293 #define WMI_HECAP_MAC_TWTRSP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 2, 1)
17294 #define WMI_HECAP_MAC_TWTRSP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
17295 
17296 /* Level of frag support
17297    Set to 0 for no support for dynamic fragmentation.
17298    Set to 1 for support for dynamic fragments that are contained within a S-MPDU
17299    Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
17300         one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
17301    Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
17302         dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
17303         for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
17304 */
17305 #define WMI_HECAP_MAC_HEFRAG_GET_D2(he_cap) WMI_GET_BITS(he_cap, 3, 2)
17306 #define WMI_HECAP_MAC_HEFRAG_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
17307 
17308 /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs*/
17309 #define WMI_HECAP_MAC_MAXFRAGMSDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 5, 3)
17310 #define WMI_HECAP_MAC_MAXFRAGMSDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
17311 
17312 /* 0 =  no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
17313 #define WMI_HECAP_MAC_MINFRAGSZ_GET_D2(he_cap) WMI_GET_BITS(he_cap, 8, 2)
17314 #define WMI_HECAP_MAC_MINFRAGSZ_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
17315 
17316 /*0 = no additional processing time, 1 = 8us,2 = 16us */
17317 #define WMI_HECAP_MAC_TRIGPADDUR_GET_D2(he_cap) WMI_GET_BITS(he_cap, 10, 2)
17318 #define WMI_HECAP_MAC_TRIGPADDUR_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
17319 
17320 /*number of TIDs minus 1 of QoS Data frames that HE STA can aggregate in  multi-TID AMPDU*/
17321 #define WMI_HECAP_MAC_MTID_GET_D2(he_cap) WMI_GET_BITS(he_cap, 12, 3)
17322 #define WMI_HECAP_MAC_MTID_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
17323 
17324 /*
17325  * Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
17326  * a QoS Data frame for which no block ack agreement exists.
17327  */
17328 #define WMI_HECAP_MAC_AMSDUINAMPDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 15, 1)
17329 #define WMI_HECAP_MAC_AMSDUINAMPDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 15, 1, value)
17330 
17331 /*--- HECAP_MAC_HELKAD: DO NOT USE - DEPRECATED ---*/
17332 /*0=No Feedback,2=Unsolicited,3=Both*/
17333 #define WMI_HECAP_MAC_HELKAD_GET_D2(he_cap) (0)
17334 #define WMI_HECAP_MAC_HELKAD_SET_D2(he_cap, value) {;}
17335 
17336 /* bit 16 reserved. */
17337 
17338 /*Set to 1 for reception of AllAck support*/
17339 #define WMI_HECAP_MAC_AACK_GET_D2(he_cap) WMI_GET_BITS(he_cap, 17, 1)
17340 #define WMI_HECAP_MAC_AACK_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
17341 
17342 /*Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field*/
17343 #define WMI_HECAP_MAC_ULMURSP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 18, 1)
17344 #define WMI_HECAP_MAC_ULMURSP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
17345 
17346 /*Set to 1 if the STA supports the BSR A-Control field functionality.*/
17347 #define WMI_HECAP_MAC_BSR_GET_D2(he_cap) WMI_GET_BITS(he_cap, 19, 1)
17348 #define WMI_HECAP_MAC_BSR_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
17349 
17350 /*Set to 1 when the STA supports broadcast TWT functionality.*/
17351 #define WMI_HECAP_MAC_BCSTTWT_GET_D2(he_cap) WMI_GET_BITS(he_cap, 20, 1)
17352 #define WMI_HECAP_MAC_BCSTTWT_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
17353 
17354 /*Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap*/
17355 #define WMI_HECAP_MAC_32BITBA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 21, 1)
17356 #define WMI_HECAP_MAC_32BITBA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
17357 
17358 /*Set to 1 if the STA supports MU cascading operation*/
17359 #define WMI_HECAP_MAC_MUCASCADE_GET_D2(he_cap) WMI_GET_BITS(he_cap, 22, 1)
17360 #define WMI_HECAP_MAC_MUCASCADE_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
17361 
17362 /*Set to 1 when the STA supports reception of this multi-TID A-MPDU format*/
17363 #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 23, 1)
17364 #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
17365 
17366 /*Set to 1 when the STA supports its reception*/
17367 #define WMI_HECAP_MAC_GROUPMSTABA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 24, 1)
17368 #define WMI_HECAP_MAC_GROUPMSTABA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 24, 1, value)
17369 
17370 /*Set to 1 if the STA supports reception of the OMI A-Control field*/
17371 #define WMI_HECAP_MAC_OMI_GET_D2(he_cap) WMI_GET_BITS(he_cap, 25, 1)
17372 #define WMI_HECAP_MAC_OMI_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
17373 
17374 /*1 if OFDMA Random Access Supported*/
17375 #define WMI_HECAP_MAC_OFDMARA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 26, 1)
17376 #define WMI_HECAP_MAC_OFDMARA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
17377 
17378 /* Maximum AMPDU Length Exponent.
17379  * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
17380  * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
17381  * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
17382  * padding is not included in this limit.
17383 */
17384 #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 27, 2)
17385 #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
17386 
17387 /*A-MSDU Fragmentation Support*/
17388 #define WMI_HECAP_MAC_AMSDUFRAG_GET_D2(he_cap) WMI_GET_BITS(he_cap, 29, 1)
17389 #define WMI_HECAP_MAC_AMSDUFRAG_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
17390 
17391 /*Flexible TWT Schedule Support*/
17392 #define WMI_HECAP_MAC_FLEXTWT_GET_D2(he_cap) WMI_GET_BITS(he_cap, 30, 1)
17393 #define WMI_HECAP_MAC_FLEXTWT_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
17394 
17395 /*Rx Control Frame to MultiBSS*/
17396 #define WMI_HECAP_MAC_MBSS_GET_D2(he_cap) WMI_GET_BITS(he_cap, 31, 1)
17397 #define WMI_HECAP_MAC_MBSS_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
17398 
17399 /* BSRP A-MPDU Aggregation
17400  * maintaining compatibility since we don't support this now so not wasting memory
17401  */
17402 #define WMI_HECAP_MAC_BSRPAMPDU_GET_D2(he_cap) (0)
17403 #define WMI_HECAP_MAC_BSRPAMPDU_SET_D2(he_cap, value) {;}
17404 
17405 /* Quiet Time Period (QTP) operation
17406  * maintaining compatibility since we don't support this now so not wasting memory
17407  */
17408 #define WMI_HECAP_MAC_QTP_GET_D2(he_cap) (0)
17409 #define WMI_HECAP_MAC_QTP_SET_D2(he_cap, value) {;}
17410 
17411 /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
17412  * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
17413  * that contains a BQR in the A-Control subfield
17414  * maintaining compatibility since we don't support this now so not wasting memory
17415  */
17416 #define WMI_HECAP_MAC_ABQR_GET_D2(he_cap) (0)
17417 #define WMI_HECAP_MAC_ABQR_SET_D2(he_cap, value) {;}
17418 
17419 /*Indicates support by the STA for the role of SR Responder.*/
17420 #define WMI_HECAP_MAC_SRRESP_GET_D2(he_cap) (0)
17421 #define WMI_HECAP_MAC_SRRESP_SET_D2(he_cap, value) {;}
17422 
17423 /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
17424  * frames or TIM frames as described in AP operation for opportunistic power save.
17425  * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
17426  */
17427 #define WMI_HECAP_MAC_OPS_GET_D2(he_cap) (0)
17428 #define WMI_HECAP_MAC_OPS_SET_D2(he_cap, value) {;}
17429 
17430 /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
17431  * the NDP Feedback Report Poll Trigger frame.
17432  */
17433 #define WMI_HECAP_MAC_NDPFDBKRPT_GET_D2(he_cap) (0)
17434 #define WMI_HECAP_MAC_NDPFDBKRPT_SET_D2(he_cap, value) {;}
17435 
17436 /* BELOW MACROS ARE DEPRECATED Also we are not defining bits for capabilities
17437  * beyond bit 31 we donot support as it adds additional dword to our struct which may be later
17438  * removed by standard
17439  */
17440 #define WMI_HECAP_MAC_MBAHECTRL_GET_D2(he_cap) (0) /* DO NOT USE - DEPRECATED*/
17441 #define WMI_HECAP_MAC_MBAHECTRL_SET_D2(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
17442 
17443 #define WMI_HECAP_MAC_MURTS_GET_D2(he_cap) (0) /* DO NOT USE - DEPRECATED*/
17444 #define WMI_HECAP_MAC_MURTS_SET_D2(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
17445 
17446 /*Deprecate use  WMI_HECAP_PHY_PREAMBLEPUNCRX instead*/
17447 #define WMI_HECAP_PHY_CBMODE_GET_D2(he_cap_phy) WMI_HECAP_PHY_CBMODE_GET_D2(he_cap_phy)
17448 #define WMI_HECAP_PHY_CBMODE_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_CBMODE_SET_D2(he_cap_phy, value)
17449 
17450 
17451 /* Below 2 macros are for maintaining backward compatibility - Deprecated use WMI_HECAP_PHY_LTFGIFORHE_GET instead */
17452 #define WMI_HECAP_PHY_OLTF_GET_D2(he_cap_phy) WMI_HECAP_PHY_LTFGIFORHE_GET_D2(he_cap_phy)
17453 #define WMI_HECAP_PHY_OLTF_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LTFGIFORHE_SET_D2(he_cap_phy, value)
17454 
17455 
17456 /*DEPRECATED - USE WMI_HECAP_PHY_BFMENLTSGT80MHZ*/
17457 #define WMI_HECAP_PHY_SUBFMESTS_GET_D2(he_cap_phy) WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2(he_cap_phy)
17458 #define WMI_HECAP_PHY_SUBFMESTS_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2(he_cap_phy, value)
17459 
17460 /*DEPRECATED - use WMI_HECAP_PHY_PETHRESPRESENT**/
17461 #define WMI_HECAP_PHY_PADDING_GET_D2(he_cap_phy) WMI_HECAP_PHY_PETHRESPRESENT_GET_D2(he_cap_phy)
17462 #define WMI_HECAP_PHY_PADDING_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_PETHRESPRESENT_SET_D2(he_cap_phy, value)
17463 
17464 
17465 /**DO NOT USE - DEPRECATED*/
17466 #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET_D2(he_cap_phy) (0)
17467 #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET_D2(he_cap_phy, value) {;}
17468 
17469 /*DO NOT USE - DEPRECATED**/
17470 #define WMI_HECAP_PHY_32GI_GET_D2(he_cap_phy) (0)
17471 #define WMI_HECAP_PHY_32GI_SET_D2(he_cap_phy, value) {;}
17472 
17473 /*DO NOT USE - DEPRECATED**/
17474 #define WMI_HECAP_PHY_NOSUNDIMENS_GET_D2(he_cap_phy) (0)
17475 #define WMI_HECAP_PHY_NOSUNDIMENS_SET_D2(he_cap_phy, value) {;}
17476 
17477 /*DO NOT USE - DEPRECATED**/
17478 #define WMI_HECAP_PHY_40MHZNSS_GET_D2(he_cap_phy)(0)
17479 #define WMI_HECAP_PHY_40MHZNSS_SET_D2(he_cap_phy, value) {;}
17480 
17481 
17482 /* START TEMPORARY WORKAROUND -
17483  * Leave legacy names as aliases for new names, until all references to the
17484  * legacy names have been removed.
17485  */
17486 #define WMI_HECAP_PHY_ULOFDMA_GET_D2 WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2
17487 #define WMI_HECAP_PHY_ULOFDMA_SET_D2 WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2
17488 /* END TEMPORARY WORKAROUND */
17489 
17490 /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
17491 #define WMI_HECAP_PHY_DCM_GET_D2(he_cap_phy) WMI_HECAP_PHY_DCMRX_GET_D2(he_cap_phy)
17492 #define WMI_HECAP_PHY_DCM_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_DCMRX_SET_D2(he_cap_phy, value)
17493 
17494 /*
17495  * The maximum value for NSTS-1<=80MHz,(min val 3)total that can be sent
17496  * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
17497  */
17498 #define WMI_HECAP_PHY_NSTSLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
17499 #define WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
17500 
17501 
17502 /*
17503  * The maximum value for NSTS-1 > 80MHz (min val 3) total that can be sent
17504  * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
17505  */
17506 #define WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
17507 #define WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
17508 
17509 /*
17510  * Indicates the spatial multiplexing power save mode after receiving a
17511  * Trigger frame that is in operation immediately after (re)association.
17512  */
17513 #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D2(he_cap2) (0)
17514 #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D2(he_cap2, value) {;}
17515 
17516 /* Indicates support for Punctured Sounding */
17517 #define WMI_HECAP_MAC_PUNCSOUNDING_GET_D2(he_cap2) (0)
17518 #define WMI_HECAP_MAC_PUNCSOUNDING_SET_D2(he_cap2, value) {;}
17519 
17520 /*
17521  * Indicates support for receiving a Trigger frame in an HT PPDU and
17522  * receiving a Trigger frame in a VHT PPDU
17523  */
17524 #define WMI_HECAP_MAC_HTVHTTRIGRX_GET_D2(he_cap2) (0)
17525 #define WMI_HECAP_MAC_HTVHTTRIGRX_SET_D2(he_cap2, value) {;}
17526 
17527 #define WMI_GET_HW_RATECODE_PREAM_V1(_rcode)     (((_rcode) >> 8) & 0x7)
17528 #define WMI_GET_HW_RATECODE_NSS_V1(_rcode)       (((_rcode) >> 5) & 0x7)
17529 #define WMI_GET_HW_RATECODE_RATE_V1(_rcode)      (((_rcode) >> 0) & 0x1F)
17530 #define WMI_ASSEMBLE_RATECODE_V1(_rate, _nss, _pream) \
17531             (((1) << 28) | ((_pream) << 8) | ((_nss) << 5) | (_rate))
17532 
17533 typedef struct {
17534     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
17535     /** unique id identifying the VDEV, generated by the caller */
17536     A_UINT32 vdev_id;
17537     /** requestor id identifying the caller module */
17538     A_UINT32 requestor_id;
17539     /** beacon interval from received beacon */
17540     A_UINT32 beacon_interval;
17541     /** DTIM Period from the received beacon */
17542     A_UINT32 dtim_period;
17543     /** Flags */
17544     A_UINT32 flags;
17545     /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
17546     wmi_ssid ssid;
17547     /** beacon/probe response xmit rate. Applicable for SoftAP. */
17548     /** This field will be invalid and ignored unless the */
17549     /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
17550     /** When valid, this field contains the fixed tx rate for the beacon */
17551     /** and probe response frames send by the GO or SoftAP */
17552     A_UINT32 bcn_tx_rate;
17553     /** beacon/probe response xmit power. Applicable for SoftAP. */
17554     A_UINT32 bcn_txPower;
17555     /** number of p2p NOA descriptor(s) from scan entry */
17556     A_UINT32 num_noa_descriptors;
17557     /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
17558      During CAC, Our HW shouldn't ack ditected frames */
17559     A_UINT32 disable_hw_ack;
17560     /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
17561     /** The DBS policy manager indicates the preferred number of transmit streams. */
17562     A_UINT32 preferred_tx_streams;
17563     /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
17564     /** the DBS policy manager indicates the preferred number of receive streams. */
17565     A_UINT32 preferred_rx_streams;
17566     A_UINT32 he_ops; /* refer to WMI_HEOPS_xxx macros */
17567     A_UINT32 cac_duration_ms;  /* in milliseconds */
17568     A_UINT32 regdomain;
17569     /* min data rate to be used in BSS in Mbps */
17570     A_UINT32 min_data_rate;
17571 
17572     /** @mbss_capability_flags: Bitmap of vdev's MBSS/EMA capability.
17573      *  Capabilities are combination of below flags:
17574      *     VDEV_FLAGS_NON_MBSSID_AP
17575      *     VDEV_FLAGS_TRANSMIT_AP
17576      *     VDEV_FLAGS_NON_TRANSMIT_AP
17577      *     VDEV_FLAGS_EMA_MODE
17578      *     VDEV_FLAGS_SCAN_MODE_VAP - if the vdev is used for scan radio
17579      */
17580     A_UINT32 mbss_capability_flags;
17581 
17582     /** vdevid of transmitting VAP (mbssid case). Ignored for non mbssid case */
17583     A_UINT32 vdevid_trans;
17584     A_UINT32 eht_ops;
17585     A_UINT32 puncture_20mhz_bitmap; /* each bit indicates one 20 MHz BW punctured */
17586 
17587     A_UINT32 mbssid_multi_group_flag; /* Flag to identify whether multi group mbssid is supported */
17588     A_UINT32 mbssid_multi_group_id; /* Group id of current vdev only valid when multi group mbssid is supported */
17589     /* Target TSF value by which VDEV restart procedure should be completed in FW */
17590     A_UINT32 target_tsf_us_lo; /* bits 31:0 */
17591     A_UINT32 target_tsf_us_hi; /* bits 63:32 */
17592 
17593 /* The TLVs follows this structure:
17594  *     wmi_channel chan; <-- WMI channel
17595  *     wmi_p2p_noa_descriptor  noa_descriptors[]; <-- actual p2p NOA descriptor from scan entry
17596  *     wmi_vdev_start_mlo_params  mlo_params[0,1]; <-- vdev start MLO parameters
17597  *         optional TLV, only present for MLO vdevs,
17598  *         If the vdev is non-MLO the array length should be 0.
17599  *     wmi_partner_link_info link_info[]; <-- partner link info
17600  *         optional TLV, only present for MLO vdevs,
17601  *         If the vdev is non-MLO the array length should be 0.
17602  *     wmi_channel dbw_chan; <-- WMI channel
17603  *         optional TLV for dbw_chan
17604  *     wmi_dbw_chan_info dbw_chan_info
17605  *         optional TLV used for dbw_chan_info
17606  */
17607 } wmi_vdev_start_request_cmd_fixed_param;
17608 
17609 typedef struct {
17610     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
17611     /** unique id identifying the VDEV, generated by the caller */
17612     A_UINT32 vdev_id;
17613 } wmi_vdev_delete_cmd_fixed_param;
17614 
17615 typedef struct {
17616     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_dfs_ap_config_fixed_param */
17617     /** unique id identifying the VDEV, generated by the caller */
17618     A_UINT32 vdev_id;
17619     /** "set" field:
17620      * HOST to specify a non-zero value if DFS master AP config is to be added,
17621      * or a zero value if it is to be removed.
17622      */
17623     A_UINT32 set;
17624     /* The TLVs follows this structure:
17625      *  wmi_mac_addr bssid; <-- bssid for P2P GO's STA's connected AP,
17626      *                          STA's connected AP is DFS master
17627      *  optional TLV used for bssid
17628      * wmi_mac_addr non_tx_bssid; <-- bssid for P2P GO's STA's connected AP,
17629      *                                if connected to non TX VAP
17630      *  optional TLV used for bssid
17631      */
17632 } wmi_p2p_go_dfs_ap_config_fixed_param;
17633 
17634 enum WMI_VDEV_UP_FLAGS {
17635     /** EMA_MBSSID_AP
17636      * Valid only for STA VDEV.
17637      * This flag will be set when STA connected MBSSID AP is EMA capable.
17638      * EMA - Enhanced Multiple BSS Advertisemet.
17639      */
17640     WMI_VDEV_UP_FLAG_EMA_MBSSID_AP = 0x00000001,
17641 };
17642 
17643 typedef struct {
17644     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
17645     /** unique id identifying the VDEV, generated by the caller */
17646     A_UINT32 vdev_id;
17647     /** aid (assoc id) received in association response for STA VDEV  */
17648     A_UINT32 vdev_assoc_id;
17649     /** bssid of the BSS the VDEV is joining  */
17650     wmi_mac_addr vdev_bssid;
17651     /** bssid of transmitted AP (mbssid case) */
17652     wmi_mac_addr trans_bssid;
17653     /** the profile index of the connected non-trans ap (mbssid case). 0 means invalid */
17654     A_UINT32 profile_idx;
17655     /** the total profile numbers of non-trans aps (mbssid case). 0 means legacy AP */
17656     A_UINT32 profile_num;
17657     /** flags - this is a bitwise-or combination of WMI_VDEV_UP_FLAGS values */
17658     A_UINT32 flags;
17659 } wmi_vdev_up_cmd_fixed_param;
17660 
17661 typedef struct {
17662     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
17663     /** unique id identifying the VDEV, generated by the caller */
17664     A_UINT32 vdev_id;
17665 
17666     /* The TLVs follows this structure:
17667      *   - wmi_vdev_stop_mlo_params mlo_params[0/1];
17668      *     optional TLV, host may provide this TLV to indicate the vdev stop
17669      *     is done for link switch.
17670      */
17671 } wmi_vdev_stop_cmd_fixed_param;
17672 
17673 typedef struct {
17674     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
17675     /** unique id identifying the VDEV, generated by the caller */
17676     A_UINT32 vdev_id;
17677 } wmi_vdev_down_cmd_fixed_param;
17678 
17679 typedef struct {
17680     /** unique id identifying the VDEV, generated by the caller */
17681     A_UINT32 vdev_id;
17682 } wmi_vdev_standby_response_cmd;
17683 
17684 typedef struct {
17685     /** unique id identifying the VDEV, generated by the caller */
17686     A_UINT32 vdev_id;
17687 } wmi_vdev_resume_response_cmd;
17688 
17689 typedef struct {
17690     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
17691     /** unique id identifying the VDEV, generated by the caller */
17692     A_UINT32 vdev_id;
17693     /** parameter id   */
17694     A_UINT32 param_id;
17695     /** parameter value */
17696     A_UINT32 param_value;
17697 } wmi_vdev_set_param_cmd_fixed_param;
17698 
17699 typedef struct {
17700     A_UINT32 key_seq_counter_l;
17701     A_UINT32 key_seq_counter_h;
17702 } wmi_key_seq_counter;
17703 
17704 #define  WMI_CIPHER_NONE         0x0  /* clear key */
17705 #define  WMI_CIPHER_WEP          0x1
17706 #define  WMI_CIPHER_TKIP         0x2
17707 #define  WMI_CIPHER_AES_OCB      0x3
17708 #define  WMI_CIPHER_AES_CCM      0x4
17709 #define  WMI_CIPHER_WAPI         0x5
17710 #define  WMI_CIPHER_CKIP         0x6
17711 #define  WMI_CIPHER_AES_CMAC     0x7
17712 #define  WMI_CIPHER_ANY          0x8
17713 #define  WMI_CIPHER_AES_GCM      0x9
17714 #define  WMI_CIPHER_AES_GMAC     0xa
17715 #define  WMI_CIPHER_WAPI_GCM_SM4 0xb
17716 #define  WMI_CIPHER_BIP_CMAC_128 0xc
17717 #define  WMI_CIPHER_BIP_CMAC_256 0xd
17718 #define  WMI_CIPHER_BIP_GMAC_128 0xe
17719 #define  WMI_CIPHER_BIP_GMAC_256 0xf
17720 
17721 typedef struct {
17722     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
17723     /** unique id identifying the VDEV, generated by the caller */
17724     A_UINT32 vdev_id;
17725     /** MAC address used for installing   */
17726     wmi_mac_addr peer_macaddr;
17727     /** key index */
17728     A_UINT32 key_ix;
17729     /** key flags */
17730     A_UINT32 key_flags;
17731     /** key cipher, defined above */
17732     A_UINT32 key_cipher;
17733     /** key rsc counter */
17734     wmi_key_seq_counter key_rsc_counter;
17735     /** global key rsc counter */
17736     wmi_key_seq_counter key_global_rsc_counter;
17737     /** global key tsc counter */
17738     wmi_key_seq_counter key_tsc_counter;
17739     /** WAPI key rsc counter */
17740     A_UINT8 wpi_key_rsc_counter[16];
17741     /** WAPI key tsc counter */
17742     A_UINT8 wpi_key_tsc_counter[16];
17743     /** key length */
17744     A_UINT32 key_len;
17745     /** key tx mic length */
17746     A_UINT32 key_txmic_len;
17747     /** key rx mic length */
17748     A_UINT32 key_rxmic_len;
17749     /** specifies if the group_key_ix is valid, filled by the sender */
17750     A_UINT32 is_group_key_ix_valid;
17751     /** Multi group key ID */
17752     A_UINT32 group_key_ix;
17753 /*
17754  * Following this struct are this TLV.
17755  *     A_UINT8  key_data[]; <-- actual key data; contains key followed by tx mic followed by rx mic
17756  */
17757 } wmi_vdev_install_key_cmd_fixed_param;
17758 
17759 typedef struct {
17760     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_ltf_key_seed_cmd_fixed_param */
17761     /** unique id identifying the VDEV, generated by the caller */
17762     A_UINT32 vdev_id;
17763     /** MAC address used for deriving */
17764     wmi_mac_addr peer_macaddr;
17765     /** authentication mode */
17766     A_UINT32 rsn_authmode;
17767     /** LTF key seed length */
17768     A_UINT32 key_seed_len;
17769 /*
17770  * Following this struct are this TLV.
17771  *     A_UINT8  key_seed[key_seed_len]; <-- actual LTF key seed;
17772  */
17773 } wmi_vdev_set_ltf_key_seed_cmd_fixed_param;
17774 
17775 /** Preamble types to be used with VDEV fixed rate configuration */
17776 typedef enum {
17777     WMI_RATE_PREAMBLE_OFDM,
17778     WMI_RATE_PREAMBLE_CCK,
17779     WMI_RATE_PREAMBLE_HT,
17780     WMI_RATE_PREAMBLE_VHT,
17781     WMI_RATE_PREAMBLE_HE,
17782     WMI_RATE_PREAMBLE_EHT,
17783 } WMI_RATE_PREAMBLE;
17784 
17785 /** Value to disable fixed rate setting */
17786 #define WMI_FIXED_RATE_NONE    (0xff)
17787 
17788 #define WMI_GI_400_NS 1
17789 #define WMI_GI_800_NS 0
17790 #define WMI_GI_1600_NS 2
17791 #define WMI_GI_3200_NS 3
17792 
17793 /** OCE(Optimized Connectivity_Experience) Feature flags */
17794 #define WMI_VDEV_OCE_PROBE_REQUEST_RATE_FEATURE_BITMAP                 0x1
17795 #define WMI_VDEV_OCE_PROBE_RESPONSE_RATE_FEATURE_BITMAP                0x2
17796 #define WMI_VDEV_OCE_BEACON_RATE_FEATURE_BITMAP                        0x4
17797 #define WMI_VDEV_OCE_PROBE_REQUEST_DEFERRAL_FEATURE_BITMAP             0x8
17798 #define WMI_VDEV_OCE_FILS_DISCOVERY_FRAME_FEATURE_BITMAP               0x10
17799 #define WMI_VDEV_OCE_ESP_FEATURE_BITMAP                                0x20
17800 #define WMI_VDEV_OCE_REASSOC_REJECT_FEATURE_BITMAP                     0x40
17801 
17802 /** 6 GHZ params **/
17803 /* Control to enable/disable beacon tx in non-HT duplicate */
17804 #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_BEACON                    0x1
17805 /* Control to enable/disable broadcast probe response tx in non-HT duplicate */
17806 #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_BCAST_PROBE_RSP           0x2
17807 /* Control to enable/disable FILS discovery frame tx in non-HT duplicate */
17808 #define WMI_VDEV_6GHZ_BITMAP_NON_HT_DUPLICATE_FD_FRAME                  0x4
17809 /* Control to enable/disable periodic FILS discovery frame transmission */
17810 #define WMI_VDEV_6GHZ_BITMAP_FD_FRAME                                   0x8  /* deprecated */
17811 /* Control to enable/disable periodic broadcast probe response transmission */
17812 #define WMI_VDEV_6GHZ_BITMAP_BCAST_PROBE_RSP                            0x10 /* deprecated */
17813 
17814 /** ROAM_11KV control params */
17815 
17816 /* WMI_VDEV_ROAM_11KV_CTRL_DISABLE_FW_TRIGGER_ROAMING:
17817  * Disable all FW-triggered roaming (e.g. low RSSI/final bmiss/BTM/PER)
17818  * while still allowing host-invoked roaming.
17819  */
17820 #define WMI_VDEV_ROAM_11KV_CTRL_DISABLE_FW_TRIGGER_ROAMING              0x1
17821 /* WMI_VDEV_ROAM_11KV_CTRL_KEEP_CONN_RECV_BTM_REQ:
17822  * DUT do not scan or roaming when receiving BTM req frame
17823  */
17824 #define WMI_VDEV_ROAM_11KV_CTRL_KEEP_CONN_RECV_BTM_REQ                  0x2
17825 /* WMI_VDEV_ROAM_11KV_CTRL_DONOT_SEND_DISASSOC_ON_BTM_DI_SET:
17826  * DUT do not send disasoc frame to AP when receiving BTM req with
17827  * Disassoc Imminent bit set to 1.
17828  */
17829 #define WMI_VDEV_ROAM_11KV_CTRL_DONOT_SEND_DISASSOC_ON_BTM_DI_SET       0x4
17830 
17831 
17832 /** NAN vdev config Feature flags */
17833 #define WMI_VDEV_NAN_ALLOW_DW_CONFIG_CHANGE_IN_SYNC_ROLE                0x1
17834 #define WMI_VDEV_NAN_FORCE_CONGIG_WOW_DB_INTERVAL                       0x2
17835 
17836 
17837 /** the definition of different VDEV parameters */
17838 typedef enum {
17839     /** RTS Threshold */
17840     WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
17841     /** Fragmentation threshold */
17842     WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,                   /* 0x2 */
17843     /** beacon interval in TUs */
17844     WMI_VDEV_PARAM_BEACON_INTERVAL,                           /* 0x3 */
17845     /** Listen interval in TUs */
17846     WMI_VDEV_PARAM_LISTEN_INTERVAL,                           /* 0x4 */
17847     /** multicast rate in Mbps */
17848     WMI_VDEV_PARAM_MULTICAST_RATE,                            /* 0x5 */
17849     /** management frame rate in Mbps */
17850     WMI_VDEV_PARAM_MGMT_TX_RATE,                              /* 0x6 */
17851     /** slot time (long vs short) */
17852     WMI_VDEV_PARAM_SLOT_TIME,                                 /* 0x7 */
17853     /** preamble (long vs short) */
17854     WMI_VDEV_PARAM_PREAMBLE,                                  /* 0x8 */
17855     /** SWBA time (time before tbtt in msec) */
17856     WMI_VDEV_PARAM_SWBA_TIME,                                 /* 0x9 */
17857     /** time period for updating VDEV stats */
17858     WMI_VDEV_STATS_UPDATE_PERIOD,                             /* 0xa */
17859     /** age out time in msec for frames queued for station in power save*/
17860     WMI_VDEV_PWRSAVE_AGEOUT_TIME,                             /* 0xb */
17861     /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
17862     WMI_VDEV_HOST_SWBA_INTERVAL,                              /* 0xc */
17863     /** DTIM period (specified in units of num beacon intervals) */
17864     WMI_VDEV_PARAM_DTIM_PERIOD,                               /* 0xd */
17865     /** scheduler air time limit for this VDEV. used by off chan scheduler  */
17866     WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,                     /* 0xe */
17867     /** enable/disable WDS for this VDEV  */
17868     WMI_VDEV_PARAM_WDS,                                       /* 0xf */
17869     /** ATIM Window */
17870     WMI_VDEV_PARAM_ATIM_WINDOW,                               /* 0x10 */
17871     /** BMISS max */
17872     WMI_VDEV_PARAM_BMISS_COUNT_MAX,                           /* 0x11 */
17873     /** BMISS first time */
17874     WMI_VDEV_PARAM_BMISS_FIRST_BCNT,                          /* 0x12 */
17875     /** BMISS final time */
17876     WMI_VDEV_PARAM_BMISS_FINAL_BCNT,                          /* 0x13 */
17877     /** WMM enables/disabled */
17878     WMI_VDEV_PARAM_FEATURE_WMM,                               /* 0x14 */
17879     /** Channel width */
17880     WMI_VDEV_PARAM_CHWIDTH,                                   /* 0x15 */
17881     /** Channel Offset */
17882     WMI_VDEV_PARAM_CHEXTOFFSET,                               /* 0x16 */
17883     /** Disable HT Protection */
17884     WMI_VDEV_PARAM_DISABLE_HTPROTECTION,                      /* 0x17 */
17885     /** Quick STA Kickout */
17886     WMI_VDEV_PARAM_STA_QUICKKICKOUT,                          /* 0x18 */
17887     /** Rate to be used with Management frames */
17888     WMI_VDEV_PARAM_MGMT_RATE,                                 /* 0x19 */
17889     /** Protection Mode */
17890     WMI_VDEV_PARAM_PROTECTION_MODE,                           /* 0x1a */
17891     /** Fixed rate setting
17892      * The top nibble is used to select which format to use for encoding
17893      * the rate specification: 0xVXXXXXXX
17894      * If V == 0b0000: format is same as before: 0x000000RR
17895      * If V == 0b0001: format is: 0x1000RRRR.
17896      *                 This will be output of WMI_ASSEMBLE_RATECODE_V1
17897      * The host shall use the new V1 format (and set V = 0x1) if the target
17898      * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
17899      * system is configured with Nss > 4 (either at compile time within the
17900      * host driver, or through WMI_SERVICE_READY PHY capabilities provided
17901      * by the target).
17902      */
17903     WMI_VDEV_PARAM_FIXED_RATE,                                /* 0x1b */
17904     /**
17905      * 11AX: GI =
17906      *     WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
17907      * 11N: SGI=WMI_GI_400_NS
17908      */
17909     WMI_VDEV_PARAM_SGI,                                       /* 0x1c */
17910     /** Enable LDPC */
17911     WMI_VDEV_PARAM_LDPC,                                      /* 0x1d */
17912     /** Enable Tx STBC */
17913     WMI_VDEV_PARAM_TX_STBC,                                   /* 0x1e */
17914     /** Enable Rx STBC */
17915     WMI_VDEV_PARAM_RX_STBC,                                   /* 0x1f */
17916     /** Intra BSS forwarding  */
17917     WMI_VDEV_PARAM_INTRA_BSS_FWD,                             /* 0x20 */
17918     /** Setting Default xmit key for Vdev */
17919     WMI_VDEV_PARAM_DEF_KEYID,                                 /* 0x21 */
17920     /** NSS width */
17921     WMI_VDEV_PARAM_NSS,                                       /* 0x22 */
17922     /** Set the custom rate for the broadcast data frames */
17923     WMI_VDEV_PARAM_BCAST_DATA_RATE,                           /* 0x23 */
17924     /** Set the custom rate (rate-code) for multicast data frames */
17925     WMI_VDEV_PARAM_MCAST_DATA_RATE,                           /* 0x24 */
17926     /** Tx multicast packet indicate Enable/Disable */
17927     WMI_VDEV_PARAM_MCAST_INDICATE,                            /* 0x25 */
17928     /** Tx DHCP packet indicate Enable/Disable */
17929     WMI_VDEV_PARAM_DHCP_INDICATE,                             /* 0x26 */
17930     /** Enable host inspection of Tx unicast packet to unknown destination */
17931     WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,                     /* 0x27 */
17932 
17933     /* The minimum amount of time AP begins to consider STA inactive */
17934     WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,  /* 0x28 */
17935 
17936     /* An associated STA is considered inactive when there is no recent TX/RX
17937      * activity and no downlink frames are buffered for it. Once a STA exceeds
17938      * the maximum idle inactive time, the AP will send an 802.11 data-null as
17939      * a keep alive to verify the STA is still associated. If the STA does ACK
17940      * the data-null, or if the data-null is buffered and the STA does not
17941      * retrieve it, the STA will be considered unresponsive (see
17942      * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
17943     WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,  /* 0x29 */
17944 
17945     /* An associated STA is considered unresponsive if there is no recent
17946      * TX/RX activity and downlink frames are buffered for it. Once a STA
17947      * exceeds the maximum unresponsive time, the AP will send a
17948      * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
17949     WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,   /* 0x2a */
17950 
17951     /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
17952     WMI_VDEV_PARAM_AP_ENABLE_NAWDS,                           /* 0x2b */
17953     /** Enable/Disable RTS-CTS */
17954     WMI_VDEV_PARAM_ENABLE_RTSCTS,                             /* 0x2c */
17955     /* Enable TXBFee/er */
17956     WMI_VDEV_PARAM_TXBF,                                      /* 0x2d */
17957 
17958     /**Set packet power save */
17959     WMI_VDEV_PARAM_PACKET_POWERSAVE,                          /* 0x2e */
17960 
17961     /**Drops un-encrypted packets if any received in an encryted connection
17962      * otherwise forwards to host
17963      */
17964     WMI_VDEV_PARAM_DROP_UNENCRY,                              /* 0x2f */
17965 
17966     /*
17967      * Set TX encap type.
17968      *
17969      * enum wmi_pkt_type is to be used as the parameter
17970      * specifying the encap type.
17971      */
17972     WMI_VDEV_PARAM_TX_ENCAP_TYPE,                             /* 0x30 */
17973 
17974     /*
17975      * Try to detect stations that woke-up and exited power save but did not
17976      * successfully transmit data-null with PM=0 to AP. When this happens,
17977      * STA and AP power save state are out-of-sync. Use buffered but
17978      * undelivered MSDU to the STA as a hint that the STA is really awake
17979      * and expecting normal ASAP delivery, rather than retrieving BU with
17980      * PS-Poll, U-APSD trigger, etc.
17981      *
17982      * 0 disables out-of-sync detection. Maximum time is 255 seconds.
17983      */
17984     WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,  /* 0x31 */
17985 
17986     /* Enable/Disable early rx dynamic adjust feature.
17987      * Early-rx dynamic adjust is a advance power save feature.
17988      * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
17989      * timing discrepancies in the system.
17990      * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
17991      * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
17992      * properly to minimum the power consume.*/
17993     WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE,                    /* 0x32 */
17994 
17995     /* set target bmiss number per sample cycle if bmiss adjust was chosen.
17996      * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
17997      * which can be set by user through WMI command.
17998      */
17999     WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM,                    /* 0x33 */
18000 
18001     /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
18002     WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE,               /* 0x34 */
18003 
18004     /* set slop_step */
18005     WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP,                        /* 0x35 */
18006 
18007     /* set init slop */
18008     WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP,                        /* 0x36 */
18009 
18010     /* pause adjust enable/disable */
18011     WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE,                     /* 0x37 */
18012 
18013 
18014     /* Set channel pwr limit value of the vdev the minimal value of all
18015      * vdevs operating on this channel will be set as channel tx power
18016      * limit, which is used to configure ratearray
18017      */
18018     WMI_VDEV_PARAM_TX_PWRLIMIT,                               /* 0x38 */
18019 
18020     /* set the count of snr value for calculation in snr monitor */
18021     WMI_VDEV_PARAM_SNR_NUM_FOR_CAL,                           /* 0x39 */
18022 
18023     /** Roaming offload */
18024     WMI_VDEV_PARAM_ROAM_FW_OFFLOAD,                           /* 0x3a */
18025 
18026     /** Enable Leader request RX functionality for RMC */
18027     WMI_VDEV_PARAM_ENABLE_RMC,                                /* 0x3b */
18028 
18029    /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
18030      * by himself. If the beacon lost time exceed this threshold, the peer is
18031      * thought to be gone. */
18032     WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS,                      /* 0x3c */
18033 
18034     /** max rate in kpbs, transmit rate can't go beyond it */
18035     WMI_VDEV_PARAM_MAX_RATE,                                  /* 0x3d */
18036 
18037     /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift*/
18038     WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE,                     /* 0x3e */
18039 
18040     /* set Tx failure count threshold for the vdev */
18041     WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR,                  /* 0x3f */
18042 
18043     /* set ebt resync timeout value, in the unit of TU */
18044     WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT,                        /* 0x40 */
18045 
18046     /* Enable Aggregation State Trigger Event */
18047     WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE,                    /* 0x41 */
18048 
18049     /* This parameter indicates whether IBSS station can enter into power save
18050     * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
18051     * awake all the time and should never set PM=1 in its transmitted frames.
18052     * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
18053     * is non-zero. */
18054     WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED,                /* 0x42 */
18055 
18056     /* This parameter indicates if this station can enter into power collapse
18057     * for the remaining beacon interval after the ATIM window.
18058     * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
18059     * is set to TRUE. */
18060     WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED,                 /* 0x43 */
18061 
18062     /* This parameter indicates whether IBSS station exit power save mode and
18063     * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
18064     * whenever there is a TX/RX activity. */
18065     WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED,                  /* 0x44 */
18066 
18067     /* If Awake on TX/RX activity is enabled, this parameter indicates
18068     * the data inactivity time in number of beacon intervals after which
18069     * IBSS station reenters power save by sending Null frame with PM=1. */
18070     WMI_VDEV_PARAM_INACTIVITY_CNT,                            /* 0x45 */
18071 
18072     /* Inactivity time in msec after which TX Service Period (SP) is
18073     * terminated by sending a Qos Null frame with EOSP.
18074     * If value is 0, TX SP is terminated with the last buffered packet itself
18075     * instead of waiting for the inactivity timeout. */
18076     WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS,               /* 0x46 */
18077 
18078     /** DTIM policy */
18079     WMI_VDEV_PARAM_DTIM_POLICY,                               /* 0x47 */
18080 
18081     /* When IBSS network is initialized, PS-supporting device
18082     * does not enter protocol sleep state during first
18083     * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
18084     WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS,                  /* 0x48 */
18085 
18086     /* Enable/Disable 1 RX chain usage during the ATIM window */
18087     WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE,   /* 0x49 */
18088 
18089     /* RX Leak window is the time driver waits before shutting down
18090      * the radio or switching the channel and after receiving an ACK
18091      * for a data frame with PM bit set) */
18092     WMI_VDEV_PARAM_RX_LEAK_WINDOW,                            /* 0x4a */
18093 
18094     /** Averaging factor(16 bit value) is used in the calculations to
18095      * perform averaging of different link level statistics like average
18096      * beacon spread or average number of frames leaked */
18097     WMI_VDEV_PARAM_STATS_AVG_FACTOR,                          /* 0x4b */
18098 
18099     /** disconnect threshold, once the consecutive error for specific peer
18100      * exceed this threshold, FW will send kickout event to host */
18101     WMI_VDEV_PARAM_DISCONNECT_TH,                             /* 0x4c */
18102 
18103     /** The rate_code of RTS_CTS changed by host. Now FW can support
18104      * more non-HT rates rather than 1Mbps or 6Mbps */
18105     WMI_VDEV_PARAM_RTSCTS_RATE,                               /* 0x4d */
18106 
18107     /** This parameter indicates whether using a long duration RTS-CTS
18108      * protection when a SAP goes off channel in MCC mode */
18109     WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE,              /* 0x4e */
18110 
18111     /** This parameter indicates whether using a broadcast probe response
18112      * to increase the detectability of SAP in MCC mode */
18113     WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE,                /* 0x4f */
18114 
18115     /** This parameter indicates the power backoff in percentage
18116      * currently supports 100%, 50%, 25%, 12.5%, and minimum
18117      * Host passes 0, 1, 2, 3, 4 to Firmware
18118      * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
18119      * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
18120      */
18121     WMI_VDEV_PARAM_TXPOWER_SCALE,                             /* 0x50 */
18122 
18123     /** TX power backoff in dB: tx power -= param value
18124      * Host passes values(DB) to Halphy, Halphy reduces the power table
18125      * by the values.  Safety check will happen in Halphy.
18126      */
18127     WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB,                     /* 0x51 */
18128 
18129     /** Multicast to Unicast conversion setting */
18130     WMI_VDEV_PARAM_MCAST2UCAST_SET,                           /* 0x52 */
18131 
18132     /** Total number of HW retries */
18133     WMI_VDEV_PARAM_RC_NUM_RETRIES,                            /* 0x53 */
18134 
18135     /** Max tx percentage for cabq */
18136     WMI_VDEV_PARAM_CABQ_MAXDUR,                               /* 0x54 */
18137 
18138     /** MFPTEST settings */
18139     WMI_VDEV_PARAM_MFPTEST_SET,                               /* 0x55 */
18140 
18141     /** RTS Fixed rate setting */
18142     WMI_VDEV_PARAM_RTS_FIXED_RATE,                            /* 0x56 */
18143 
18144     /** VHT SGI MASK */
18145     WMI_VDEV_PARAM_VHT_SGIMASK,                               /* 0x57 */
18146 
18147     /** VHT80 Auto Rate MASK */
18148     WMI_VDEV_PARAM_VHT80_RATEMASK,                            /* 0x58 */
18149 
18150     /** set Proxy STA features for this vap */
18151     WMI_VDEV_PARAM_PROXY_STA,                                 /* 0x59 */
18152 
18153     /** set virtual cell mode - enable/disable */
18154     WMI_VDEV_PARAM_VIRTUAL_CELL_MODE,                         /* 0x5a */
18155 
18156     /** Set receive packet type */
18157     WMI_VDEV_PARAM_RX_DECAP_TYPE,                             /* 0x5b */
18158 
18159     /** Set ratemask with specific Bandwidth and NSS */
18160     WMI_VDEV_PARAM_BW_NSS_RATEMASK,                           /* 0x5c */
18161 
18162     /** Set SENSOR Support */
18163     WMI_VDEV_PARAM_SENSOR_AP,                                 /* 0x5d */
18164 
18165     /** Set beacon rate */
18166     WMI_VDEV_PARAM_BEACON_RATE,                               /* 0x5e */
18167 
18168     /** Enable CTS to self for DTIM beacon */
18169     WMI_VDEV_PARAM_DTIM_ENABLE_CTS,                           /* 0x5f */
18170 
18171     /** Disable station kickout at Vap level */
18172     WMI_VDEV_PARAM_STA_KICKOUT,                               /* 0x60 */
18173 
18174     /* VDEV capabilities */
18175     WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */ /* 0x61 */
18176 
18177     /**
18178      * Increment TSF in micro seconds to avoid beacon collision on mesh VAP.
18179      * The host must ensure that either no other vdevs share the TSF with
18180      * this vdev, or else that it is acceptable to apply this TSF adjustment
18181      * to all vdevs sharing the TSF.
18182      */
18183     WMI_VDEV_PARAM_TSF_INCREMENT,                             /* 0x62 */
18184 
18185     /** Disable/Enable AMPDU of vdev per AC:
18186      * bit | AC
18187      * --------
18188      *  0  | VO
18189      *  1  | VI
18190      *  2  | BE
18191      *  3  | BK
18192      * A value of 0 in a given bit disables A-MPDU aggregation for
18193      * that AC; a value of 1 enables A-MPDU aggregation
18194      */
18195     WMI_VDEV_PARAM_AMPDU_PER_AC,                              /* 0x63 */
18196 
18197     /**
18198      * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames.
18199      * Used mainly for mesh-vap.
18200      * The parameter value delivered with the RX_FILTER vdev param contains
18201      * a bit-or mask of wmi_vdev_param_filter enum values.
18202      */
18203     WMI_VDEV_PARAM_RX_FILTER,                                 /* 0x64 */
18204 
18205     /** vdev-specific mgmt tx power in dBm units (signed integer value) */
18206     WMI_VDEV_PARAM_MGMT_TX_POWER,                             /* 0x65 */
18207 
18208     /** Vdev level non aggregration/11g sw retry threshold. 0-disable, min:0, max:31, default:15 */
18209     WMI_VDEV_PARAM_NON_AGG_SW_RETRY_TH,                       /* 0x66 */
18210     /** Vdev level aggregration sw retry threshold. 0-disable, min:0, max:31, default:15 */
18211     WMI_VDEV_PARAM_AGG_SW_RETRY_TH,                           /* 0x67 */
18212 
18213     /** disable dynamic bw RTS **/
18214     WMI_VDEV_PARAM_DISABLE_DYN_BW_RTS,                        /* 0x68 */
18215 
18216     /** per ssid (vdev) based ATF strict/fair scheduling policy
18217      *  param values are WMI_ATF_SSID_FAIR_SCHED, WMI_ATF_SSID_STRICT_SCHED,
18218      *  or WMI_ATF_SSID_FAIR_SCHED_WITH_UB
18219      */
18220     WMI_VDEV_PARAM_ATF_SSID_SCHED_POLICY,                     /* 0x69 */
18221 
18222     /** Enable or disable Dual carrier modulation
18223      * valid values: 0-Disable DCM, 1-Enable DCM.
18224      */
18225     WMI_VDEV_PARAM_HE_DCM,                                    /* 0x6a */
18226 
18227     /** Enable or disable Extended range
18228      * valid values: 0-Disable ER, 1-Enable ER.
18229      */
18230     WMI_VDEV_PARAM_HE_RANGE_EXT,                              /* 0x6b */
18231 
18232     /* enable or disable BCAST probe response feature */
18233     WMI_VDEV_PARAM_ENABLE_BCAST_PROBE_RESPONSE,               /* 0x6c */
18234 
18235     /* param to specify probe request Tx delay during Fast Initial Link Setup */
18236     WMI_VDEV_PARAM_FILS_MAX_CHANNEL_GUARD_TIME, /* units = milliseconds */ /* 0x6d */
18237 
18238     /* enable or disable NOA for P2P GO */
18239     WMI_VDEV_PARAM_DISABLE_NOA_P2P_GO,                        /* 0x6e */
18240 
18241     /** Per band user management frame fix rate setting
18242      *  BIT 31: enable (1) or disable (0) mgmt fix rate for 5G
18243      *  BIT 30: enable (1) or disable (0) mgmt fix rate for 2G
18244      *
18245      *  BIT 23: 11ax (1) or legacy (0) rate code
18246      *  BITS [22..12]: rate code for 5G
18247      *
18248      *  BIT 11: 11ax (1) or legacy (0) rate code
18249      *  BITS [10..0]: rate code for 2G
18250      */
18251     WMI_VDEV_PARAM_PER_BAND_MGMT_TX_RATE,                     /* 0x6f */
18252     /* This should be called before WMI_VDEV_PARAM_TXBF */
18253     WMI_VDEV_PARAM_11AX_TXBF,                                 /* 0x70 */
18254 
18255     /** This parameter indicates whether VDEV is SMPS intolerant.
18256      * I.e. - SMPS action frame cannot be transmitted by the VDEV to
18257      * dynamically change the RX NSS.
18258      *
18259      * valid values: 1 - VDEV is SMPS intolerant, 0 - VDEV is SMPS tolerant
18260      */
18261     WMI_VDEV_PARAM_SMPS_INTOLERANT,                           /* 0x71 */
18262 
18263     /** specify probe request Tx delay for scans triggered on this VDEV */
18264     WMI_VDEV_PARAM_PROBE_DELAY, /* units = milliseconds */    /* 0x72 */
18265 
18266     /** specify the time gap between each set of probe request transmissions.
18267      * The number of probe requests in each set depends on the ssid_list and
18268      * bssid_list in the scan request.
18269      * This parameter will be applied only for scans triggered on this VDEV.
18270      */
18271     WMI_VDEV_PARAM_REPEAT_PROBE_TIME, /* units = milliseconds */ /* 0x73 */
18272 
18273     /** specify the HE LTF setting that should be used for fixed rate
18274      * transmissions.
18275      *
18276      * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
18277      * or WMI_HE_LTF_4X.
18278      */
18279     WMI_VDEV_PARAM_HE_LTF,                                    /* 0x74 */
18280 
18281     /** VDEV parameter to configure the number of TX chains to use for
18282      *  a/b/g rates.
18283      *  bit 0~15  : 11b mode TX chain number.
18284      *  bit 16~31 : 11ag mode TX chain number.
18285      *
18286      *  valid values:
18287      *      Should not exceed the maximum number of supported TX Chains
18288      *      0 - Used to reset the vote. Acts as Don't Care
18289      */
18290     WMI_VDEV_PARAM_ABG_MODE_TX_CHAIN_NUM,                     /* 0x75 */
18291 
18292     /**
18293      * Enable or disable the multi group key feature on this VDEV.
18294      * used for NAN APP and VLAN Tagging
18295      */
18296     WMI_VDEV_PARAM_ENABLE_MULTI_GROUP_KEY,                    /* 0x76 */
18297 
18298    /*
18299     * Specify the total number of multi group key on this VDEV.
18300     */
18301     WMI_VDEV_PARAM_NUM_GROUP_KEYS,                            /* 0x77 */
18302 
18303     /** VDEV parameter to enable or disable various OCE features */
18304     WMI_VDEV_PARAM_ENABLE_DISABLE_OCE_FEATURES,              /* 0x78 */
18305 
18306     /*
18307      * Set/Clear 3 least-significant bits to
18308      * Disable or Enable rate drop down for MGMT, SU data and MU data pkts
18309      *
18310      * bit 0 -> If set MGMT Pkt rate drop down is enabled else disabled
18311      * bit 1 -> If set SU data Pkt rate drop down is enabled else disabled
18312      * bit 2 -> If set MU data Pkt rate drop down is enabled else disabled
18313      * bits 31:3 -> Reserved bits. should be set to zero.
18314      */
18315     WMI_VDEV_PARAM_RATE_DROPDOWN_BMAP,                       /* 0x79 */
18316 
18317     /** VDEV parameter to config modulated DTIM count */
18318     WMI_VDEV_PARAM_MODDTIM_CNT,                              /* 0x7a */
18319 
18320     /**
18321      * VDEV parameter to config max listen interval,
18322      * when modulated DTIM is enabled.
18323      * Units are 100TU.
18324      */
18325     WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM,                        /* 0x7b */
18326 
18327     /** VDEV parameter to config dynamic DTIM count */
18328     WMI_VDEV_PARAM_DYNDTIM_CNT,                              /* 0x7c */
18329 
18330     /** VDEV parameter to enable or disable RTT responder role
18331      * A value of 0 in a given bit disables corresponding mode.
18332      * bit | Responder mode support
18333      * -----------------------------------------
18334      *  0  | responder mode for 11MC ranging
18335      *  1  | responder mode for 11AZ NTB ranging
18336      *  2  | responder mode for 11AZ TB ranging
18337      */
18338     WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_RESPONDER_ROLE,        /* 0x7d */
18339 
18340     /** Parameter to configure BA mode.
18341      * Valid values: 0- Auto mode,
18342      *               1- Manual mode(addba req not sent).
18343      *               2- buffer size 64
18344      *               3- buffer size 256
18345      *               4- buffer size 128 // placeholder, not valid
18346      *               5- buffer size 512
18347      *               6- buffer size 1024
18348      */
18349     WMI_VDEV_PARAM_BA_MODE,                                 /* 0x7e */
18350 
18351     /**
18352      * VDEV parameter to force to set modulate DTIM count as listen interval,
18353      * no matter whether WoW is enabled
18354      * Default: Disabled.
18355      * Valid values: 0- Disabled,
18356      *               1- Enabled.
18357      */
18358     WMI_VDEV_PARAM_FORCED_MODDTIM_ENABLE,                   /* 0x7f */
18359 
18360     /** specify the setting that are valid for auto rate transmissions.
18361      * bits 7:0 (LTF): When bitmask is set, then corresponding LTF value is
18362      *                 used for auto rate.
18363      *     BIT0   = 1 (WMI_HE_LTF_1X or WMI_EHT_LTF_1X depending on
18364      *                 current rate’s preamble type HE or EHT)
18365      *     BIT1   = 1 (WMI_HE_LTF_2X or WMI_EHT_LTF_2X)
18366      *     BIT2   = 1 (WMI_HE_LTF_4X or WMI_EHT_LTF_4X)
18367      *     BIT3-7 = Reserved bits.
18368      * bits 15:8 (SGI): When bitmask is set, then corresponding SGI value is
18369      *                 used for auto rate.
18370      *     BIT8     = 1 (400 NS)
18371      *     BIT9     = 1 (800 NS)
18372      *     BIT10    = 1 (1600 NS)
18373      *     BIT11    = 1 (3200 NS)
18374      *     BIT12-15 = Reserved bits.
18375      * bits 31:16: Reserved bits. should be set to zero.
18376      */
18377     WMI_VDEV_PARAM_AUTORATE_MISC_CFG,                       /* 0x80 */
18378 
18379     /** VDEV parameter to enable or disable RTT initiator mac address
18380       * randomization.
18381       * Default: Disabled.
18382       * valid values: 0-Disable random mac 1-Enable random mac
18383       */
18384     WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_RANDOM_MAC, /* 0x81 */
18385 
18386     /**
18387      * For each AC, configure how many tx retries to send without RTS
18388      * before enabling RTS
18389      *  bits 0:7    :BE
18390      *  bits 8:15   :BK
18391      *  bits 16:23  :VI
18392      *  bits 24:31  :VO
18393      * A value of 0 in specific AC means default configuration for that AC.
18394      */
18395     WMI_VDEV_PARAM_TX_RETRIES_BEFORE_RTS_PER_AC,           /* 0x82 */
18396 
18397     /**
18398      * Parameter to enable/disable AMSDU aggregation size auto-selection logic.
18399      * We have logic where AMSDU aggregation size is dynamically decided
18400      * based on MCS. That logic is enabled by default.
18401      * For certain tests, we need a method to disable this optimization,
18402      * and base AMSDU size only on the peer's capability rather than our logic.
18403      * A value of 0 means disable internal optimization,
18404      * 1 means enable internal optimzation.
18405      */
18406     WMI_VDEV_PARAM_AMSDU_AGGREGATION_SIZE_OPTIMIZATION,    /* 0x83 */
18407 
18408     /**
18409      * In RAW mode, FW will not know whether the encryption is enabled
18410      * on this vdev or not.
18411      * Because of this, FW will not program the right info into the
18412      * RawNwifi TLV resulting in the connection failure in RAW mode.
18413      * So to program the right info, FW should know whether the security
18414      * is enabled on this VDEV.
18415      * Host will send this VDEV param command (With Value = 1) in case of
18416      * RAW secure mode.
18417      */
18418     WMI_VDEV_PARAM_RAW_IS_ENCRYPTED,                       /* 0x84 */
18419 
18420     /**
18421      * Dynamically enable/disable green tx (GTX) on supported rates.
18422      * Host will set this param to 1 for enabling GTX & 0 for disabling it.
18423      * Note: If GTX was already running (since the global GTX control
18424      * resides with default BDF setting) & host wants to disable GTX,
18425      * the VDEV does not exercise any more TPC changes on the GTX supported
18426      * rates & goes to a default GTX SM where all PPDU's sent on default TPC.
18427      * Whenever, host wants to re-enable GTX, the enable command resumes the
18428      * GTX functionality & TPC convergence to lower power levels can be
18429      * attained as long as PER on GTX supported rates is within the pre-defined
18430      * PER margin configured through the BDF.
18431      */
18432     WMI_VDEV_PARAM_GTX_ENABLE,                             /* 0x85 */
18433 
18434     /*
18435      * Enable/Disable multicast buffer.
18436      * A FLAG to enable & disable buffering of multicast frames at AP
18437      * when stations are in Power Save mode.
18438      * Once AP disables buffering of multicast frame,
18439      * clients which goes into Power save mode will not receive these frames.
18440      * by default MCAST buffering will be enabled.
18441      * (CABQ = Content After Beacon Queue = multicast queue)
18442      * Host will send this VDEV param command,
18443      * With Value = 1 means fw will disable the MCAST buffering
18444      * With Value = 0 means fw will enable the MCAST buffering.
18445      */
18446     WMI_VDEV_PARAM_DISABLE_CABQ,                          /* 0x86 */
18447 
18448     /**
18449       * For SU and MU sounding
18450       * switch between su ac/ax sounding and mu ac/ax sounding
18451       * switch between triggered/ non-triggered on ax sounding enabled.
18452       * each bit toggles the corresponding modes by enabling/disabling
18453       *
18454       * Bit 1 doesn't carry any operation for now and may change later,
18455       * so reserved.
18456       *
18457       *-----------------------
18458       * bit(0)   |    mode
18459       *-----------------------
18460       *       0  |  AC
18461       *       1  |  AX
18462       *-----------------------
18463       *
18464       * bit(1)   |  Reserved
18465       *
18466       *-----------------------
18467       * bit(2)   |    mode
18468       *-----------------------
18469       *       0  |  SU
18470       *       1  |  MU
18471       *-----------------------
18472       * bit(3)   |    mode
18473       *-----------------------
18474       *       0  |  non -triggered
18475       *       1  |  triggered
18476       */
18477     WMI_VDEV_PARAM_SET_HE_SOUNDING_MODE,                  /* 0x87 */
18478 
18479     /** Fixed rate setting used in UL Trigger
18480      * The top nibble is used to select which format to use for encoding
18481      * the rate specification: 0xVXXXXXXX, V must be 1 for the UL
18482      * format.
18483      * If V == 0b0001: format is: 0x1000RRRR.
18484      *                 ("RRRR" ratecode already has those preamble bits,
18485      *                 which can specify HE or EHT)
18486      *                 This will be output of WMI_ASSEMBLE_RATECODE_V1
18487      *
18488      * This parameter controls the UL OFDMA and UL MU-MIMO vdev fixed rate.
18489      */
18490     WMI_VDEV_PARAM_UL_FIXED_RATE,                         /* 0x88 */
18491 
18492     /**
18493      * Uplink MU-MIMO & OFDMA GI configuration used in UL Trigger
18494      * 11AX: GI =
18495      *     WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
18496      * 11N: SGI=WMI_GI_400_NS
18497      */
18498     /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
18499      *  If V == 0b0000: format is HE.
18500      *  If V == 0b0001: format is EHT.
18501      */
18502     WMI_VDEV_PARAM_UL_GI,                                 /* 0x89 */
18503 
18504     /** Enable/Disable LDPC in UL Trigger */
18505     /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
18506      *  If V == 0b0000: format is HE.
18507      *  If V == 0b0001: format is EHT.
18508      */
18509     WMI_VDEV_PARAM_UL_LDPC,                               /* 0x8A */
18510 
18511     /** Max NSS allowed in UL Trigger */
18512     /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
18513      *  If V == 0b0000: format is HE.
18514      *  If V == 0b0001: format is EHT.
18515      */
18516     WMI_VDEV_PARAM_UL_NSS,                                /* 0x8B */
18517 
18518     /** Enable/Disable STBC in UL Trigger */
18519     /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
18520      *  If V == 0b0000: format is HE.
18521      *  If V == 0b0001: format is EHT.
18522      */
18523     WMI_VDEV_PARAM_UL_STBC,                               /* 0x8C */
18524 
18525     /** specify the HE LTF setting that should be used for fixed rate
18526      * uplink transmissions.
18527      *
18528      * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
18529      * or WMI_HE_LTF_4X.
18530      */
18531     WMI_VDEV_PARAM_UL_HE_LTF,                             /* 0x8D */
18532 
18533     /** Uplink OFDMA PPDU bandwidth */
18534     /** Top nibble can be used to distinguish between HE and EHT: 0xVXXXXXXX
18535      *  If V == 0b0000: format is HE.
18536      *                  (0: 20MHz, 1: 40MHz, 2: 80Mhz, 3: 160MHz)
18537      *  If V == 0b0001: format is EHT.
18538      *                  (0: 20MHz, 1: 40MHz, 2: 80Mhz, 3: 160MHz, 4: 320MHz)
18539      */
18540     WMI_VDEV_PARAM_UL_PPDU_BW,                            /* 0x8E */
18541 
18542     /** Enable/Disable FW handling MU EDCA change from AP (1: En, 0:Dis)  */
18543     WMI_VDEV_PARAM_MU_EDCA_FW_UPDATE_EN,                  /* 0x8F */
18544 
18545     /** Update dot11ObssNbruToleranceTime in fw. Param value: seconds */
18546     WMI_VDEV_PARAM_UPDATE_OBSS_RU_TOLERANCE_TIME,         /* 0x90 */
18547 
18548     /** Parameter used when MTU size is sent by the host
18549      * In particular, this configuration message is used for cases where the
18550      * encapsulation header results in a larger max frame size than the
18551      * typical 802.3 + SNAP/LLC frame.
18552      */
18553     WMI_VDEV_PARAM_MAX_MTU_SIZE,                          /* 0x91 */
18554 
18555     /** Send every nth beacon to host
18556      * if value of n is 0, it means this Nth beacon upload is disabled
18557      */
18558     WMI_VDEV_PARAM_NTH_BEACON_TO_HOST,                    /* 0x92 */
18559 
18560     /**
18561      * To capture the MGMT OR DATA OR BOTH packets.
18562      * Refer to enum WMI_PKT_CAPTURE_MODE_CONFIG for specifications of
18563      * which parameter value enables which kind of packet captures.
18564      */
18565     WMI_VDEV_PARAM_PACKET_CAPTURE_MODE,         /* 0x93 */
18566 
18567     /**
18568      * To configure duration of how many seconds without tx unicast traffic is
18569      * considered stale for mcast rate adaptation
18570      */
18571     WMI_VDEV_PARAM_MCAST_RC_STALE_PERIOD,       /* 0x94 */
18572 
18573     /*
18574      * Bits 3:0   - AST0_FLOW_MASK(4)
18575      * Bits 7:4   - AST1_FLOW_MASK(4)
18576      * Bits 11:8  - AST2_FLOW_MASK(4)
18577      * Bits 15:12 - AST3_FLOW_MASK(4)
18578      * Bits 23:16 - TID_VALID_HI_PRI(8)
18579      * Bits 31:24 - TID_VALID_LOW_PRI(8)
18580      *
18581      * The below macros can be used to set/get the relevant fields.
18582      * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET(msdu_flow_config1, ast_x)
18583      * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET(msdu_flow_config1, ast_x, mask)
18584      * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET(msdu_flow_config1)
18585      * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET(msdu_flow_config1, mask)
18586      * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET(msdu_flow_config1)
18587      * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET(msdu_flow_config1, mask)
18588      */
18589     WMI_VDEV_PARAM_MSDU_FLOW_OVERRIDE_CONFIG,  /* 0x95 */
18590 
18591     /* Enable/Disable using NULL frame for leaky AP  */
18592     WMI_VDEV_PARAM_ENABLE_NULL_FOR_LEAKY_AP,   /* 0x96 */
18593 
18594     /**
18595      * To configure duration of how many seconds without TX/RX data traffic,
18596      * NDI vdev can kickout the connected peer (i.e. NDP Termination).
18597      */
18598     WMI_VDEV_PARAM_NDP_INACTIVITY_TIMEOUT,     /* 0x97 */
18599 
18600     /* To enable/disable multicast rate adaptation feature at vdev level */
18601     WMI_VDEV_PARAM_ENABLE_MCAST_RC,            /* 0x98 */
18602 
18603     /*
18604      * Params related to 6 GHz operation
18605      * The parameter value is formed from WMI_VDEV_6GHZ_BITMAP flags.
18606      */
18607     WMI_VDEV_PARAM_6GHZ_PARAMS,                /* 0x99 */
18608 
18609     /**
18610      * VDEV parameter to enable or disable RTT initiator role
18611      * Default : Enabled
18612      * valid values: 0-Disable initiator role, 1-Enable initiator role.
18613      */
18614     WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_ROLE, /* 0x9A */
18615 
18616     /**
18617      * To configure duration of how many seconds to wait to kickout peer
18618      * if peer is not reachable
18619      */
18620     WMI_VDEV_PARAM_NDP_KEEPALIVE_TIMEOUT,      /* 0x9B*/
18621 
18622     /**
18623      * To support discovery of NAN cluster with Master Preference (MP) as 0
18624      * when a new device is enabling NAN
18625      */
18626     WMI_VDEV_PARAM_ALLOW_NAN_INITIAL_DISCOVERY_OF_MP0_CLUSTER, /* 0x9C */
18627 
18628     /**
18629      * VDEV parameter to enable or disable roaming reason VSIE in
18630      * re-association request
18631      *
18632      * Default : Disabled
18633      * valid values: 0 - Disable 1 - Enable
18634      */
18635     WMI_VDEV_PARAM_ENABLE_DISABLE_ROAM_REASON_VSIE, /* 0x9D */
18636 
18637     /* Parameter used to configure OBSS Packet Detect threshold
18638      * for Non-SRG / SRG based Spatial Reuse feature.
18639      * (SRG = Spatial Reuse Group)
18640      * The accepted values are in between 0x00 and 0xFF, inclusive.
18641      * The parameter value is programmed into the appropriate spatial reuse
18642      * register, to specify how low the background signal strength from
18643      * neighboring BSS cells must be, for this AP to employ spatial reuse.
18644      *
18645      * The value of the parameter is compared against the OBSS RSSI in dB.
18646      * It is a 8-bit value whose
18647      * range is -128 to 127 (after two's complement operation).
18648      * For example, if the parameter value is 0xF5, the target will
18649      * allow spatial reuse if the RSSI detected from other BSS
18650      * is below -10 dB.
18651      * Similarly, if the parameter value is 0x0A, the target will
18652      * allow spatial reuse only if the RSSI detected from neighboring
18653      * BSS cells is no more than 10 dB.
18654      *
18655      * If Bit 29 is set, then input value will be in dBm. This is used
18656      * for chipsets that use dBm for comparison across MAC/Phy blocks.
18657      * Older chipsets support input in dB units. For newer chipsets, dBm
18658      * units will be used.
18659      * The host will use the WMI_SERVICE_SRG_SRP_SPATIAL_REUSE_SUPPORT
18660      * service ready bit to differentiate between providing input as dB or dBm.
18661      *
18662      * bit    | purpose
18663      * -----------------
18664      * 0  - 7 | Param Value for non-SRG based Spatial Reuse
18665      * 8  - 15| Param value for SRG based Spatial Reuse
18666      * 16 - 28| Reserved
18667      * 29     | Param value is in dBm units rather than dB units
18668      * 30     | Enable/Disable SRG based spatial reuse.
18669      *        | If set to 0, ignore bits 8-15.
18670      * 31     | Enable/Disable Non-SRG based spatial reuse.
18671      *        | If set to 0, ignore bits 0-7.
18672      *
18673      * The WMI_VDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD setting will only
18674      * take effect if the WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD
18675      * setting is also set for the pdev that the vdev belongs to.
18676      */
18677     WMI_VDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD, /* 0x9E */
18678 
18679     /* Parameter used to configure OBSS Packet Detection per Access Category
18680      * for SRP based and OBSS_PD based spatial reuse feature.
18681      * (SRP = Spatial Reuse Parameter)
18682      * Based on the bits set, the corresponding Access Category Queues will have
18683      * spatial reuse enabled / disabled.
18684      * bit     | AC
18685      * ------------
18686      * 0       | BK for SRG/Non-SRG
18687      * 1       | BE for SRG/Non-SRG
18688      * 2       | VI for SRG/Non-SRG
18689      * 3       | VO for SRG/Non-SRG
18690      * 4 - 15  | Reserved
18691      * 16      | BK for SRP
18692      * 17      | BE for SRP
18693      * 18      | VI for SRP
18694      * 19      | VO for SRP
18695      * 20 - 31 | Reserved
18696      *
18697      * The WMI_VDEV_PARAM_SET_CMD_OBSS_PD_PER_AC setting will only take effect
18698      * if the WMI_PDEV_PARAM_SET_CMD_OBSS_PD_PER_AC setting is also set for
18699      * the pdev that the vdev belongs to.
18700      */
18701     WMI_VDEV_PARAM_SET_CMD_OBSS_PD_PER_AC, /* 0x9F */
18702 
18703     /**
18704      * VDEV parameter to indicate RSN (Robust Security Network) capability.
18705      * This value will be intersection of the local vdev's (STA's)
18706      * RSN capability and the peer's (AP's) RSN capability.
18707      */
18708     WMI_VDEV_PARAM_RSN_CAPABILITY,        /* 0xA0 */
18709 
18710     /* Parameter used to enable/disable SRP feature */
18711     WMI_VDEV_PARAM_ENABLE_SRP,            /* 0xA1 */
18712 
18713     /*
18714      * Parameter used to control roaming/11kv (BTM) / etc. behavior
18715      * bit    | purpose
18716      * -----------------
18717      * 0      | Disable any FW side roaming except host invoke roaming
18718      * 1      | Do not trans away on receiving BTM req
18719      * 2      | Do not send disassoc to AP when receiving BTM req with
18720      *        | Disassoc Imminent bit set to 1
18721      * 3 - 31 | Reserved
18722      */
18723     WMI_VDEV_PARAM_ROAM_11KV_CTRL,        /* 0xA2 */
18724 
18725     /* vdev param to enable or disable various NAN config features
18726      * param value bitmap set to 1 for enable and 0 for disable respectively
18727      */
18728     WMI_VDEV_PARAM_ENABLE_DISABLE_NAN_CONFIG_FEATURES,  /* 0xA3 */
18729 
18730     /* vdev param to enable the SAP HW offload
18731      *  Bit : 0     - enable/disable SHO
18732      *  Bit : 1     - enable for Sta connected state as well.
18733      *  Bit : 2-31  - reserved
18734      */
18735     WMI_VDEV_PARAM_SHO_CONFIG,          /* 0xA4  */
18736 
18737     /** Enable or disable Non-data HE Extended range
18738      *  valid values: 0-Disable ER, 1-Enable ER.
18739      */
18740     WMI_VDEV_PARAM_NON_DATA_HE_RANGE_EXT,    /* 0xA5 */
18741 
18742     /** Prohibit data & mgmt except keepalive pkt */
18743     WMI_VDEV_PARAM_PROHIBIT_DATA_MGMT,       /* 0xA6 */
18744 
18745     /**  Enable or disable Txop requirement feature
18746      *   0 - Disable feature
18747      *   1 - Enable feature
18748      */
18749     WMI_VDEV_PARAM_WMM_TXOP_ENABLE,          /* 0xA7 */
18750 
18751     /** Value of DTIM to be applied in Suspend mode
18752      */
18753     WMI_VDEV_PARAM_FORCE_DTIM_CNT,           /* 0xA8 */
18754 
18755     /* vdev param to configure the Smart Monitor features
18756      *  Bit : 0     - enable/disable Trigger frames
18757      *  Bit : 1     - enable/disable QOS frames
18758      *  Bit : 2-4   - if 1, fwd beacon frames from connected AP
18759      *              - if 2, fwd beacon frames from unconnected AP
18760      *                during roam scan/host scan
18761      *              - if 3, fwd beacons from unconnected AP during
18762      *                roam scan/host scan and from connected AP
18763      *              - if 4, don't fwd any beacon frame
18764      *  Bit : 5-31  - reserved
18765      */
18766     WMI_VDEV_PARAM_SMART_MONITOR_CONFIG,     /* 0xA9  */
18767 
18768     /** Value of MAX modulated DTIM in ms to be applied
18769      *  in Suspend mode. This parameter will override
18770      *  the value of WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM
18771      */
18772     WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM_MS,     /* 0xAA */
18773 
18774     /*
18775      * Security config advertised in beacons
18776      * bit 0: URNM_MFPR in RSNXE
18777      * bit 1: MFPC in RSN CAP
18778      * bit 2: MFPR in RSN CAP
18779      * bit 3: URNM_MFPR_X20 in RSNXE
18780      * bit 4: RSTA_EXTCAP_I2R_LMR_FB
18781      * bit 31:5 Reserved
18782      */
18783     WMI_VDEV_PARAM_11AZ_SECURITY_CONFIG,    /* 0xAB */
18784 
18785     /*
18786      * Latency Level Flags
18787      */
18788     WMI_VDEV_PARAM_NORMAL_LATENCY_FLAGS_CONFIGURATION,    /* 0xAC */
18789     WMI_VDEV_PARAM_XR_LATENCY_FLAGS_CONFIGURATION,        /* 0xAD */
18790     WMI_VDEV_PARAM_LOW_LATENCY_FLAGS_CONFIGURATION,       /* 0xAE */
18791     WMI_VDEV_PARAM_ULTRA_LOW_LATENCY_FLAGS_CONFIGURATION, /* 0xAF */
18792 
18793     /*
18794      * Latency level UL/DL
18795      * 0-15 bits: UL
18796      * 16-31 bits: DL
18797      */
18798     WMI_VDEV_PARAM_NORMAL_LATENCY_UL_DL_CONFIGURATION,    /* 0xB0 */
18799     WMI_VDEV_PARAM_XR_LATENCY_UL_DL_CONFIGURATION,        /* 0xB1 */
18800     WMI_VDEV_PARAM_LOW_LATENCY_UL_DL_CONFIGURATION,       /* 0xB2 */
18801     WMI_VDEV_PARAM_ULTRA_LOW_LATENCY_UL_DL_CONFIGURATION, /* 0xB3 */
18802     /*
18803      * Ini to
18804      * Configure default latency level for all clients
18805      */
18806     WMI_VDEV_PARAM_DEFAULT_LATENCY_LEVEL_CONFIGURATION,   /* 0xB4 */
18807 
18808     /*
18809      * Ini to
18810      * Configure multi client Low latency Feature
18811      */
18812     WMI_VDEV_PARAM_MULTI_CLIENT_LL_FEATURE_CONFIGURATION, /* 0xB5 */
18813 
18814     /*
18815      * traffic config for per vdev
18816      * bit 0: low latency vdev
18817      * bit 1: high tput vdev
18818      * bit 31:2 Reserved
18819      */
18820     WMI_VDEV_PARAM_VDEV_TRAFFIC_CONFIG,                   /* 0xB6 */
18821 
18822     /* Final bmiss time for Non WOW mode in sec */
18823     WMI_VDEV_PARAM_FINAL_BMISS_TIME_SEC,                  /* 0xB7 */
18824     /* Final bmiss time for WOW mode in sec */
18825     WMI_VDEV_PARAM_FINAL_BMISS_TIME_WOW_SEC,              /* 0xB8 */
18826 
18827     /*
18828      * Param to disable LPI antenna optimizations at Vdev level.
18829      * In 6G LPI mode, additional antenna optimizations are done to
18830      * improve range. Param is provided to disable the added
18831      * optimizations.
18832      */
18833     WMI_VDEV_PARAM_DISABLE_LPI_ANT_OPTIMIZATION,          /* 0xB9 */
18834 
18835     /*
18836      * Param to update connected VDEV channel bandwidth.
18837      * Target firmware should take care of notifying associated peers
18838      * (except TDLS) about change in bandwidth, through OMN/OMI notification
18839      * before performing bandwidth update internally.
18840      * Please note incase of STA VDEV only BSS peer gets updated,
18841      * associated TDLS peer bandwidth won't be impacted.
18842      *
18843      * The updated bandwidth is specified with a wmi_channel_width value.
18844      */
18845     WMI_VDEV_PARAM_CHWIDTH_WITH_NOTIFY,                   /* 0xBA */
18846 
18847     /*
18848      * Min time between measurment for 11AZ NTB ranging
18849      * in units of 100 microseconds
18850      */
18851     WMI_VDEV_PARAM_RTT_11AZ_NTB_MIN_TIME_BW_MEAS,         /* 0xBB */
18852 
18853     /*
18854      * Max time between measurment for 11AZ NTB ranging
18855      * in units of 10 milliseconds
18856      */
18857     WMI_VDEV_PARAM_RTT_11AZ_NTB_MAX_TIME_BW_MEAS,         /* 0xBC */
18858 
18859     /*
18860      * Max session expiry for 11AZ TB ranging.
18861      * Session expiry value is computed as 2^(Max Session Exp + 8) ms.
18862      */
18863     WMI_VDEV_PARAM_RTT_11AZ_TB_MAX_SESSION_EXPIRY,        /* 0xBD */
18864 
18865     /*
18866      * WiFi Standard version to be supported.
18867      * Value is from enum WMI_WIFI_STANDARD
18868      */
18869     WMI_VDEV_PARAM_WIFI_STANDARD_VERSION,                 /* 0xBE */
18870 
18871     /*
18872      * Allow to disable TWT on 2G channel
18873      * if corresponding INI is set
18874      */
18875     WMI_VDEV_PARAM_DISABLE_2G_TWT,                        /* 0xBF */
18876 
18877     /*
18878      * Disable FW initiated Information frame for TWT
18879      */
18880     WMI_VDEV_PARAM_DISABLE_TWT_INFO_FRAME,                /* 0xC0 */
18881 
18882     /*
18883      * Set the Recommended Max allowed active links
18884      */
18885     WMI_VDEV_PARAM_MLO_MAX_RECOM_ACTIVE_LINKS,            /* 0xC1 */
18886 
18887     /* DCS stats enable configuration at VDEV level */
18888     WMI_VDEV_PARAM_DCS,                                   /* 0xC2 */
18889 
18890     /* VDEV parameter to configure Telescopic DTIM count */
18891     WMI_VDEV_PARAM_TELESDTIM_CNT,                         /* 0xC3 */
18892 
18893     /* Configure minimum DTIM level used by Telescopic DTIM */
18894     WMI_VDEV_PARAM_MIN_TELES_DTIM_LVL,                    /* 0xC4 */
18895 
18896     /* Set HW CTS2SELF before DL OFDMA Sequence */
18897     WMI_VDEV_PARAM_HWCTS2SELF_OFDMA,                      /* 0xC5 */
18898 
18899     /* Update TWT_UNAVAIL_MODE */
18900     WMI_VDEV_PARAM_TWT_UNAVAIL_MODE,                      /* 0xC6 */
18901 
18902 
18903     /*=== ADD NEW VDEV PARAM TYPES ABOVE THIS LINE ===
18904      * The below vdev param types are used for prototyping, and are
18905      * prone to change.
18906      */
18907     WMI_VDEV_PARAM_PROTOTYPE = 0x8000,
18908         /* 11AX SPECIFIC defines */
18909         /* USE this for BSS color change */
18910         WMI_VDEV_PARAM_BSS_COLOR,                             /* 0x8001 */
18911 
18912         /*
18913          * Enable / disable trigger access for a AP vdev's peers.
18914          * For a STA mode vdev this will enable/disable triggered access
18915          * and enable/disable Multi User mode of operation.
18916          * A value of 0 in a given bit disables corresponding mode.
18917          * bit | hemu mode
18918          * ---------------
18919          *  0  | HE SUBFEE
18920          *  1  | HE SUBFER
18921          *  2  | HE MUBFEE
18922          *  3  | HE MUBFER
18923          *  4  | DL OFDMA, for AP its DL Tx OFDMA for Sta its Rx OFDMA
18924          *  5  | UL OFDMA, for AP its Tx OFDMA trigger for Sta its Rx OFDMA
18925          *     |           trigger receive & UL response
18926          *  6  | UL MUMIMO
18927          *  7  | TXBF+OFDMA
18928          */
18929         WMI_VDEV_PARAM_SET_HEMU_MODE,                         /* 0x8002 */
18930         WMI_VDEV_PARAM_HEOPS_0_31,                            /* 0x8003 */
18931         WMI_VDEV_PARAM_OBSSPD,                                /* 0x8004 */
18932 
18933         /*
18934          * Enable / disable trigger access for a AP vdev's peers.
18935          * For a STA mode vdev this will enable/disable triggered access
18936          * and enable/disable Multi User mode of operation.
18937          * A value of 0 in a given bit disables corresponding mode.
18938          * bit | EHT mu mode
18939          * ---------------
18940          *  0  | EHT SUBFEE
18941          *  1  | EHT SUBFER
18942          *  2  | EHT MUBFEE
18943          *  3  | EHT MUBFER
18944          *  4  | EHT DL OFDMA, for AP its DL Tx OFDMA for Sta its Rx OFDMA
18945          *  5  | EHT UL OFDMA, for AP its Tx OFDMA trigger for Sta its Rx OFDMA
18946          *     |           trigger receive & UL response
18947          *  6  | EHT MUMIMO
18948          *  7  | EHT DL OFDMA + TXBF
18949          *  8  | EHT DL OFDMA + MU-MIMO
18950          *  9  | EHT UL OFDMA + MU-MIMO
18951          */
18952         WMI_VDEV_PARAM_SET_EHT_MU_MODE,                       /* 0x8005 */
18953 
18954         /**
18955          * Specify the EHT LTF setting that should be used for fixed rate
18956          * transmissions.
18957          *
18958          * Expects values of WMI_EHT_LTF_DEFAULT, WMI_EHT_LTF_1X,
18959          * WMI_EHT_LTF_2X, or WMI_EHT_LTF_4X.
18960          */
18961          WMI_VDEV_PARAM_EHT_LTF,                               /* 0x8006 */
18962 
18963         /**
18964          * Expects values of WMI_EHT_LTF_DEFAULT, WMI_EHT_LTF_1X,
18965          * WMI_EHT_LTF_2X, or WMI_EHT_LTF_4X.
18966          */
18967         WMI_VDEV_PARAM_UL_EHT_LTF,                             /* 0x8007 */
18968 
18969         /**
18970          * Enable or disable Dual Carrier Modulation
18971          * valid values: 0-Disable EHT DCM, 1-Enable EHT DCM.
18972          */
18973         WMI_VDEV_PARAM_EHT_DCM,                                /* 0x8008 */
18974 
18975         /**
18976          * Enable or disable Extended range
18977          * valid values: 0-Disable ER, 1-Enable ER.
18978          */
18979         WMI_VDEV_PARAM_EHT_RANGE_EXT,                          /* 0x8009 */
18980 
18981         /**
18982          * Enable or disable Non-data EHT Extended range
18983          *  valid values: 0-Disable ER, 1-Enable ER.
18984          */
18985         WMI_VDEV_PARAM_NON_DATA_EHT_RANGE_EXT,                 /* 0x800A */
18986 
18987         /*
18988          * 0 - fixed pattern disable,
18989          * 1 - Fixed pattern enable and value pointed by
18990          *     WMI_VDEV_PARAM_FIXED_PUNCTURE_PATTERN
18991          *     punctured mode for 11be systems
18992          */
18993         WMI_VDEV_PARAM_FIXED_PUNCTURE_PATTERN,                /* 0x800B */
18994 
18995         WMI_VDEV_PARAM_EHTOPS_0_31,                           /* 0x800C */
18996 
18997         /*
18998          * 0 - eht 11be puncturing disable,
18999          * 1 - eht 11be puncturing enable
19000          */
19001         WMI_VDEV_PARAM_SET_EHT_PUNCTURING_MODE,               /* 0x800D */
19002 
19003         /*
19004          * 0 - Disable MCAST Beamforming
19005          * 1 - Enable MCAST Beamforming
19006          */
19007         WMI_VDEV_PARAM_MCAST_STEERING,                        /* 0x800E */
19008 
19009         /*
19010          * bit 0: 0 - XR SAP profile disabled
19011          *        1 - XR SAP profile enabled
19012          * bit 1: 0 - XPAN profile disabled
19013          *        1 - XPAN profile enabled
19014          * bits 31:2 - reserved
19015          */
19016         WMI_VDEV_PARAM_SET_PROFILE,                           /* 0x800F */
19017 
19018         /*
19019          * for valid vdev id
19020          * for vdev offload stats
19021          */
19022         WMI_VDEV_PARAM_VDEV_STATS_ID_UPDATE,                  /* 0x8010 */
19023 
19024         /*
19025          * Enable or disable Extra LTF capability in Auto rate and
19026          * Fixed rate EHT data packet transmissions.
19027          * Even when this vdev param is enabled, Extra LTF may not be
19028          * enabled for all rates in auto rate mode based on other conditions.
19029          * valid values: 0 - Disable Extra LTF, 1- Enable Extra LTF.
19030          */
19031         WMI_VDEV_PARAM_EXTRA_EHT_LTF,                  /* 0x8011 */
19032 
19033         /*
19034          * Disable the indicated DL and UL scheduler for the VDEV.
19035          *
19036          * This command is not supported in STA mode.
19037          *
19038          * A value of 1 in a given bit position disables the corresponding
19039          * mode, and a value of 0 enables the mode. The WMI_SCHED_MODE_FLAGS
19040          * enum defines the bit positions for each mode.
19041          *
19042          * A single 32 bit value is used to store the following configuration
19043          * bitmap.
19044          *
19045          * This command differs from WMI_VDEV_PARAM_SET_HEMU_MODE and
19046          * WMI_VDEV_PARAM_SET_EHT_MU_MODE in that it is intended for use during
19047          * normal AP operation, and will never cause a VAP restart or other
19048          * capability bit modification. It simply controls the scheduler
19049          * behavior.
19050          *
19051          * bit   | sched mode
19052          * ---------------
19053          *   0   | DL MU-MIMO
19054          *   1   | UL MU-MIMO
19055          *   2   | DL OFDMA
19056          *   3   | UL OFDMA
19057          * 4..31 | RESERVED
19058          */
19059         WMI_VDEV_PARAM_SET_DISABLED_SCHED_MODES,       /* 0x8012 */
19060 
19061         /*
19062          * SAP Power save with TWT vdev param command
19063          *      0 - Disable SAP Power save TWT
19064          *      1 - Enable SAP Power save TWT
19065          */
19066         WMI_VDEV_PARAM_SET_SAP_PS_WITH_TWT,            /* 0x8013 */
19067 
19068     /*=== END VDEV_PARAM_PROTOTYPE SECTION ===*/
19069 } WMI_VDEV_PARAM;
19070 
19071 /* EHT Modes */
19072 #define WMI_VDEV_EHT_SUBFEE_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 0, 1)
19073 #define WMI_VDEV_EHT_SUBFEE_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 0, 1, 1)
19074 #define WMI_VDEV_EHT_SUBFEE_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 0, 1, 0)
19075 
19076 #define WMI_VDEV_EHT_SUBFER_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 1, 1)
19077 #define WMI_VDEV_EHT_SUBFER_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 1, 1, 1)
19078 #define WMI_VDEV_EHT_SUBFER_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 1, 1, 0)
19079 
19080 #define WMI_VDEV_EHT_MUBFEE_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 2, 1)
19081 #define WMI_VDEV_EHT_MUBFEE_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 2, 1, 1)
19082 #define WMI_VDEV_EHT_MUBFEE_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 2, 1, 0)
19083 
19084 #define WMI_VDEV_EHT_MUBFER_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 3, 1)
19085 #define WMI_VDEV_EHT_MUBFER_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 3, 1, 1)
19086 #define WMI_VDEV_EHT_MUBFER_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 3, 1, 0)
19087 
19088 #define WMI_VDEV_EHT_DLOFDMA_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 4, 1)
19089 #define WMI_VDEV_EHT_DLOFDMA_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 4, 1, 1)
19090 #define WMI_VDEV_EHT_DLOFDMA_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 4, 1, 0)
19091 
19092 #define WMI_VDEV_EHT_ULOFDMA_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 5, 1)
19093 #define WMI_VDEV_EHT_ULOFDMA_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 5, 1, 1)
19094 #define WMI_VDEV_EHT_ULOFDMA_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 5, 1, 0)
19095 
19096 #define WMI_VDEV_EHT_ULMUMIMO_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 6, 1)
19097 #define WMI_VDEV_EHT_ULMUMIMO_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 6, 1, 1)
19098 #define WMI_VDEV_EHT_ULMUMIMO_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 6, 1, 0)
19099 
19100 #define WMI_VDEV_EHT_TXBF_OFDMA_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 7, 1)
19101 #define WMI_VDEV_EHT_TXBF_OFDMA_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 7, 1, 1)
19102 #define WMI_VDEV_EHT_TXBF_OFDMA_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 7, 1, 0)
19103 
19104 #define WMI_VDEV_EHT_DLOFDMA_W_MUMIMO_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 8, 1)
19105 #define WMI_VDEV_EHT_DLOFDMA_W_MUMIMO_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 8, 1, 1)
19106 #define WMI_VDEV_EHT_DLOFDMA_W_MUMIMO_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 8, 1, 0)
19107 
19108 #define WMI_VDEV_EHT_ULOFDMA_W_MUMIMO_IS_ENABLED(eht_mu_mode) WMI_GET_BITS((eht_mu_mode), 9, 1)
19109 #define WMI_VDEV_EHT_ULOFDMA_W_MUMIMO_ENABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 9, 1, 1)
19110 #define WMI_VDEV_EHT_ULOFDMA_W_MUMIMO_DISABLE(eht_mu_mode) WMI_SET_BITS((eht_mu_mode), 9, 1, 0)
19111 
19112 /* HE Modes */
19113 #define WMI_VDEV_HE_SUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 0, 1)
19114 #define WMI_VDEV_HE_SUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 1)
19115 #define WMI_VDEV_HE_SUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 0)
19116 
19117 #define WMI_VDEV_HE_SUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 1, 1)
19118 #define WMI_VDEV_HE_SUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 1)
19119 #define WMI_VDEV_HE_SUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 0)
19120 
19121 #define WMI_VDEV_HE_MUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 2, 1)
19122 #define WMI_VDEV_HE_MUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 1)
19123 #define WMI_VDEV_HE_MUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 0)
19124 
19125 #define WMI_VDEV_HE_MUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 3, 1)
19126 #define WMI_VDEV_HE_MUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 1)
19127 #define WMI_VDEV_HE_MUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 0)
19128 
19129 #define WMI_VDEV_HE_DLOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 4, 1)
19130 #define WMI_VDEV_HE_DLOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 1)
19131 #define WMI_VDEV_HE_DLOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 0)
19132 
19133 #define WMI_VDEV_HE_ULOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 5, 1)
19134 #define WMI_VDEV_HE_ULOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 1)
19135 #define WMI_VDEV_HE_ULOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 0)
19136 
19137 #define WMI_VDEV_HE_ULMUMIMO_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 6, 1)
19138 #define WMI_VDEV_HE_ULMUMIMO_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 1)
19139 #define WMI_VDEV_HE_ULMUMIMO_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 0)
19140 
19141 #define WMI_VDEV_HE_TXBF_OFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 7, 1)
19142 #define WMI_VDEV_HE_TXBF_OFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 7, 1, 1)
19143 #define WMI_VDEV_HE_TXBF_OFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 7, 1, 0)
19144 
19145 #define WMI_VDEV_HE_AX_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 0, 1)
19146 #define WMI_VDEV_HE_MU_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 2, 1)
19147 #define WMI_VDEV_HE_AX_TRIG_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 3, 1)
19148 
19149 /* Indicates RTT Responder mode support for 11MC, 11AZ NTB, 11AZ TB ranging */
19150 #define WMI_VDEV_11MC_RESP_ENABLED(param) WMI_GET_BITS(param, 0, 1)
19151 #define WMI_VDEV_11AZ_NTB_RESP_ENABLED(param) WMI_GET_BITS(param, 1, 1)
19152 #define WMI_VDEV_11AZ_TB_RESP_ENABLED(param) WMI_GET_BITS(param, 2, 1)
19153 
19154 /* vdev capabilities bit mask */
19155 #define WMI_VDEV_BEACON_SUPPORT  0x1
19156 #define WMI_VDEV_WDS_LRN_ENABLED 0x2
19157 #define WMI_VDEV_VOW_ENABLED     0x4
19158 
19159 #define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT)
19160 #define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED)
19161 #define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED)
19162 
19163 /* Per VAP rate dropdown masks */
19164 #define WMI_VDEV_MGMT_RATE_DROPDOWN_M        0x01
19165 #define WMI_VDEV_MGMT_RATE_DROPDOWN_S           0
19166 #define WMI_VDEV_MGMT_RATE_DROPDOWN (WMI_VDEV_MGMT_RATE_DROPDOWN_M << WMI_VDEV_MGMT_RATE_DROPDOWN_S)
19167 #define WMI_VDEV_MGMT_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MGMT_RATE_DROPDOWN)
19168 #define WMI_VDEV_MGMT_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MGMT_RATE_DROPDOWN)
19169 
19170 #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_M     0x01
19171 #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_S        1
19172 #define WMI_VDEV_SU_DATA_RATE_DROPDOWN (WMI_VDEV_SU_DATA_RATE_DROPDOWN_M << WMI_VDEV_SU_DATA_RATE_DROPDOWN_S)
19173 #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
19174 #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
19175 
19176 #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_M     0x01
19177 #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_S        2
19178 #define WMI_VDEV_MU_DATA_RATE_DROPDOWN (WMI_VDEV_MU_DATA_RATE_DROPDOWN_M << WMI_VDEV_MU_DATA_RATE_DROPDOWN_S)
19179 #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
19180 #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
19181 
19182 /* TXBF capabilities masks */
19183 #define WMI_TXBF_CONF_SU_TX_BFEE_S 0
19184 #define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1
19185 #define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << WMI_TXBF_CONF_SU_TX_BFEE_S)
19186 #define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFEE)
19187 #define WMI_TXBF_CONF_SU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFEE)
19188 
19189 #define WMI_TXBF_CONF_MU_TX_BFEE_S 1
19190 #define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1
19191 #define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << WMI_TXBF_CONF_MU_TX_BFEE_S)
19192 #define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFEE)
19193 #define WMI_TXBF_CONF_MU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFEE)
19194 
19195 #define WMI_TXBF_CONF_SU_TX_BFER_S 2
19196 #define WMI_TXBF_CONF_SU_TX_BFER_M 0x1
19197 #define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << WMI_TXBF_CONF_SU_TX_BFER_S)
19198 #define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFER)
19199 #define WMI_TXBF_CONF_SU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFER)
19200 
19201 #define WMI_TXBF_CONF_MU_TX_BFER_S 3
19202 #define WMI_TXBF_CONF_MU_TX_BFER_M 0x1
19203 #define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << WMI_TXBF_CONF_MU_TX_BFER_S)
19204 #define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFER)
19205 #define WMI_TXBF_CONF_MU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFER)
19206 
19207 #define WMI_TXBF_CONF_STS_CAP_S 4
19208 #define WMI_TXBF_CONF_STS_CAP_M 0x7
19209 #define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << WMI_TXBF_CONF_STS_CAP_S)
19210 #define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_STS_CAP);
19211 #define WMI_TXBF_CONF_STS_CAP_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_STS_CAP)
19212 
19213 #define WMI_TXBF_CONF_IMPLICIT_BF_S 7
19214 #define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1
19215 #define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << WMI_TXBF_CONF_IMPLICIT_BF_S)
19216 #define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_IMPLICIT_BF)
19217 #define WMI_TXBF_CONF_IMPLICIT_BF_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_IMPLICIT_BF)
19218 
19219 #define WMI_TXBF_CONF_BF_SND_DIM_S 8
19220 #define WMI_TXBF_CONF_BF_SND_DIM_M 0x7
19221 #define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << WMI_TXBF_CONF_BF_SND_DIM_S)
19222 #define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_BF_SND_DIM)
19223 #define WMI_TXBF_CONF_BF_SND_DIM_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_BF_SND_DIM)
19224 
19225 /* commands for 11ax TXBF capabilities */
19226 
19227 #define WMI_TXBF_CONF_11AX_SU_TX_BFER_GET(x) WMI_GET_BITS((x,0,1)
19228 #define WMI_TXBF_CONF_11AX_SU_TX_BFER_SET(x,z)  WMI_SET_BITS(x,0,1,z)
19229 
19230 #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_GET(x) WMI_GET_BITS((x,1,1)
19231 #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_SET(x,z) WMI_SET_BITS(x,1,1,z)
19232 
19233 #define WMI_TXBF_CONF_11AX_MU_TX_BFER_GET(x) WMI_GET_BITS((x,2,1)
19234 #define WMI_TXBF_CONF_11AX_MU_TX_BFER_SET(x,z)  WMI_SET_BITS(x,2,1,z)
19235 
19236 #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_GET(x) WMI_GET_BITS((x,3,3)
19237 #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,3,3,z)
19238 
19239 #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_GET(x) WMI_GET_BITS((x,6,3)
19240 #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,6,3,z)
19241 
19242 #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_GET(x) WMI_GET_BITS((x,9,3)
19243 #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_SET(x,z) WMI_SET_BITS(x,9,3,z)
19244 
19245 #define WMI_TXBF_CONF_11AX_NSTS_GT_80_GET(x) WMI_GET_BITS((x,12,3)
19246 #define WMI_TXBF_CONF_11AX_NSTS_GT_80_SET(x,z) WMI_SET_BITS(x,12,3,z)
19247 
19248 #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_GET(x) WMI_GET_BITS((x,15,3)
19249 #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,15,3,z)
19250 
19251 #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_GET(x) WMI_GET_BITS((x,18,3)
19252 #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,18,3,z)
19253 
19254 #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,21,1)
19255 #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,21,1,z)
19256 
19257 #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,22,1)
19258 #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,22,1,z)
19259 
19260 #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_GET(x) WMI_GET_BITS((x,23,1)
19261 #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_SET(x,z) WMI_SET_BITS(x,23,1,z)
19262 
19263 #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_GET(x) WMI_GET_BITS((x,24,1)
19264 #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_SET(x,z) WMI_SET_BITS(x,24,1,z)
19265 
19266 #define WMI_TXBF_CONF_AX_FDBK_TRIG_GET(x) WMI_GET_BITS((x,25,1)
19267 #define WMI_TXBF_CONF_AX_FDBK_TRIG_SET(x,z) WMI_SET_BITS(x,25,1,z)
19268 
19269 
19270 /* TXBF capabilities */
19271 typedef struct {
19272     A_UINT32 txbf_cap;
19273 } wmi_vdev_txbf_cap;
19274 
19275 /* vdev rx filters (for mesh) */
19276 typedef enum {
19277     WMI_VDEV_RX_ALLOW_ALL_FRAMES  =  0x0, /* Don't drop any frames - Default */
19278     WMI_VDEV_RX_FILTER_OUT_FROMDS =  0x1, /* Drop FromDS frames */
19279     WMI_VDEV_RX_FILTER_OUT_TODS   =  0x2, /* Drop ToDS frames */
19280     WMI_VDEV_RX_FILTER_OUT_NODS   =  0x4, /* Drop NODS frames */
19281     WMI_VDEV_RX_FILTER_OUT_RA     =  0x8, /* Drop RA frames */
19282     WMI_VDEV_RX_FILTER_OUT_TA     = 0x10, /* Drop TA frames */
19283 } wmi_vdev_param_filter;
19284 
19285 /* Length of ATIM Window in TU */
19286 #define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
19287 
19288 enum wmi_pkt_type {
19289     WMI_PKT_TYPE_RAW = 0,
19290     WMI_PKT_TYPE_NATIVE_WIFI = 1,
19291     WMI_PKT_TYPE_ETHERNET = 2,
19292 };
19293 
19294 /*******************************************************************
19295  * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap
19296  * Do not use it!
19297  *******************************************************************/
19298 typedef struct {
19299     A_UINT8     sutxbfee    : 1,
19300                 mutxbfee    : 1,
19301                 sutxbfer    : 1,
19302                 mutxbfer    : 1,
19303                 txb_sts_cap : 3,
19304                 implicit_bf : 1;
19305 } wmi_vdev_txbf_en;
19306 
19307 /** Upto 8 bits are available for Roaming module to be sent along with
19308 WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
19309 /* Bit 0: Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
19310 #define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG                          0x1
19311 /* Bit 1: Enable Roaming module in FW to do scan based on Final BMISS */
19312 #define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG                    0x2
19313 /* Bit 2:
19314  * To enable/disable EAPOL_4WAY_HANDSHAKE process while roaming.
19315  * param value = 0 --> Enable EAPOL 4way handshake
19316  * param value = 1 --> Skip EAPOL 4way handshake
19317  */
19318 #define WMI_VDEV_PARAM_SKIP_ROAM_EAPOL_4WAY_HANDSHAKE            0x4
19319 /* Bit 3:
19320  * Scan type when WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG is set:
19321  * value = 0 --> Chanmap scan followed by one full scan if no candidate found.
19322  * value = 1 --> Chanmap scan only
19323  */
19324 #define WMI_ROAM_BMISS_FINAL_SCAN_TYPE_FLAG                      0x8
19325 /* Bit 4:
19326  * To enable/disable feature: EAPOL offload to FW while SAE roaming.
19327  * param value = 0 --> Enable EAPOL offload to FW for SAE roaming
19328  * param value = 1 --> Disable EAPOL offload to FW for SAE roaming
19329  */
19330 #define WMI_VDEV_PARAM_SKIP_SAE_ROAM_4WAY_HANDSHAKE              0x10
19331 
19332 /** slot time long */
19333 #define WMI_VDEV_SLOT_TIME_LONG                                  0x1
19334 /** slot time short */
19335 #define WMI_VDEV_SLOT_TIME_SHORT                                 0x2
19336 /** preablbe long */
19337 #define WMI_VDEV_PREAMBLE_LONG                                   0x1
19338 /** preablbe short */
19339 #define WMI_VDEV_PREAMBLE_SHORT                                  0x2
19340 
19341 /** the definition of different START/RESTART Event response  */
19342 typedef enum {
19343     /* Event response of START CMD */
19344     WMI_VDEV_START_RESP_EVENT = 0,
19345     /* Event response of RESTART CMD */
19346     WMI_VDEV_RESTART_RESP_EVENT,
19347 } WMI_START_EVENT_PARAM;
19348 
19349 typedef struct {
19350     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param  */
19351     /** unique id identifying the VDEV, generated by the caller */
19352     A_UINT32 vdev_id;
19353     /** requestor id that requested the VDEV start request */
19354     A_UINT32 requestor_id;
19355     /* Respose of Event type START/RESTART */
19356     WMI_START_EVENT_PARAM resp_type;
19357     /** status of the response */
19358     A_UINT32 status;
19359     /** Vdev chain mask */
19360     A_UINT32 chain_mask;
19361     /** Vdev mimo power save mode */
19362     A_UINT32 smps_mode;
19363     union {
19364         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
19365         /** pdev_id for identifying the MAC
19366          * See macros starting with WMI_PDEV_ID_ for values.
19367          */
19368         A_UINT32 pdev_id;
19369     };
19370     /** Configured Transmit Streams **/
19371     A_UINT32 cfgd_tx_streams;
19372     /** Configured Receive Streams **/
19373     A_UINT32 cfgd_rx_streams;
19374     /**
19375      * maximum allowed Tx power (in dBm) for this connection.
19376      * max_allowed_tx_power = 0 dBm means value is not specified.
19377      */
19378     A_INT32 max_allowed_tx_power;
19379     /** unique id to identify mac's TSF register */
19380     A_UINT32 mac_tsf_id;
19381     /** ignore mac_tsf_id unless mac_tsf_id_valid is set */
19382     A_UINT32 mac_tsf_id_valid;
19383     /** min_device_tx_pwr_valid = 0 means value is not specified. */
19384     A_UINT32 min_device_tx_pwr_valid;
19385     /** minimum allowed device Tx power (in dBm) for this connection. */
19386     A_INT32  min_device_tx_pwr;
19387 } wmi_vdev_start_response_event_fixed_param;
19388 
19389 typedef struct {
19390     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param  */
19391     /** unique id identifying the VDEV, generated by the caller */
19392     A_UINT32 vdev_id;
19393 } wmi_vdev_stopped_event_fixed_param;
19394 
19395 typedef struct {
19396     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param  */
19397     /** unique id identifying the VDEV, generated by the caller */
19398     A_UINT32 vdev_id;
19399 } wmi_vdev_delete_resp_event_fixed_param;
19400 
19401 /** common structure used for simple events (stopped, resume_req, standby response) */
19402 typedef struct {
19403     A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event  */
19404     /** unique id identifying the VDEV, generated by the caller */
19405     A_UINT32 vdev_id;
19406 } wmi_vdev_simple_event_fixed_param;
19407 
19408 /* Commands for getting and setting protected bit : bss max idle time */
19409 #define WMI_BSS_MAX_IDLE_TIME_PROTECTED_GET(idle_options) \
19410     WMI_GET_BITS(idle_options, 0, 1)
19411 #define WMI_BSS_MAX_IDLE_TIME_PROTECTED_SET(idle_options, val) \
19412     WMI_SET_BITS(idle_options, 0, 1, val)
19413 
19414 typedef struct {
19415     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_VDEV_BSS_MAX_IDLE_TIME_fixed_param */
19416     A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller */
19417     A_UINT32 max_idle_period; /* time interval in seconds */
19418     /* idle_options:
19419      * bit 0    - Protected bit
19420      *            Refer to WMI_BSS_MAX_IDLE_TIME_PROTECTED_GET,SET macros.
19421      * bit 31:1 - Reserved bits
19422      */
19423     A_UINT32 idle_options;
19424 } wmi_vdev_bss_max_idle_time_cmd_fixed_param;
19425 
19426 /** VDEV start response status codes */
19427 #define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0  /** VDEV successfully started */
19428 #define WMI_VDEV_START_RESPONSE_INVALID_VDEVID  0x1  /** requested VDEV not found */
19429 #define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED  0x2  /** unsupported VDEV combination */
19430 #define WMI_VDEV_START_RESPONSE_DFS_VIOLATION  0x3  /** DFS_VIOLATION since channel in the NOL is selected */
19431 #define WMI_VDEV_START_RESPONSE_INVALID_REGDOMAIN 0x4 /** Invalid regulatory domain in VDEV start */
19432 #define WMI_VDEV_START_RESPONSE_INVALID_BAND   0x5    /** Band unsupported by current hw mode in VDEV start */
19433 #define WMI_VDEV_START_RESPONSE_INVALID_PREFERRED_TX_RX_STREAMS 0x6 /** Invalid preferred tx/rx streams */
19434 #define WMI_VDEV_START_RESPONSE_INVALID_TX_VAP_CONFIG   0x7 /** Invalid tx_vap config in VDEV start */
19435 
19436 /** Beacon processing related command and event structures */
19437 typedef struct {
19438     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
19439     /** unique id identifying the VDEV, generated by the caller */
19440     A_UINT32 vdev_id;
19441     /** xmit rate */
19442     A_UINT32 tx_rate;
19443     /** xmit power */
19444     A_UINT32 txPower;
19445     /** beacon buffer length in bytes */
19446     A_UINT32 buf_len;
19447 /* This TLV is followed by array of bytes:
19448  *   A_UINT8 bufp[]; <-- beacon frame buffer
19449  */
19450 } wmi_bcn_tx_hdr;
19451 
19452 /* Beacon filter */
19453 #define WMI_BCN_FILTER_ALL   0 /* Filter all beacons */
19454 #define WMI_BCN_FILTER_NONE  1 /* Pass all beacons */
19455 #define WMI_BCN_FILTER_RSSI  2 /* Pass Beacons RSSI >= RSSI threshold */
19456 #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
19457 #define WMI_BCN_FILTER_SSID  4 /* Pass Beacons with matching SSID */
19458 
19459 typedef struct {
19460     /** Filter ID */
19461     A_UINT32 bcn_filter_id;
19462     /** Filter type - wmi_bcn_filter */
19463     A_UINT32 bcn_filter;
19464     /** Buffer len */
19465     A_UINT32 bcn_filter_len;
19466     /** Filter info (threshold, BSSID, RSSI) */
19467     A_UINT8 *bcn_filter_buf;
19468 } wmi_bcn_filter_rx_cmd;
19469 
19470 /** Capabilities and IEs to be passed to firmware */
19471 typedef struct {
19472     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
19473     /** Capabilities */
19474     A_UINT32 caps;
19475     /** ERP info */
19476     A_UINT32 erp;
19477 /** Advanced capabilities */
19478 /** HT capabilities */
19479 /** HT Info */
19480 /** ibss_dfs */
19481 /** wpa Info */
19482 /** rsn Info */
19483 /** rrm info */
19484 /** ath_ext */
19485 /** app IE */
19486 } wmi_bcn_prb_info;
19487 
19488 enum wmi_frame_inject_type {
19489     /* Transmit QoS null frame each period */
19490     WMI_FRAME_INJECT_TYPE_QOS_NULL,
19491     /* Transmit CTS to self each period */
19492     WMI_FRAME_INJECT_TYPE_CTS_TO_SELF,
19493     /* Transmit HOST provided buffer instead of forming frame in FW */
19494     WMI_FRAME_INJECT_TYPE_HOST_BUFFER,
19495     /* Max valid frame inject type for sanity checks*/
19496     WMI_FRAME_INJECT_TYPE_MAX,
19497 };
19498 
19499 typedef struct {
19500     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_frame_inject_cmd_fixed_param */
19501     A_UINT32 tlv_header;
19502     /** unique id identifying the VDEV, generated by the caller.
19503      * At any time only one vdev per mac can have this feature enabled.
19504      * Two consecutive enable commands on same mac will result in previous
19505      * command being disabled and new one being enabled.
19506      */
19507     A_UINT32 vdev_id;
19508     /** enable or disable injection */
19509     A_UINT32 enable;
19510     /** frame type to be used for frame injection. possible values are
19511      * defined in enum wmi_frame_inject_type.
19512      */
19513     A_UINT32 frame_type;
19514     /** periodicity of frame injection in milliseconds */
19515     A_UINT32 frame_inject_period;
19516     /** Destination address of frame */
19517     wmi_mac_addr frame_addr1;
19518     /** Frame control duration field to be set in CTS_TO_SELF.
19519      * Applicable to frame_type WMI_FRAME_INJECT_TYPE_CTS_TO_SELF only.
19520      */
19521     A_UINT32 fc_duration;
19522     /** variable buffer length. Can be used for frame template.
19523      * data is in TLV data[]
19524      */
19525     A_UINT32 buf_len;
19526     /** bw:
19527      * Bandwidth to use for the injected frame, of type wmi_channel_width.
19528      * This bw spec shall be ignored unless the bw_valid flag is set.
19529      */
19530     A_UINT32 bw;
19531     /*
19532      * The TLVs follows:
19533      * A_UINT8  data[]; <-- Variable length data
19534      */
19535 } wmi_frame_inject_cmd_fixed_param;
19536 
19537 #define WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS  (0)
19538 #define WMI_BEACON_TMPLT_PROFILE_PERIOD_MASK    (0xff << WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS)
19539 #define WMI_BEACON_TMPLT_SET_PROFILE_PERIOD(_ema_param, _val) \
19540     WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS, 8, _val)
19541 #define WMI_BEACON_TMPLT_GET_PROFILE_PERIOD(_ema_param) \
19542     WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_PROFILE_PERIOD_BITPOS, 8)
19543 
19544 #define WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS  (8)
19545 #define WMI_BEACON_TMPLT_TEMPLATE_INDEX_MASK    (0xff << WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS)
19546 #define WMI_BEACON_TMPLT_SET_TEMPLATE_INDEX(_ema_param, _val) \
19547     WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS, 8, _val)
19548 #define WMI_BEACON_TMPLT_GET_TEMPLATE_INDEX(_ema_param) \
19549     WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_TEMPLATE_INDEX_BITPOS, 8)
19550 
19551 #define WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS  (16)
19552 #define WMI_BEACON_TMPLT_FIRST_TEMPLATE_MASK    (0xff << WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS)
19553 #define WMI_BEACON_TMPLT_SET_FIRST_TEMPLATE(_ema_param, _val) \
19554     WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS, 8, _val)
19555 #define WMI_BEACON_TMPLT_GET_FIRST_TEMPLATE(_ema_param) \
19556     WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_FIRST_TEMPLATE_BITPOS, 8)
19557 
19558 #define WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS  (24)
19559 #define WMI_BEACON_TMPLT_LAST_TEMPLATE_MASK    (0xff << WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS)
19560 #define WMI_BEACON_TMPLT_SET_LAST_TEMPLATE(_ema_param, _val) \
19561     WMI_SET_BITS(_ema_param, WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS, 8, _val)
19562 #define WMI_BEACON_TMPLT_GET_LAST_TEMPLATE(_ema_param) \
19563     WMI_GET_BITS(_ema_param, WMI_BEACON_TMPLT_LAST_TEMPLATE_BITPOS, 8)
19564 
19565 typedef struct {
19566     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_ml_info */
19567     /** hw_link_id:
19568      * Unique link id across SOCs, got as part of QMI handshake
19569      */
19570     A_UINT32 hw_link_id;
19571     /**
19572      * CU vdev map for the Critical update category-1
19573      * (Inclusion of CU IES)
19574      */
19575     A_UINT32 cu_vdev_map_cat1_lo; /* bits 31:0 */
19576     A_UINT32 cu_vdev_map_cat1_hi; /* bits 63:32 */
19577     /**
19578      * CU vdev map for the Critical update category-2
19579      * (modification of CU IES)
19580      */
19581     A_UINT32 cu_vdev_map_cat2_lo; /* bits 31:0 */
19582     A_UINT32 cu_vdev_map_cat2_hi; /* bits 63:32 */
19583 } wmi_bcn_tmpl_ml_info;
19584 
19585 typedef struct {
19586     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_ml_params */
19587     A_UINT32 vdev_id;    /* partner vdev_id */
19588     A_UINT32 hw_link_id; /* hw_link_id: Unique link id across SOCs, got as part of QMI handshake */
19589     A_UINT32 beacon_interval; /* beacon interval in TU from received beacon of the partner link */
19590     /** CSA IE switch count offset from the beginning of data[]
19591      *  Value 0 indicates CSA IE is not present in beacon template.
19592      */
19593     A_UINT32 csa_switch_count_offset; /* units = bytes */
19594     /** Extended CSA IE switch count offset from the beginning of data[]
19595      *  Value 0 indicates ECSA IE is not present in beacon template.
19596      */
19597     A_UINT32 ext_csa_switch_count_offset; /* units = bytes */
19598     /** Per-STA profile Subelement offset from the beginning of the template. */
19599     A_UINT32 per_sta_profile_offset;
19600     /** Quiet IE offset from the beginning of the template. */
19601     A_UINT32 quiet_ie_offset;
19602     /** Flag to check if other IEs are present in per-sta profile */
19603     A_UINT32 is_other_ie_present;
19604 } wmi_bcn_tmpl_ml_params;
19605 
19606 typedef struct {
19607     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
19608     /** unique id identifying the VDEV, generated by the caller */
19609     A_UINT32 vdev_id;
19610     /** TIM IE offset from the beginning of the template. */
19611     A_UINT32 tim_ie_offset;
19612     /** beacon buffer length. data is in TLV data[] */
19613     A_UINT32 buf_len;
19614     /** CSA IE switch count offset from the beginning of data[]
19615      *  Value 0 indicates CSA IE is not present in beacon template.
19616      */
19617     A_UINT32 csa_switch_count_offset; /* units = bytes */
19618     /** Extended CSA IE switch count offset from the beginning of data[]
19619      *  Value 0 indicates CSA IE is not present in beacon template.
19620      */
19621     A_UINT32 ext_csa_switch_count_offset; /* units = bytes */
19622 
19623     /** Specify when to send the CSA switch count status from FW to host.
19624      * See WMI_CSA_EVENT_BMAP* below for more information.
19625      * E.g. if CSA switch count event is needed to be sent when the switch count
19626      * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
19627      */
19628     A_UINT32 csa_event_bitmap;
19629     /** offset (in octets/bytes) of MBSSID IE in beacon frame */
19630     A_UINT32 mbssid_ie_offset;
19631     /** offset (in octets/bytes) of ESP IE in beacon frame */
19632     A_UINT32 esp_ie_offset;
19633     /** CSC IE color switch count offset from the beginning of data[]
19634      *  Value 0 indicates CSC IE is not present in beacon template.
19635      */
19636     A_UINT32 csc_switch_count_offset; /* units = bytes */
19637     /** Specify when to send the CSC switch count status from FW to host.
19638      * See WMI_CSC_EVENT_BMAP* below for more information.
19639      * E.g. if CSA switch count event is needed to be sent when the switch count
19640      * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
19641      */
19642     A_UINT32 csc_event_bitmap;
19643     /** Specify offset for FW to overwrite MU EDCA parameters in the beacon.
19644      * This is done during FW tuning of EDCA parameters.
19645      * Based on number of HE and Legacy stations.
19646      * If mu_edca_ie_offset == 0, it is ignored.
19647      * Only non-zero values are considered.
19648      */
19649     A_UINT32 mu_edca_ie_offset;
19650     /** Specify features that need to be enabled/disabled for the beacon.
19651      *
19652      * Bit 0:
19653      *     Beacon Protection feature enable/disable indication.
19654      *     Refer to WMI_BEACON_PROTECTION_EN_SET/GET macros.
19655      *
19656      * More features can be added to this bitmap.
19657      */
19658     A_UINT32 feature_enable_bitmap;
19659 
19660     /**
19661      * @ema_params: Applicable only for EMA tx VAPs (VAPs having both flags
19662      *         VDEV_FLAGS_EMA_MODE and VDEV_FLAGS_TRANSMIT_AP set) and should
19663      *         remain 0 otherwise. For EMA vaps it carries below information
19664      *         encoded in each byte:
19665      * Byte 0: (@ema_beacon_profile_periodicity) - beacon profile periodicity
19666      *         (number of beacons) after which nontransmitted MBSS info repeats.
19667      *         Assumes values [1, N] inclusive.
19668      *         Refer to WMI_BEACON_TMPLT_[SET,GET]_PROFILE_PERIOD macros.
19669      * Byte 1: (@ema_beacon_tmpl_idx) -  Specifies the position of beacon
19670      *         templates within profile periodicity.
19671      *         Assumes values [0, ema_beacon_profile_periodicity-1] inclusive.
19672      *         Multiple templates having same @ema_beacon_max_tmpl_idx will
19673      *         overwrite previous template.
19674      *         Refer to WMI_BEACON_TMPLT_[SET,GET]_TEMPLATE_INDEX macros.
19675      * Byte 2: (@ema_first_tmpl) - Specifies whether it's a last template in
19676      *         sequence of @ema_beacon_profile_periodicity templates
19677      *         (end of new template update exchange).
19678      *         If this template is the only template being updated,
19679      *         @ema_first_tmpl and @ema_last_tmpl both shall be set to 1.
19680      *         Refer to WMI_BEACON_TMPLT_[SET,GET]_FIRST_TEMPLATE macros.
19681      * Byte 3: (@ema_last_tmpl) - pecifies whether it's a last template in
19682      *         sequence of @ema_beacon_profile_periodicity templates
19683      *         (end of new template update exchange).
19684      *         If this template is the only template being updated,
19685      *         @ema_first_tmpl and @ema_last_tmpl both shall be set to 1.
19686      *         Refer to WMI_BEACON_TMPLT_[SET,GET]_LAST_TEMPLATE macros.
19687      */
19688     A_UINT32 ema_params;
19689 
19690 /*
19691  * The TLVs follows:
19692  *    wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
19693  *    A_UINT8  data[]; <-- Variable length data
19694  *    wmi_bcn_tmpl_ml_params ml_bcn_param[]; <-- per-MLO-link beacon data
19695  *        wmi_bcn_tmpl_ml_params will have multiple instances equal to
19696  *        the number of links in an AP MLD
19697  */
19698 } wmi_bcn_tmpl_cmd_fixed_param;
19699 
19700 #define WMI_CSA_EVENT_BMAP_VALID_MASK           0X80000000  /* Follow bitmap for sending the CSA switch count event */
19701 #define WMI_CSA_EVENT_BMAP_SWITCH_COUNT_ZERO    0           /* Send only when the switch count becomes zero, added for backward compatibility
19702                                                             Same can also be achieved by setting bitmap to 0X80000001 */
19703 #define WMI_CSA_EVENT_BMAP_ALL                  0XFFFFFFFF  /* Send CSA switch count event for every update to switch count */
19704 
19705 #define WMI_CSC_EVENT_BMAP_VALID_MASK           0X80000000  /* Follow bitmap for sending the CSC switch count event */
19706 #define WMI_CSC_EVENT_BMAP_SWITCH_COUNT_ZERO    0           /* Send only when the switch count becomes zero, added for backward compatibility
19707                                                             Same can also be achieved by setting bitmap to 0X80000001 */
19708 #define WMI_CSC_EVENT_BMAP_ALL                  0XFFFFFFFF  /* Send CSC switch count event for every update to switch count */
19709 
19710 #define WMI_BEACON_PROTECTION_BIT_POS           0 /* Beacon Protection enable/disable indication */
19711 
19712 #define WMI_BEACON_PROTECTION_EN_SET(param, value) \
19713     WMI_SET_BITS(param, WMI_BEACON_PROTECTION_BIT_POS, 1, value)
19714 
19715 #define WMI_BEACON_PROTECTION_EN_GET(param) \
19716     WMI_GET_BITS(param, WMI_BEACON_PROTECTION_BIT_POS, 1)
19717 
19718 typedef struct {
19719     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_resp_tmpl_ml_info */
19720     /** hw_link_id:
19721      * Unique link id across SOCs, got as part of QMI handshake
19722      */
19723     A_UINT32 hw_link_id;
19724     /**
19725      * CU vdev map for the Critical update category-1
19726      * (Inclusion of CU IES)
19727      */
19728     A_UINT32 cu_vdev_map_cat1_lo; /* bits 31:0 */
19729     A_UINT32 cu_vdev_map_cat1_hi; /* bits 63:32 */
19730     /**
19731      * CU vdev map for the Critical update category-2
19732      * (modification of CU IES)
19733      */
19734     A_UINT32 cu_vdev_map_cat2_lo; /* bits 31:0 */
19735     A_UINT32 cu_vdev_map_cat2_hi; /* bits 63:32 */
19736 } wmi_prb_resp_tmpl_ml_info;
19737 
19738 /** indicates P2P GO only case not replay probe req */
19739 #define WMI_PRB_TMPL_IGNORE_NONP2P_PRB_REQ 0x1
19740 
19741 typedef struct {
19742     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
19743     /** unique id identifying the VDEV, generated by the caller */
19744     A_UINT32 vdev_id;
19745     /** beacon buffer length. data is in TLV data[] */
19746     A_UINT32 buf_len;
19747     /** flags to control probe tmpl:
19748      * Bit     0: If set, FW should ignore non-P2P probe req
19749      * Bits 31-1: Reserved
19750      */
19751     A_UINT32 flags;
19752 /*
19753  * The TLVs follows:
19754  *    wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
19755  *    A_UINT8  data[]; <-- Variable length data
19756  */
19757 } wmi_prb_tmpl_cmd_fixed_param;
19758 
19759 typedef struct {
19760     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fd_tmpl_cmd_fixed_param */
19761     /** unique id identifying the VDEV, generated by the caller */
19762     A_UINT32 vdev_id;
19763     /** fd frame buffer length. data is in TLV data[] */
19764     A_UINT32 buf_len;
19765 
19766 /*
19767  * The TLVs follows:
19768  *    A_UINT8  data[]; <-- Variable length data
19769  */
19770 } wmi_fd_tmpl_cmd_fixed_param;
19771 
19772 typedef struct {
19773     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
19774     A_UINT32 tlv_header;
19775     /** unique id identifying the VDEV */
19776     A_UINT32 vdev_id;
19777     /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
19778     A_UINT32 tx_status;
19779 } wmi_offload_bcn_tx_status_event_fixed_param;
19780 
19781 enum wmi_sta_ps_mode {
19782     /** enable power save for the given STA VDEV */
19783     WMI_STA_PS_MODE_DISABLED = 0,
19784     /** disable power save  for a given STA VDEV */
19785     WMI_STA_PS_MODE_ENABLED = 1,
19786 };
19787 
19788 typedef struct {
19789     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
19790     /** unique id identifying the VDEV, generated by the caller */
19791     A_UINT32 vdev_id;
19792 
19793     /** Power save mode
19794      *
19795      * (see enum wmi_sta_ps_mode)
19796      */
19797     A_UINT32 sta_ps_mode;
19798 } wmi_sta_powersave_mode_cmd_fixed_param;
19799 
19800 typedef struct {
19801     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_tdcc_config_cmd_fixed_param */
19802     /**  Set a max tx period: percentage of one beacon interval. range: 0 - 100  */
19803     A_UINT32 tx_cycle_percentage;
19804     /**  Enable/disable TX Duty Cycle Control powersave */
19805     A_UINT32 enabled;
19806 } wmi_sta_tdcc_config_cmd_fixed_param;
19807 
19808 enum wmi_csa_offload_en {
19809            WMI_CSA_OFFLOAD_DISABLE = 0,
19810            WMI_CSA_OFFLOAD_ENABLE = 1,
19811 };
19812 
19813 typedef struct {
19814     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param  */
19815     A_UINT32 vdev_id;
19816     A_UINT32 csa_offload_enable;
19817 } wmi_csa_offload_enable_cmd_fixed_param;
19818 
19819 typedef struct {
19820     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param  */
19821     A_UINT32 vdev_id;
19822 /*
19823  * The TLVs follows:
19824  *    wmi_channel chan;
19825  */
19826 } wmi_csa_offload_chanswitch_cmd_fixed_param;
19827 /**
19828  * This parameter controls the policy for retrieving frames from AP while the
19829  * STA is in sleep state.
19830  *
19831  * Only takes affect if the sta_ps_mode is enabled
19832  */
19833 enum wmi_sta_ps_param_rx_wake_policy {
19834     /* Wake up when ever there is an  RX activity on the VDEV. In this mode
19835      * the Power save SM(state machine) will come out of sleep by either
19836      * sending null frame (or) a data frame (with PS==0) in response to TIM
19837      * bit set in the received beacon frame from AP.
19838      */
19839     WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
19840 
19841     /* Here the power save state machine will not wakeup in response to TIM
19842      * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
19843      * configuration setup by WMISET_PS_SET_UAPSD  WMI command.  When all
19844      * access categories are delivery-enabled, the station will send a UAPSD
19845      * trigger frame, otherwise it will send a PS-Poll.
19846      */
19847     WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
19848 };
19849 
19850 /** Number of tx frames/beacon  that cause the power save SM to wake up.
19851  *
19852  * Value 1 causes the SM to wake up for every TX. Value 0 has a special
19853  * meaning, It will cause the SM to never wake up. This is useful if you want
19854  * to keep the system to sleep all the time for some kind of test mode . host
19855  * can change this parameter any time.  It will affect at the next tx frame.
19856  */
19857 enum wmi_sta_ps_param_tx_wake_threshold {
19858     WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
19859     WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
19860 
19861 /* Values greater than one indicate that many TX attempts per beacon
19862  * interval before the STA will wake up
19863  */
19864 };
19865 
19866 /**
19867  * The maximum number of PS-Poll frames the FW will send in response to
19868  * traffic advertised in TIM before waking up (by sending a null frame with PS
19869  * = 0). Value 0 has a special meaning: there is no maximum count and the FW
19870  * will send as many PS-Poll as are necessary to retrieve buffered BU. This
19871  * parameter is used when the RX wake policy is
19872  * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
19873  * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
19874  */
19875 enum wmi_sta_ps_param_pspoll_count {
19876     WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
19877 /* Values greater than 0 indicate the maximum number of PS-Poll frames FW
19878  * will send before waking up.
19879  */
19880 };
19881 
19882 /*
19883  * This will include the delivery and trigger enabled state for every AC.
19884  * This is the negotiated state with AP. The host MLME needs to set this based
19885  * on AP capability and the state Set in the association request by the
19886  * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
19887  */
19888 #define WMI_UAPSD_AC_TYPE_DELI 0
19889 #define WMI_UAPSD_AC_TYPE_TRIG 1
19890 
19891 #define WMI_UAPSD_AC_BIT_MASK(ac,type) \
19892     ((type == WMI_UAPSD_AC_TYPE_DELI) ? \
19893      (1 << (ac<<1)) : \
19894      (1 << ((ac<<1)+1)))
19895 
19896 enum wmi_sta_ps_param_uapsd {
19897     WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
19898     WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
19899     WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
19900     WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
19901     WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
19902     WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
19903     WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
19904     WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
19905 };
19906 
19907 enum wmi_sta_ps_scheme_cfg {
19908     WMI_STA_PS_OPM_CONSERVATIVE = 0,
19909     WMI_STA_PS_OPM_AGGRESSIVE = 1,
19910     WMI_STA_PS_USER_DEF = 2,
19911 };
19912 
19913 enum wmi_sta_powersave_param {
19914 /**
19915  * Controls how frames are retrievd from AP while STA is sleeping
19916  *
19917  * (see enum wmi_sta_ps_param_rx_wake_policy)
19918  */
19919 WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
19920 
19921 /**
19922  * The STA will go active after this many TX
19923  *
19924  * (see enum wmi_sta_ps_param_tx_wake_threshold)
19925  */
19926 WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
19927 
19928 /**
19929  * Number of PS-Poll to send before STA wakes up
19930  *
19931  * (see enum wmi_sta_ps_param_pspoll_count)
19932  *
19933  */
19934 WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
19935 
19936 /**
19937  * TX/RX inactivity time in msec before going to sleep.
19938  *
19939  * The power save SM will monitor tx/rx activity on the VDEV, if no
19940  * activity for the specified msec of the parameter the Power save SM will
19941  * go to sleep.
19942  */
19943 WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
19944 
19945 /**
19946  * Set uapsd configuration.
19947  *
19948  * (see enum wmi_sta_ps_param_uapsd)
19949  */
19950 WMI_STA_PS_PARAM_UAPSD = 4,
19951 
19952 /**
19953  * Number of PS-Poll to send before STA wakes up in QPower Mode
19954  */
19955 WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
19956 
19957 /**
19958  * Enable OPM
19959  */
19960 WMI_STA_PS_ENABLE_QPOWER = 6,
19961     WMI_STA_PS_ENABLE_OPM = WMI_STA_PS_ENABLE_QPOWER, /* alias */
19962 
19963 /**
19964  * Number of TX frames before the entering the Active state
19965  */
19966 WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
19967 
19968 /**
19969  * QPower SPEC PSPOLL interval
19970  */
19971 WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
19972 
19973 /**
19974  * Max SPEC PSPOLL to be sent when the PSPOLL response has
19975  * no-data bit set
19976  */
19977 WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
19978 
19979 /**
19980  * Max value of ITO reset when there is no tx-rx
19981  * after AP has set the TIM bit
19982  */
19983 WMI_STA_PS_PARAM_MAX_RESET_ITO_COUNT_ON_TIM_NO_TXRX = 10,
19984 
19985 /**
19986  * Flag to enable/disable Powersave Optimization
19987  * in WOW
19988  */
19989 WMI_STA_PS_PARAM_ENABLE_PS_OPT_IN_WOW = 11,
19990 
19991 /**
19992  *  Speculative interval in ms
19993  */
19994 WMI_STA_PS_PARAM_SPEC_WAKE_INTERVAL = 12,
19995 
19996 };
19997 
19998 typedef struct {
19999     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
20000     /** unique id identifying the VDEV, generated by the caller */
20001     A_UINT32 vdev_id;
20002     /** station power save parameter (see enum wmi_sta_powersave_param) */
20003     A_UINT32 param;
20004     A_UINT32 value;
20005 } wmi_sta_powersave_param_cmd_fixed_param;
20006 
20007 /** No MIMO power save */
20008 #define WMI_STA_MIMO_PS_MODE_DISABLE
20009 /** mimo powersave mode static*/
20010 #define WMI_STA_MIMO_PS_MODE_STATIC
20011 /** mimo powersave mode dynamic */
20012 #define WMI_STA_MIMO_PS_MODE_DYNAMI
20013 
20014 typedef struct {
20015     /** unique id identifying the VDEV, generated by the caller */
20016     A_UINT32 vdev_id;
20017     /** mimo powersave mode as defined above */
20018     A_UINT32 mimo_pwrsave_mode;
20019 } wmi_sta_mimo_ps_mode_cmd;
20020 
20021 
20022 /** U-APSD configuration of peer station from (re)assoc request and TSPECs */
20023 enum wmi_ap_ps_param_uapsd {
20024     WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
20025     WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
20026     WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
20027     WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
20028     WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
20029     WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
20030     WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
20031     WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
20032 };
20033 
20034 /** U-APSD maximum service period of peer station */
20035 enum wmi_ap_ps_peer_param_max_sp {
20036     WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
20037     WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
20038     WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
20039     WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
20040 
20041     /* keep last! */
20042     MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
20043 };
20044 
20045 /** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */
20046 enum wmi_ap_ps_param_sifs_resp_frmtype {
20047     WMI_SIFS_RESP_PSPOLL    = (1 << 0),
20048     WMI_SIFS_RESP_UAPSD     = (1 << 1),
20049     WMI_SIFS_RESP_QBST_EXP  = (1 << 2),
20050     WMI_SIFS_RESP_QBST_DATA = (1 << 3),
20051     WMI_SIFS_RESP_QBST_BAR  = (1 << 4),
20052 };
20053 
20054 /**
20055  * AP power save parameter
20056  * Set a power save specific parameter for a peer station
20057  */
20058 enum wmi_ap_ps_peer_param {
20059     /** Set uapsd configuration for a given peer.
20060      *
20061      * This will include the delivery and trigger enabled state for every AC.
20062      * The host  MLME needs to set this based on AP capability and stations
20063      * request Set in the association request  received from the station.
20064      *
20065      * Lower 8 bits of the value specify the UAPSD configuration.
20066      *
20067      * (see enum wmi_ap_ps_param_uapsd)
20068      * The default value is 0.
20069      */
20070     WMI_AP_PS_PEER_PARAM_UAPSD = 0,
20071 
20072     /**
20073      * Set the service period for a UAPSD capable station
20074      *
20075      * The service period from wme ie in the (re)assoc request frame.
20076      *
20077      * (see enum wmi_ap_ps_peer_param_max_sp)
20078      */
20079     WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
20080 
20081     /** Time in seconds for aging out buffered frames for STA in power save */
20082     WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
20083 
20084     /**
20085      * Specify frame types that are considered SIFS RESP trigger frame
20086      * (see enum wmi_ap_ps_param_sifs_resp_frmtype)
20087      */
20088     WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
20089 
20090     /** Specifies the trigger state of TID. Valid only for UAPSD frame type  */
20091     WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
20092 
20093     /** Specifies the WNM sleep state of a STA */
20094     WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
20095 };
20096 
20097 typedef struct {
20098     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
20099     /** unique id identifying the VDEV, generated by the caller */
20100     A_UINT32 vdev_id;
20101     /** peer MAC address */
20102     wmi_mac_addr peer_macaddr;
20103     /** AP powersave param (see enum wmi_ap_ps_peer_param) */
20104     A_UINT32 param;
20105     /** AP powersave param value (see defines) */
20106     A_UINT32 value;
20107 } wmi_ap_ps_peer_cmd_fixed_param;
20108 
20109 /** Configure peer station 11v U-APSD coexistence
20110  *
20111  * Two parameters from uaspd coexistence ie info (as specified in 11v) are
20112  * sent down to FW along with this command.
20113  *
20114  * The semantics of these fields are described in the following text extracted
20115  * from 802.11v.
20116  *
20117  * ---  If the non-AP STA specified a non-zero TSF 0 Offset value in the
20118  *      U-APSD Coexistence element, the AP should not transmit frames to the
20119  *      non-AP STA outside of the U-APSD Coexistence Service Period, which
20120  *      begins when the AP receives the U-APSD trigger frame and ends after
20121  *      the transmission period specified by the result of the following
20122  *      calculation:
20123  *
20124  *          End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
20125  *
20126  *      Where T is the time the U-APSD trigger frame was received at the AP
20127  *      Interval is the UAPSD Coexistence element Duration/Interval field
20128  *      value (see 7.3.2.91) or upon the successful transmission of a frame
20129  *      with EOSP bit set to 1, whichever is earlier.
20130  *
20131  *
20132  * ---  If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
20133  *      Coexistence element, the AP should not transmit frames to the non-AP
20134  *      STA outside of the U-APSD Coexistence Service Period, which begins
20135  *      when the AP receives a U-APSD trigger frame and ends after the
20136  *      transmission period specified by the result of the following
20137  *      calculation: End of transmission period = T + Duration
20138  */
20139 typedef struct {
20140     /** unique id identifying the VDEV, generated by the caller */
20141     A_UINT32 vdev_id;
20142     /** peer MAC address */
20143     wmi_mac_addr peer_macaddr;
20144     /** Enable U-APSD coexistence support for this peer
20145      *
20146      * 0 -> disabled (default)
20147      * 1 -> enabled
20148      */
20149     A_UINT32 enabled;
20150     /** Duration/Interval as defined by 11v U-ASPD coexistence */
20151     A_UINT32 duration_interval;
20152     /** Upper 32 bits of 64-bit TSF offset */
20153     A_UINT32 tsf_offset_high;
20154     /** Lower 32 bits of 64-bit TSF offset */
20155     A_UINT32 tsf_offset_low;
20156 } wmi_ap_powersave_peer_uapsd_coex_cmd;
20157 
20158 typedef enum {
20159     WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION      = 0x0001,
20160     WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE   = 0x0002,
20161     WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
20162 
20163     WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
20164 } wmi_ap_ps_egap_flag_type;
20165 
20166 #define WMI_EGAP_GET_REDUCED_2G_TX_CHM(txrx_chm)  WMI_GET_BITS(txrx_chm, 0, 8)
20167 #define WMI_EGAP_GET_REDUCED_2G_RX_CHM(txrx_chm)  WMI_GET_BITS(txrx_chm, 8, 8)
20168 #define WMI_EGAP_GET_REDUCED_5G_TX_CHM(txrx_chm)  WMI_GET_BITS(txrx_chm, 16, 8)
20169 #define WMI_EGAP_GET_REDUCED_5G_RX_CHM(txrx_chm)  WMI_GET_BITS(txrx_chm, 24, 8)
20170 
20171 #define WMI_EGAP_SET_REDUCED_2G_TX_CHM(txrx_chm, val)  WMI_SET_BITS(txrx_chm, 0, 8, val)
20172 #define WMI_EGAP_SET_REDUCED_2G_RX_CHM(txrx_chm, val)  WMI_SET_BITS(txrx_chm, 8, 8, val)
20173 #define WMI_EGAP_SET_REDUCED_5G_TX_CHM(txrx_chm, val)  WMI_SET_BITS(txrx_chm, 16, 8, val)
20174 #define WMI_EGAP_SET_REDUCED_5G_RX_CHM(txrx_chm, val)  WMI_SET_BITS(txrx_chm, 24, 8, val)
20175 
20176 /**
20177  * configure enhanced green ap parameters
20178  */
20179 typedef struct {
20180     A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param  */
20181     /** Enable enhanced green ap
20182      * 0 -> disabled
20183      * 1 -> enabled
20184      */
20185     A_UINT32 enable;
20186     /** The param indicates a duration that all STAs connected
20187      * to S-AP have no traffic.
20188      */
20189     A_UINT32 inactivity_time; /* in unit of milliseconds */
20190     /** The param indicates a duration that all STAs connected
20191      * to S-AP have no traffic, after all STAs have entered powersave.
20192      */
20193     A_UINT32 wait_time; /* in unit of milliseconds */
20194     /** The param is used to turn on/off some functions within E-GAP.
20195      */
20196     A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
20197     /** Reduced_txrx_chainmask
20198      *    [7:0]   - 2G band tx chain mask
20199      *    [15:8]  - 2G band rx chain mask
20200      *    [23:16] - 5G band tx chain mask
20201      *    [31:24] - 5G band rx chain mask
20202      */
20203     A_UINT32 reduced_txrx_chainmask;
20204 } wmi_ap_ps_egap_param_cmd_fixed_param;
20205 
20206 typedef enum {
20207     WMI_AP_PS_EGAP_STATUS_IDLE        = 1,
20208     WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
20209     WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON  = 3,
20210 
20211     WMI_AP_PS_EGAP_STATUS_MAX = 15
20212 } wmi_ap_ps_egap_status_type;
20213 
20214 /**
20215  * send enhanced green ap status to host
20216  */
20217 typedef struct
20218 {
20219     /** TLV tag and len; tag equals
20220      * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list */
20221     A_UINT32 tlv_header;
20222     union {
20223         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
20224         /** pdev_id for identifying the MAC
20225          * See macros starting with WMI_PDEV_ID_ for values.
20226          */
20227         A_UINT32 pdev_id;
20228     };
20229     /** The param indicates the current tx chainmask with the mac id. */
20230     A_UINT32 tx_chainmask;
20231     /** The param indicates the current rx chainmask with the mac id. */
20232     A_UINT32 rx_chainmask;
20233 } wmi_ap_ps_egap_info_chainmask_list;
20234 
20235 typedef struct {
20236     A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param  */
20237     /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
20238     A_UINT32 status;
20239 /* This TLV is followed by
20240  *     wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
20241  */
20242 } wmi_ap_ps_egap_info_event_fixed_param;
20243 
20244 /* 128 clients = 4 words */
20245 /* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
20246 #define WMI_TIM_BITMAP_ARRAY_SIZE 4
20247 
20248 typedef struct {
20249     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info  */
20250     /** TIM bitmap len (in bytes) */
20251     A_UINT32 tim_len;
20252     /** TIM Partial Virtual Bitmap */
20253     A_UINT32 tim_mcast;
20254     A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
20255     A_UINT32 tim_changed;
20256     A_UINT32 tim_num_ps_pending;
20257     /** Use the vdev_id only if vdev_id_valid is set */
20258     A_UINT32 vdev_id_valid;
20259     /** unique id identifying the VDEV */
20260     A_UINT32 vdev_id;
20261 } wmi_tim_info;
20262 
20263 typedef struct {
20264     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info  */
20265     /** TIM Partial Virtual Bitmap */
20266     A_UINT32 tim_mcast;
20267     A_UINT32 tim_changed;
20268     A_UINT32 tim_num_ps_pending;
20269     /** Use the vdev_id only if vdev_id_valid is set */
20270     A_UINT32 vdev_id_valid;
20271     /** unique id identifying the VDEV */
20272     A_UINT32 vdev_id;
20273     /** TIM bitmap len (in bytes) */
20274     A_UINT32 tim_len;
20275     /* followed by WMITLV_TAG_ARRAY_BYTE holding the TIM bitmap */
20276 } wmi_tim_info_v2;
20277 
20278 typedef struct {
20279     /** Flag to enable quiet period IE support */
20280     A_UINT32 is_enabled;
20281     /** Quiet start */
20282     A_UINT32 tbttcount;
20283     /** Beacon intervals between quiets*/
20284     A_UINT32 period;
20285     /** TUs of each quiet*/
20286     A_UINT32 duration;
20287     /** TUs of from TBTT of quiet start*/
20288     A_UINT32 offset;
20289 } wmi_quiet_info;
20290 
20291 /* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
20292 #define WMI_P2P_MAX_NOA_DESCRIPTORS 4   /* Maximum number of NOA Descriptors supported */
20293 
20294 typedef struct {
20295     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info  */
20296     /** Bit  0:     Flag to indicate an update in NOA schedule
20297      *  Bits 7-1:   Reserved
20298      *  Bits 15-8:  Index (identifies the instance of NOA sub element)
20299      *  Bit  16:    Opp PS state of the AP
20300      *  Bits 23-17: Ctwindow in TUs
20301      *  Bits 31-24: Number of NOA descriptors
20302      */
20303     A_UINT32 noa_attributes;
20304     wmi_p2p_noa_descriptor noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
20305     /** Use the vdev_id only if vdev_id_valid is set */
20306     A_UINT32 vdev_id_valid;
20307     /** unique id identifying the VDEV */
20308     A_UINT32 vdev_id;
20309 } wmi_p2p_noa_info;
20310 
20311 typedef struct {
20312     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_quiet_offload_info  */
20313     A_UINT32 vdev_id;   /* unique id identifying the VDEV */
20314     A_UINT8  tbttcount; /* quiet start */
20315     A_UINT8  period;    /* beacon intervals between quiets */
20316     A_UINT16 duration;  /* TUs of each quiet */
20317     A_UINT16 offset;    /* TUs of from TBTT of quiet start */
20318 } wmi_quiet_offload_info;
20319 
20320 #define WMI_UNIFIED_NOA_ATTR_MODIFIED       0x1
20321 #define WMI_UNIFIED_NOA_ATTR_MODIFIED_S     0
20322 
20323 #define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr)                       \
20324             WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
20325 
20326 #define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr)                      \
20327             WMI_F_RMW((hdr)->noa_attributes, 0x1,                   \
20328                 WMI_UNIFIED_NOA_ATTR_MODIFIED);
20329 
20330 #define WMI_UNIFIED_NOA_ATTR_INDEX          0xff00
20331 #define WMI_UNIFIED_NOA_ATTR_INDEX_S        8
20332 
20333 #define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr)                         \
20334             WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
20335 
20336 #define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v)                      \
20337             WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff,            \
20338                 WMI_UNIFIED_NOA_ATTR_INDEX);
20339 
20340 #define WMI_UNIFIED_NOA_ATTR_OPP_PS         0x10000
20341 #define WMI_UNIFIED_NOA_ATTR_OPP_PS_S       16
20342 
20343 #define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr)                         \
20344             WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
20345 
20346 #define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr)                         \
20347             WMI_F_RMW((hdr)->noa_attributes, 0x1,                    \
20348                 WMI_UNIFIED_NOA_ATTR_OPP_PS);
20349 
20350 #define WMI_UNIFIED_NOA_ATTR_CTWIN          0xfe0000
20351 #define WMI_UNIFIED_NOA_ATTR_CTWIN_S        17
20352 
20353 #define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr)                          \
20354             WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
20355 
20356 #define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v)                       \
20357             WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f,             \
20358                 WMI_UNIFIED_NOA_ATTR_CTWIN);
20359 
20360 #define WMI_UNIFIED_NOA_ATTR_NUM_DESC       0xff000000
20361 #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S     24
20362 
20363 #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr)                       \
20364             WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
20365 
20366 #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v)                    \
20367             WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff,             \
20368                 WMI_UNIFIED_NOA_ATTR_NUM_DESC);
20369 
20370 typedef struct {
20371     /** TIM info */
20372     wmi_tim_info tim_info;
20373     /** P2P NOA info */
20374     wmi_p2p_noa_info p2p_noa_info;
20375 /* TBD: More info elements to be added later */
20376 } wmi_bcn_info;
20377 
20378 typedef struct {
20379     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param  */
20380     /** bitmap identifying the VDEVs, generated by the caller */
20381     A_UINT32 vdev_map;
20382     /** how many vdev's info is included in this message
20383      *  If this field is zero, then the number of vdevs is specified by
20384      *  the number of bits set in the vdev_map bitmap.
20385      */
20386     A_UINT32 num_vdevs;
20387 /* This TLV is followed by tim_info and p2p_noa_info for each vdev:
20388  *     wmi_tim_info tim_info[];
20389  *     wmi_p2p_noa_info p2p_noa_info[];
20390  *     wmi_quiet_offload_info quiet_offload_info[0/1];
20391  *
20392  */
20393 } wmi_host_swba_event_fixed_param;
20394 
20395 #define WMI_MAX_AP_VDEV 16
20396 
20397 typedef struct {
20398     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swfda_event_fixed_param  */
20399     /** vdev_id identifying the VDEV for which FILS should be generated */
20400     A_UINT32 vdev_id;
20401     /** time (in TU) at which current FILS Discovery frame is scheduled for Tx */
20402     A_UINT32 fils_tt;
20403     /** next TBTT time (in TU) for this vdev  */
20404     A_UINT32 tbtt;
20405 } wmi_host_swfda_event_fixed_param;
20406 
20407 typedef struct {
20408     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param  */
20409     /** bimtap of VDEVs that has tbtt offset updated */
20410     A_UINT32 vdev_map;
20411 /* The TLVs for tbttoffset_list, tbtt_qtime_low_us_list, and
20412  * tbtt_qtime_high_us_list will follow this TLV.
20413  *   - tbtt offset list in the order of the LSb to MSb in the vdev_map bitmap
20414  *     A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
20415  *   - tbtt qtime_low_us list(Lower 32 bit of qtime us) in the order of the
20416  *     LSb to MSb in the vdev_map bitmap
20417  *     A_UINT32 tbtt_qtime_low_us_list[WMI_MAX_AP_VDEV];
20418  *   - tbtt qtime_high_us list(Higher 32 bit of qtime us) in the order of the
20419  *     LSb to MSb in the vdev_map bitmap
20420  *     A_UINT32 tbtt_qtime_high_us_list[WMI_MAX_AP_VDEV];
20421  */
20422 } wmi_tbtt_offset_event_fixed_param;
20423 
20424 #define WMI_TBTT_OFFSET_INVALID 0xffffffff /* tbttoffset is not updated by FW */
20425 typedef struct {
20426     A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_info */
20427     /** unique id identifying the VDEV */
20428     A_UINT32 vdev_id;
20429     /** tbttoffset in TUs */
20430     A_UINT32 tbttoffset;
20431     /** absolute tbtt time in qtime us */
20432     A_UINT32 tbtt_qtime_low_us;  /* bits 31:0 of qtime */
20433     A_UINT32 tbtt_qtime_high_us; /* bits 63:32 of qtime */
20434 } wmi_tbtt_offset_info;
20435 
20436 /** Use this event if number of vdevs > 32 */
20437 typedef struct {
20438    A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_ext_event_fixed_param  */
20439    A_UINT32 num_vdevs;
20440 /*
20441  * The TLVs for tbttoffset will follow this TLV.
20442  * Of size num_vdevs * wmi_tbtt_offset_info
20443  */
20444 } wmi_tbtt_offset_ext_event_fixed_param;
20445 
20446 
20447 /* Peer Specific commands and events */
20448 
20449 typedef struct {
20450     A_UINT32 percentage; /* in unit of 12.5% */
20451     A_UINT32 min_delta;  /* in unit of Mbps */
20452 } rate_delta_t;
20453 
20454 #define PEER_RATE_REPORT_COND_FLAG_DELTA        0x01
20455 #define PEER_RATE_REPORT_COND_FLAG_THRESHOLD    0x02
20456 #define MAX_NUM_OF_RATE_THRESH                  4
20457 
20458 typedef struct {
20459     A_UINT32 val_cond_flags;     /* PEER_RATE_REPORT_COND_FLAG_DELTA, PEER_RATE_REPORT_COND_FLAG_THRESHOLD
20460                                     Any of these two conditions or both of them can be set. */
20461     rate_delta_t rate_delta;
20462     A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH];  /* In unit of Mbps. There are at most 4 thresholds.
20463                                                          If the threshold count is less than 4, set zero to
20464                                                          the one following the last threshold */
20465 } report_cond_per_phy_t;
20466 
20467 
20468 enum peer_rate_report_cond_phy_type {
20469     PEER_RATE_REPORT_COND_11B = 0,
20470     PEER_RATE_REPORT_COND_11A_G,
20471     PEER_RATE_REPORT_COND_11N,
20472     PEER_RATE_REPORT_COND_11AC,
20473     PEER_RATE_REPORT_COND_MAX_NUM
20474 };
20475 
20476 typedef struct {
20477     A_UINT32 tlv_header;                     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_rate_report_condition_fixed_param */
20478     A_UINT32 enable_rate_report;             /* 1= enable, 0=disable */
20479     A_UINT32 report_backoff_time;            /* in unit of msecond */
20480     A_UINT32 report_timer_period;            /* in unit of msecond */
20481     /* In the following field, the array index means the phy type,
20482      * please see enum peer_rate_report_cond_phy_type for detail */
20483     report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
20484 } wmi_peer_set_rate_report_condition_fixed_param;
20485 
20486 /* Peer Type:
20487  * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
20488  * on address and vdev opmode. This is largely here to allow host to indicate that
20489  * peer is explicitly a TDLS peer
20490  */
20491 enum wmi_peer_type {
20492     WMI_PEER_TYPE_DEFAULT = 0,    /* Generic/Non-BSS/Self Peer */
20493     WMI_PEER_TYPE_BSS = 1,        /* Peer is BSS Peer entry */
20494     WMI_PEER_TYPE_TDLS = 2,       /* Peer is a TDLS Peer */
20495     WMI_PEER_TYPE_OCB = 3,        /* Peer is a OCB Peer */
20496     WMI_PEER_TYPE_NAN_DATA = 4,   /* Peer is NAN DATA */
20497     WMI_PEER_TYPE_TRANS_BSS = 5,  /* For creating BSS peer when connecting with non-transmit AP */
20498     WMI_PEER_TYPE_PASN = 6,       /* Peer is used for Pre-Association Security Negotiation */
20499     WMI_PEER_TYPE_BRIDGE = 7,     /* For creating Dummy Peer in case of 4 Link MLO */
20500     WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type is assigned up to 127 */
20501                                   /* Reserved from 128 - 255 for target internal use.*/
20502     WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
20503 };
20504 
20505 /* this TLV structure used for providing mlo parameters on peer create */
20506 typedef struct {
20507     A_UINT32 tlv_header; /** TLV tag and len */
20508     wmi_mlo_flags mlo_flags; /* only mlo enable flag need by STA mode peer create */
20509 } wmi_peer_create_mlo_params;
20510 
20511 typedef struct {
20512     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
20513     /** unique id identifying the VDEV, generated by the caller */
20514     A_UINT32 vdev_id;
20515     /** peer MAC address */
20516     wmi_mac_addr peer_macaddr;
20517     /** peer type: see enum values above */
20518     A_UINT32 peer_type;
20519 /* The TLVs follows this structure:
20520  * wmi_peer_create_mlo_params mlo_params[]; <-- MLO flags on peer_create
20521  *     Optional TLV, only present for MLO peers.
20522  *     If the peer is non-MLO, the array length should be 0.
20523  *     Only mlo_enable flag required by MCC to decide MAC address to be used.
20524  */
20525 } wmi_peer_create_cmd_fixed_param;
20526 
20527 /* this TLV structure is used for providing MLO parameters on peer delete */
20528 typedef struct {
20529     A_UINT32 tlv_header; /** TLV tag and len */
20530     A_UINT32 mlo_hw_link_id_bitmap; /* Hardware link id of the link which has crashed or was not created in the first place */
20531     wmi_mlo_flags mlo_flags; /* to indicate whether peer delete is due to link switch */
20532 } wmi_peer_delete_mlo_params;
20533 
20534 typedef struct {
20535     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
20536     /** unique id identifying the VDEV, generated by the caller */
20537     A_UINT32 vdev_id;
20538     /** peer MAC address */
20539     wmi_mac_addr peer_macaddr;
20540 /* The TLVs follows this structure:
20541  * wmi_peer_delete_mlo_params mlo_params[]; <-- MLO flags on peer_delete
20542  *     Optional TLV, only present for MLO peers.
20543  *     If the peer is non-MLO, the array length should be 0.
20544  *     Used for Link peer deleted.
20545  */
20546 } wmi_peer_delete_cmd_fixed_param;
20547 
20548 #define WMI_VDEV_ALL_PEER_MAX_BITMAP_WORD32 ((WMI_PEER_TYPE_HOST_MAX+31) / 32)
20549 
20550 #define WMI_VDEV_DELETE_ALL_PEER_BITMAP_SET(param, peer_type) \
20551         WMI_SET_BITS(param[peer_type / 32], (peer_type % 32), 1, 1)
20552 
20553 #define WMI_VDEV_DELETE_ALL_PEER_BITMAP_GET(param, peer_type) \
20554         WMI_GET_BITS(param[peer_type / 32], (peer_type % 32), 1)
20555 
20556 typedef struct {
20557     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delete_all_peer_cmd_fixed_param */
20558     /** unique id identifying the VDEV, generated by the caller */
20559     A_UINT32 vdev_id;
20560     /**
20561      * Host can request for deletion of peers specific to wmi_peer_type
20562      * through below bitmap.
20563      * Macro's WMI_VDEV_DELETE_ALL_PEER_BITMAP_SET &
20564      * WMI_VDEV_DELETE_ALL_PEER_BITMAP_GET are used for accessing purpose.
20565      * And if bitmap array is filled with zeros, firmware needs to delete
20566      * all peers.
20567      */
20568      A_UINT32 peer_type_bitmap[WMI_VDEV_ALL_PEER_MAX_BITMAP_WORD32];
20569 } wmi_vdev_delete_all_peer_cmd_fixed_param;
20570 
20571 typedef struct {
20572     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_unmap_response_cmd_fixed_param */
20573     A_UINT32 tlv_header;
20574     /*
20575      * Following this struct is the TLV:
20576      * A_UINT32 peer_ids[]; <-- variable-length array of peer_ids
20577      *                          that have been unmapped by the host
20578      */
20579 } wmi_peer_unmap_response_cmd_fixed_param;
20580 
20581 typedef struct {
20582     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param */
20583     /** unique id identifying the VDEV, generated by the caller */
20584     A_UINT32 vdev_id;
20585     /** peer MAC address */
20586     wmi_mac_addr peer_macaddr;
20587     /**
20588      * maximum block ack window size to use during a rx block ack negotiation,
20589      * i.e. the maximum number of MPDUs per A-MPDU that will be received
20590      */
20591     A_UINT32  rx_block_ack_win_limit;
20592 } wmi_peer_set_rx_blocksize_cmd_fixed_param;
20593 
20594 typedef struct {
20595     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
20596     /** unique id identifying the VDEV, generated by the caller */
20597     A_UINT32 vdev_id;
20598     /** peer MAC address */
20599     wmi_mac_addr peer_macaddr;
20600     /** tid bitmap identifying the tids to flush */
20601     A_UINT32 peer_tid_bitmap;
20602 } wmi_peer_flush_tids_cmd_fixed_param;
20603 
20604 typedef struct {
20605     /** rate mode . 0: disable fixed rate (auto rate)
20606      *   1: legacy (non 11n) rate  specified as ieee rate 2*Mbps
20607      *   2: ht20 11n rate  specified as mcs index
20608      *   3: ht40 11n rate  specified as mcs index
20609      */
20610     A_UINT32 rate_mode;
20611     /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
20612      *  and series 3 is stored at byte 3 (MSB) */
20613     A_UINT32 rate_series;
20614     /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
20615      *  and retry count for rate 3 is stored at byte 3 (MSB) */
20616     A_UINT32 rate_retries;
20617 } wmi_fixed_rate;
20618 
20619 typedef struct {
20620     /** unique id identifying the VDEV, generated by the caller */
20621     A_UINT32 vdev_id;
20622     /** peer MAC address */
20623     wmi_mac_addr peer_macaddr;
20624     /** fixed rate */
20625     wmi_fixed_rate peer_fixed_rate;
20626 } wmi_peer_fixed_rate_cmd;
20627 
20628 #define WMI_MGMT_TID    17
20629 
20630 typedef struct {
20631     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
20632     /** unique id identifying the VDEV, generated by the caller */
20633     A_UINT32 vdev_id;
20634     /** peer MAC address */
20635     wmi_mac_addr peer_macaddr;
20636 } wmi_addba_clear_resp_cmd_fixed_param;
20637 
20638 typedef struct {
20639     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
20640     /** unique id identifying the VDEV, generated by the caller */
20641     A_UINT32 vdev_id;
20642     /** peer MAC address */
20643     wmi_mac_addr peer_macaddr;
20644     /** Tid number */
20645     A_UINT32 tid;
20646     /** Buffer/Window size*/
20647     A_UINT32 buffersize;
20648 } wmi_addba_send_cmd_fixed_param;
20649 
20650 typedef struct {
20651     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
20652     /** unique id identifying the VDEV, generated by the caller */
20653     A_UINT32 vdev_id;
20654     /** peer MAC address */
20655     wmi_mac_addr peer_macaddr;
20656     /** Tid number */
20657     A_UINT32 tid;
20658     /** Is Initiator */
20659     A_UINT32 initiator;
20660     /** Reason code */
20661     A_UINT32 reasoncode;
20662 } wmi_delba_send_cmd_fixed_param;
20663 
20664 typedef struct {
20665     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
20666     /** unique id identifying the vdev, generated by the caller */
20667     A_UINT32 vdev_id;
20668     /** peer mac address */
20669     wmi_mac_addr peer_macaddr;
20670     /** Tid number */
20671     A_UINT32 tid;
20672     /** status code */
20673     A_UINT32 statuscode;
20674 } wmi_addba_setresponse_cmd_fixed_param;
20675 
20676 typedef struct {
20677     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
20678     /** unique id identifying the vdev, generated by the caller */
20679     A_UINT32 vdev_id;
20680     /** peer mac address */
20681     wmi_mac_addr peer_macaddr;
20682     /** Tid number */
20683     A_UINT32 tid;
20684 } wmi_send_singleamsdu_cmd_fixed_param;
20685 
20686 /* Type of Station DTIM Power Save method */
20687 enum {
20688     /* For NORMAL DTIM, the parameter is the number of beacon intervals and
20689      * also the same value as the listen interval. For this method, the
20690      * station will wake up based on the listen interval. If this
20691      * listen interval is not equal to DTIM, then the station may
20692      * miss certain DTIM beacons. If this value is 1, then the
20693      * station will wake up for every beacon.
20694      */
20695     WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
20696     /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
20697      * When this value is 1, then the station will wake at every DTIM beacon.
20698      * If this value is >1, then the station will skip certain DTIM beacons.
20699      * This value is the multiple of DTIM intervals that the station will
20700      * wake up to receive the DTIM beacons.
20701      */
20702     WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
20703 };
20704 
20705 /* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
20706 typedef struct {
20707     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
20708     /** unique id identifying the VDEV, generated by the caller */
20709     A_UINT32 vdev_id;
20710     /** Station DTIM Power Save method as defined above */
20711     A_UINT32 dtim_pwrsave_method;
20712     /** DTIM PS value. Contents depends on the method */
20713     A_UINT32 value;
20714     /** Modulated DTIM value */
20715     A_UINT32 MaxLIModulatedDTIM;
20716 } wmi_sta_dtim_ps_method_cmd_fixed_param;
20717 
20718 /*
20719  * For Station UAPSD Auto Trigger feature, the Firmware monitors the
20720  * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
20721  * If there is no uplink/download for the specified service interval (field service_interval),
20722  * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
20723  * specified in the UP (field user_priority).
20724  * Firmware also monitors the responses for these QOS-NULL triggers.
20725  * If the peer does not have any delivery frames, it will respond with
20726  * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
20727  * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
20728  * are unused and should be set to 0.
20729  * When service_interval is 0, then the firmware will not send any trigger frames. This is for
20730  * certain host-based implementations that don't want this firmware offload.
20731  * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
20732  * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
20733  * and rest of the AC default to 300 ms.
20734  *
20735  * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
20736  * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
20737  * the more advanced monitoring method.
20738  * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
20739  * suspend interval (field suspend_interval), firmware will change its auto trigger interval
20740  * to delay interval (field delay_interval). This way, when there is no traffic, the station
20741  * will save more power by waking up less and sending less trigger frames.
20742  * The (service_interval < suspend_interval) and (service_interval < delay_interval).
20743  * If this variable auto trigger is not required, then the suspend_interval and delay_interval
20744  * should be 0.
20745  */
20746 typedef struct {
20747     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
20748     /** WMM Access category from 0 to 3 */
20749     A_UINT32 wmm_ac;
20750     /** User priority to use in trigger frames. It is the TID
20751      *  value. This field needs to be specified and may not be
20752      *  equivalent to AC since some implementation may use the TSPEC
20753      *  to enable UAPSD and negotiate a particular user priority. */
20754     A_UINT32 user_priority;
20755     /** service interval in ms */
20756     A_UINT32 service_interval;
20757     /** Suspend interval in ms */
20758     A_UINT32 suspend_interval;
20759     /** delay interval in ms */
20760     A_UINT32 delay_interval;
20761 } wmi_sta_uapsd_auto_trig_param;
20762 
20763 typedef struct {
20764     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
20765     /** unique id identifying the VDEV, generated by the caller */
20766     A_UINT32 vdev_id;
20767     /** peer mac address */
20768     wmi_mac_addr peer_macaddr;
20769     /** Number of AC to specify */
20770     A_UINT32 num_ac;
20771 /*
20772  * Following this struct is the TLV:
20773  *     wmi_sta_uapsd_auto_trig_param ac_param[]; <-- Variable number of AC parameters (defined by field num_ac)
20774  */
20775 
20776 } wmi_sta_uapsd_auto_trig_cmd_fixed_param;
20777 
20778 /** mimo powersave state */
20779 #define WMI_PEER_MIMO_PS_STATE                          0x1
20780 /** enable/disable AMPDU . initial value (enabled) */
20781 #define WMI_PEER_AMPDU                                  0x2
20782 /** authorize/unauthorize peer. initial value is unauthorized (0)  */
20783 #define WMI_PEER_AUTHORIZE                              0x3
20784 /** peer channel bandwidth */
20785 #define WMI_PEER_CHWIDTH                                0x4
20786 /** peer NSS */
20787 #define WMI_PEER_NSS                                    0x5
20788 /** USE 4 ADDR */
20789 #define WMI_PEER_USE_4ADDR                              0x6
20790 /* set group membership status */
20791 #define WMI_PEER_MEMBERSHIP             0x7
20792 #define WMI_PEER_USERPOS                0x8
20793 /*
20794  * A critical high-level protocol is being used with this peer. Target
20795  * should take appropriate measures (if possible) to ensure more
20796  * reliable link with minimal latency. This *may* include modifying the
20797  * station power save policy, enabling more RX chains, increased
20798  * priority of channel scheduling, etc.
20799  *
20800  * NOTE: This parameter should only be considered a hint as specific
20801  * behavior will depend on many factors including current network load
20802  * and vdev/peer configuration.
20803  *
20804  * For STA VDEV this peer corresponds to the AP's BSS peer.
20805  * For AP VDEV this peer corresponds to the remote peer STA.
20806  */
20807 #define WMI_PEER_CRIT_PROTO_HINT_ENABLED     0x9
20808 /* set Tx failure count threshold for the peer - Currently unused */
20809 #define WMI_PEER_TX_FAIL_CNT_THR                        0xA
20810 /* Enable H/W retry and Enable H/W Send CTS2S before Data */
20811 #define WMI_PEER_SET_HW_RETRY_CTS2S                     0xB
20812 
20813 /* Set peer advertised IBSS atim window length */
20814 #define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH                0xC
20815 
20816 /** peer phy mode */
20817 #define WMI_PEER_PHYMODE                                0xD
20818 /** Use FIXED Pwr */
20819 #define WMI_PEER_USE_FIXED_PWR                          0xE
20820 /** Set peer fixed rate
20821  * The top nibble is used to select which format to use for encoding
20822  * the rate specification: 0xVXXXXXXX
20823  * If V == 0b0000: format is same as before: 0x000000RR
20824  * If V == 0b0001: format is: 0x1000RRRR.
20825  *                 This will be output of WMI_ASSEMBLE_RATECODE_V1
20826  * The host shall use the new V1 format (and set V = 0x1) if the target
20827  * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
20828  * system is configured with Nss > 4 (either at compile time within the
20829  * host driver, or through WMI_SERVICE_READY PHY capabilities provided
20830  * by the target).
20831  */
20832 #define WMI_PEER_PARAM_FIXED_RATE                       0xF
20833 
20834 /** Allowlist peer TIDs */
20835 #define WMI_PEER_SET_MU_ALLOWLIST                       0x10
20836 /* retain definition of deprecated prior name, for backwards compatibility */
20837 #define WMI_PEER_SET_MU_WHITELIST WMI_PEER_SET_MU_ALLOWLIST
20838 
20839 /** Set peer max tx rate (MCS) in adaptive rate ctrl */
20840 #define WMI_PEER_SET_MAX_TX_RATE                        0x11
20841 /** Set peer minimal tx rate (MCS) in adaptive rate ctrl */
20842 #define WMI_PEER_SET_MIN_TX_RATE                        0x12
20843 /**
20844  * default ring routing for peer data packets,
20845  * param_value = bit 0 for hash based routing enabled or not
20846  *               (value 1 is enabled, value 0 is disabled)
20847  *               bits 1:5 are for ring 32 (i.e. ring id value
20848  *               selected from 0 to 31 values)
20849  *               bits 6:7 are for LMAC/peer based routing.
20850  *               bit 8 for peer based ring selection enabled or not
20851  *               (value 1 is enabled, value 0 is disabled
20852  *                bits 9-15 are valid when bit 8 is set to 1)
20853  *               bit 9 is for ring selection enabled for filter-pass
20854  *               unicast or not (value 1 is enabled, value 0 is disabled)
20855  *               bit 10 is for ring selection enabled for filter-pass
20856  *               mcast or not (value 1 is enabled, value 0 is disabled)
20857  *               bit 11 is for ring selection enabled for filter-pass
20858  *               BAR or not (value 1 is enabled, value 0 is disabled)
20859  *               bit 12-14 is for source ring selection value
20860  *               (value 0 for wbm2rxdma buf ring,
20861  *                value 1 for fw2rxdma buf ring,
20862  *                value 2 for sw2rxdma buf ring,
20863  *                value 3 for no buf ring,
20864  *                value 4 for sw2rxdma_exception buf ring,
20865  *                value 5 for fw2rxdma buf ring)
20866  *               bit 15-17 is for destination ring selection value
20867  *               (value 0 for wbm release ring,
20868  *                value 1 for rxdma2fw ring,
20869  *                value 2 for rxdma2sw ring,
20870  *                value 3 for rxdma2reo ring,
20871  *                value 4 for rxdma2fw_pmac1_ring,
20872  *                value 5 for rxdma2reo_remote0_ring,
20873  *                value 6 for rxdma2reo_remote1_ring)
20874  */
20875 #define WMI_PEER_HASH_BASED_ROUTING_GET(value32)        WMI_GET_BITS(value32, 0x0, 1)
20876 #define WMI_PEER_ROUTING_RING_ID_GET(value32)           WMI_GET_BITS(value32, 0x1, 5)
20877 #define WMI_PEER_LMAC_BASED_ROUTING_GET(value32)        WMI_GET_BITS(value32, 0x6, 2)
20878 #define WMI_PEER_BASED_RING_SELECTION_GET(value32)      WMI_GET_BITS(value32, 0x8, 1)
20879 #define WMI_PEER_FILTER_PASS_UNICAST_GET(value32)       WMI_GET_BITS(value32, 0x9, 1)
20880 #define WMI_PEER_FILTER_PASS_MCAST_GET(value32)         WMI_GET_BITS(value32, 0xA, 1)
20881 #define WMI_PEER_FILTER_PASS_BAR_GET(value32)           WMI_GET_BITS(value32, 0xB, 1)
20882 #define WMI_PEER_FILTER_PASS_SRC_RING_VAL_GET(value32)  WMI_GET_BITS(value32, 0xC, 3)
20883 #define WMI_PEER_FILTER_PASS_DEST_RING_VAL_GET(value32) WMI_GET_BITS(value32, 0xF, 3)
20884 
20885 #define WMI_PEER_SET_DEFAULT_ROUTING                    0x13
20886 /* peer NSS for VHT160 - Extended NSS support */
20887 #define WMI_PEER_NSS_VHT160                             0x14
20888 /* peer NSS for VHT160 - Extended NSS support */
20889 #define WMI_PEER_NSS_VHT80_80                           0x15
20890 /* Peer SU TXBF sounding interval */
20891 #define WMI_PEER_PARAM_SU_TXBF_SOUNDING_INTERVAL        0x16
20892 /* Peer MU TXBF sounding interval */
20893 #define WMI_PEER_PARAM_MU_TXBF_SOUNDING_INTERVAL        0x17
20894 /* Peer TXBF sounding enable or disable */
20895 #define WMI_PEER_PARAM_TXBF_SOUNDING_ENABLE             0x18
20896 /* Per peer 11ax OFDMA enable or disable */
20897 #define WMI_PEER_PARAM_OFDMA_ENABLE                     0x19
20898 /* Per peer 11ax/11ac MU enable or disable */
20899 #define WMI_PEER_PARAM_MU_ENABLE                        0x1a
20900 /** Set peer fixed rate used in UL Trigger
20901  * The top nibble is used to select which format to use for encoding
20902  * the rate specification: 0xVXXXXXXX, V must be 1 for this parameter.
20903  * If V == 0b0001: format is: 0x1000RRRR.
20904  *                 ("RRRR" rate code already has those preamble bits,
20905  *                 which can specify EHT or HE)
20906  *                 This will be output of WMI_ASSEMBLE_RATECODE_V1
20907  *
20908  * This parameter controls the UL OFDMA and UL MU-MIMO peer fixed rate.
20909  */
20910 #define WMI_PEER_PARAM_UL_FIXED_RATE                    0x1b
20911 /** send specific OMI to peer via QoS-null frame
20912  * param_value = follow 11ax spec definition
20913  *               bit0:VHT(1), bit1:HE(1), bit2-31:A-Control
20914  */
20915 #define WMI_PEER_PARAM_XMIT_OMI                         0x1c
20916 #define WMI_PEER_RARAM_XMIT_OMI WMI_PEER_PARAM_XMIT_OMI /* alias due to prior typo */
20917 
20918 /* Disable burst and assist */
20919 #define WMI_PEER_PARAM_DISABLE_AGGRESSIVE_TX            0x1d
20920 /* Enable 11r FT Roaming */
20921 #define  WMI_PEER_PARAM_ENABLE_FT                       0x1e
20922 /* update peer flag for ptk 4 way handshake */
20923 #define  WMI_PEER_PARAM_NEED_PTK_4_WAY                  0x1f
20924 /* update peer flag for gtk 2 way handshake */
20925 #define  WMI_PEER_PARAM_NEED_GTK_2_WAY                  0x20
20926 /* update peer flag for M4 sent */
20927 #define  WMI_PEER_PARAM_M4_SENT                         0x21
20928 
20929 /* Per peer MISC stats enable or disable */
20930 #define  WMI_PEER_PARAM_MISC_STATS_ENABLE               0x22
20931 
20932 /* Per peer FW congestion enable or disable:
20933  * A parameter value of 1 will disable FW tx congestion control for the peer,
20934  * a parameter value 0f 0 will enable FW tx congestion control for the peer.
20935  */
20936 #define  WMI_PEER_PARAM_FW_CONGESTION_DISABLE           0x23
20937 
20938 /* Per peer dynamically change max Nss limit in supported tx modes.
20939  * Whereas WMI_PEER_NSS cmd needs to reset PER tables and start peer rate
20940  * control again.
20941  * Currently supported only for 2x2 case, and also only supports setting
20942  * all NSS up to current NSS.
20943  * Mask is used so we can extend in future if needed.
20944  *
20945  *  Expected values in bits:
20946  *  00: Use autorate
20947  *  01: Enable only 1SS
20948  *  10: Enable only 2SS
20949  *  11: Disable NSS clamp feature or Fallback to autorate
20950  */
20951 #define WMI_PEER_PARAM_DYN_NSS_EN_MASK                 0x24
20952 
20953 /* Per peer enable/disable RTS/CTS for unicast management frames.
20954  * Enabling RTS/CTS only applicable after association process of the peer.
20955  * Currently supported for spruce(2x2) chipset.
20956  * Expected values:
20957  * 0 : Disable RTS/CTS for unicast management frames.
20958  * 1 : Enable  RTS/CTS for unicast management frames.
20959  */
20960 #define WMI_PEER_PARAM_EN_RTSCTS_FOR_UNICAST_MGMT      0x25
20961 
20962 /** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE  */
20963 #define WMI_PEER_MIMO_PS_NONE                          0x0
20964 #define WMI_PEER_MIMO_PS_STATIC                        0x1
20965 #define WMI_PEER_MIMO_PS_DYNAMIC                       0x2
20966 
20967 /*
20968  * Each bit indicates one 20 MHz subchannel is punctured or not.
20969  * A bit in the bitmap is set to 1 to indicate that the corresponding 20 MHz
20970  * subchannel is not punctured and is set to 0 to indicate that it is punctured.
20971  */
20972 #define WMI_PEER_PUNCTURE_20MHZ_BITMAP                 0x26
20973 
20974 #define WMI_PEER_CHWIDTH_PUNCTURE_BITMAP_GET_CHWIDTH(value32)          WMI_GET_BITS(value32, 0x0, 8)
20975 #define WMI_PEER_CHWIDTH_PUNCTURE_BITMAP_GET_PUNCTURE_BMAP(value32)    WMI_GET_BITS(value32, 0x8, 16)
20976 /*
20977  * peer channel bandwidth and puncture_bitmap
20978  * BIT 0-7  -  Peer channel width
20979  *             This bitfield holds a wmi_channel_width enum value.
20980  * BIT 8-23 -  Peer Puncture bitmap where each bit indicates whether
20981  *             a 20 MHz BW is punctured.
20982  *             The variable should be read from left, LSb (bit 8) will
20983  *             represent the lowest-frequency 20 MHz portion.
20984  *             Bit value: 0 - 20 MHz channel is punctured, 1 - not punctured
20985  */
20986 #define WMI_PEER_CHWIDTH_PUNCTURE_20MHZ_BITMAP         0x27
20987 
20988 #define WMI_PEER_SET_TX_POWER                          0x28
20989 
20990 #define WMI_PEER_FT_ROAMING_PEER_UPDATE                0x29
20991 
20992 #define WMI_PEER_PARAM_DMS_SUPPORT                     0x2A
20993 
20994 #define WMI_PEER_PARAM_UL_OFDMA_RTD                    0x2B
20995 
20996 typedef struct {
20997     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
20998     /** unique id identifying the VDEV, generated by the caller */
20999     A_UINT32 vdev_id;
21000     /** peer MAC address */
21001     wmi_mac_addr peer_macaddr;
21002     /** parameter id   */
21003     A_UINT32 param_id;
21004     /** parameter value */
21005     A_UINT32 param_value;
21006 } wmi_peer_set_param_cmd_fixed_param;
21007 
21008 typedef union {
21009     /*
21010      * The A_UINT16 "mode" and "tx_rate" fields can only be directly used
21011      * by the target or a little-endian host.
21012      * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET
21013      * macros on the A_UINT32 "value" field.
21014      */
21015     struct {
21016         A_UINT16 mode; /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */
21017         A_UINT16 tx_rate; /* see per-mode specs below */
21018     };
21019     A_UINT32 value; /* for use by big-endian host */
21020 } wmi_peer_max_min_tx_rate;
21021 
21022 /*
21023  * Any access to the mode/tx_rate in an big endian system should use
21024  * the below Macros on the wmi_peer_max_min_tx_rate.value field.
21025  */
21026 #define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16)
21027 #define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode)
21028 
21029 #define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16)
21030 #define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode)
21031 
21032 /*   CCK max/min tx Rate description
21033  *   tx_rate = 0:  1   Mbps
21034  *   tx_rate = 1:  2   Mbps
21035  *   tx_rate = 2:  5.5 Mbps
21036  *   tx_rate = 3: 11   Mbps
21037  *   tx_rate = else: invalid
21038  */
21039 enum {
21040     WMI_MAX_CCK_TX_RATE_1M,       /* up to 1M CCK Rate available */
21041     WMI_MAX_CCK_TX_RATE_2M,       /* up to 2M CCK Rate available */
21042     WMI_MAX_CCK_TX_RATE_5_5M,     /* up to 5.5M CCK Rate available */
21043     WMI_MAX_CCK_TX_RATE_11M,      /* up to 11M CCK Rate available */
21044     WMI_MAX_CCK_TX_RATE = WMI_MAX_CCK_TX_RATE_11M,
21045 };
21046 
21047 /*   OFDM max/min tx Rate description
21048  *   tx_rate = 0:  6 Mbps
21049  *   tx_rate = 1:  9 Mbps
21050  *   tx_rate = 2: 12 Mbps
21051  *   tx_rate = 3: 18 Mbps
21052  *   tx_rate = 4: 24 Mbps
21053  *   tx_rate = 5: 32 Mbps
21054  *   tx_rate = 6: 48 Mbps
21055  *   tx_rate = 7: 54 Mbps
21056  *   tx_rate = else: invalid
21057  */
21058 enum {
21059     WMI_MAX_OFDM_TX_RATE_6M,      /* up to 6M OFDM Rate available */
21060     WMI_MAX_OFDM_TX_RATE_9M,      /* up to 9M OFDM Rate available */
21061     WMI_MAX_OFDM_TX_RATE_12M,     /* up to 12M OFDM Rate available */
21062     WMI_MAX_OFDM_TX_RATE_18M,     /* up to 18M OFDM Rate available */
21063     WMI_MAX_OFDM_TX_RATE_24M,     /* up to 24M OFDM Rate available */
21064     WMI_MAX_OFDM_TX_RATE_36M,     /* up to 36M OFDM Rate available */
21065     WMI_MAX_OFDM_TX_RATE_48M,     /* up to 48M OFDM Rate available */
21066     WMI_MAX_OFDM_TX_RATE_54M,     /* up to 54M OFDM Rate available */
21067     WMI_MAX_OFDM_TX_RATE = WMI_MAX_OFDM_TX_RATE_54M,
21068 };
21069 
21070 /*   HT max/min tx rate description
21071  *    tx_rate = 0~7 : MCS Rate 0~7
21072  *    tx_rate=else : invalid.
21073  */
21074 #define WMI_MAX_HT_TX_MCS 0x07
21075 
21076 /*   VHT max/min tx rate description
21077  *    tx_rate = 0~9 : MCS Rate 0~9
21078  *    tx_rate=else : invalid.
21079  */
21080 #define WMI_MAX_VHT_TX_MCS 0x09
21081 
21082 
21083 #define MAX_SUPPORTED_RATES 128
21084 
21085 typedef struct {
21086     /** total number of rates */
21087     A_UINT32 num_rates;
21088     /**
21089      * rates (each 8bit value) packed into a 32 bit word.
21090      * the rates are filled from least significant byte to most
21091      * significant byte.
21092      */
21093     A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
21094 } wmi_rate_set;
21095 
21096 /* NOTE: It would bea good idea to represent the Tx MCS
21097  * info in one word and Rx in another word. This is split
21098  * into multiple words for convenience
21099  */
21100 typedef struct {
21101     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
21102     A_UINT32 rx_max_rate; /* Max Rx data rate */
21103     A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
21104     A_UINT32 tx_max_rate; /* Max Tx data rate */
21105     /*
21106      *  bit [15:0]  indicates MCS 0 to 9
21107      *  bit [23:16] indicates MCS 10 & 11
21108      *  bit [24]    indicates whether MCS 10 & 11 is notified in bit [23:16]
21109      */
21110     A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
21111     A_UINT32 tx_max_mcs_nss;  /* b0-b3: max mcs idx; b4-b7: max nss */
21112 } wmi_vht_rate_set;
21113 
21114 /* NOTE: It would bea good idea to represent the Tx MCS
21115  * info in one word and Rx in another word. This is split
21116  * into multiple words for convenience
21117  * 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
21118  */
21119 typedef struct {
21120     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_he_rate_set */
21121     /* HE Supported MCS Set field Rx
21122      * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
21123      *    value 0 - MCS 0-7 enabled for this NSS
21124      *    value 1 - MCS 0-9 enabled for this NSS
21125      *    value 2 - MCS 0-11 enabled for this NSS
21126      *    value 3 - NSS disabled
21127      * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
21128      */
21129     A_UINT32 rx_mcs_set; /* Negotiated RX HE rates (i.e. rate this node can RX from peer)*/
21130     /* HE Supported MCS Set field Tx
21131      * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
21132      *    value 0 - MCS 0-7 enabled for this NSS
21133      *    value 1 - MCS 0-9 enabled for this NSS
21134      *    value 2 - MCS 0-11 enabled for this NSS
21135      *    value 3 - NSS disabled
21136      *   WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
21137      *
21138      * - 8 bits x 2 are used for each Nss value for 2 categories of bandwidths,
21139      *   to indicate whether MCS 12 and 13 are enabled.
21140      *    Bits [16:23] used for checking if MCS 12/13 is enabled for a
21141      *        particular NSS (BW <= 80MHz)
21142      *    Bits [24:31] used for checking if MCS 12/13 is enabled for a
21143      *        particular NSS (BW > 80MHz)
21144      *   The WMI_HE_EXTRA_MCS_SS_[GET,SET] macros can be used for accessing
21145      *   these bit-fields.
21146      */
21147     A_UINT32 tx_mcs_set; /* Negotiated TX HE rates(i.e. rate this node can TX to peer) */
21148 } wmi_he_rate_set;
21149 
21150 typedef struct {
21151     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_eht_rate_set */
21152     /*
21153      * B0-B3   indicates max NSS that supports mcs 0-7
21154      * B4-B7   indicates max NSS that supports mcs 8-9
21155      * B8-B11  indicates max NSS that supports mcs 10-11
21156      * B12-B15 indicates max NSS that supports mcs 12-13
21157      * B16-B31 reserved
21158      */
21159     A_UINT32 rx_mcs_set; /* Rx max NSS set */
21160     A_UINT32 tx_mcs_set; /* Tx max NSS set */
21161 } wmi_eht_rate_set;
21162 
21163 /*
21164  * IMPORTANT: Make sure the bit definitions here are consistent
21165  * with the ni_flags definitions in wlan_peer.h
21166  */
21167 #define WMI_PEER_AUTH            0x00000001  /* Authorized for data */
21168 #define WMI_PEER_QOS             0x00000002  /* QoS enabled */
21169 #define WMI_PEER_NEED_PTK_4_WAY  0x00000004  /* Needs PTK 4 way handshake for authorization */
21170 #define WMI_PEER_GK_INST         0x00000008  /* group Key Installed */
21171 #define WMI_PEER_NEED_GTK_2_WAY  0x00000010  /* Needs GTK 2 way handshake after 4-way handshake */
21172 #define WMI_PEER_PRIV            0x00000020  /* Encryption Enabled */
21173 #define WMI_PEER_PK_INST         0x00000040  /* Pairwise Key Installed */
21174 #define WMI_PEER_TKIP_CM_ENABLED 0x00000080  /* TKIP CounterMeasures */
21175 #define WMI_PEER_SW_DEMIC_FRAG   0x00000100  /* S/W Demic of Frag Train */
21176 #define WMI_PEER_CCX_ENABLED     0x00000200  /* CCX enabled */
21177 #define WMI_PEER_HE              0x00000400  /* HE Enabled */
21178 #define WMI_PEER_APSD            0x00000800  /* U-APSD power save enabled */
21179 #define WMI_PEER_HT              0x00001000  /* HT enabled */
21180 #define WMI_PEER_40MHZ           0x00002000  /* 40MHz enabld */
21181 #define WMI_PEER_INTER_BSS_PEER  0x00004000  /* Inter BSS peer */
21182 #define WMI_PEER_STBC            0x00008000  /* STBC Enabled */
21183 #define WMI_PEER_LDPC            0x00010000  /* LDPC ENabled */
21184 #define WMI_PEER_DYN_MIMOPS      0x00020000  /* Dynamic MIMO PS Enabled */
21185 #define WMI_PEER_STATIC_MIMOPS   0x00040000  /* Static MIMO PS enabled */
21186 #define WMI_PEER_DIS_MIMOPS      0x00080000  /* MIMO PS DISABLED */
21187 #define WMI_PEER_SPATIAL_EXP     0x00100000  /* Enable spatial expansion for
21188                                               * single stream rates to avoid
21189                                               * unintentional beamforming */
21190 #define WMI_PEER_SPATIAL_MUX     0x00200000  /* SM Enabled */
21191 #define WMI_PEER_TWT_REQ         0x00400000  /* TWT Requester Support bit in Extended Capabilities element */
21192 #define WMI_PEER_TWT_RESP        0x00800000  /* TWT Responder Support bit in Extended Capabilities element */
21193 #define WMI_PEER_MULTI_BSSID     0x01000000  /* Multiple BSSID Support bit in Extended Capabilities element */
21194 #define WMI_PEER_VHT             0x02000000  /* VHT Enabled */
21195 #define WMI_PEER_80MHZ           0x04000000  /* 80MHz enabld */
21196 #define WMI_PEER_PMF             0x08000000  /* Robust Management Frame Protection enabled */
21197 #define WMI_PEER_F_PS_PRESEND_REQUIRED 0x10000000 /* Use this flag to avoid calling powersave API when STA is awake */
21198 #define WMI_PEER_IS_P2P_CAPABLE  0x20000000  /* P2P capable peer */
21199 #define WMI_PEER_160MHZ          0x40000000  /* 160 MHz enabled */
21200 #define WMI_PEER_SAFEMODE_EN     0x80000000  /* Fips Mode Enabled */
21201 
21202 /** define for peer_flags_ext */
21203 #define WMI_PEER_EXT_EHT         0x00000001  /* EHT enabled */
21204 #define WMI_PEER_EXT_320MHZ      0x00000002  /* 320Mhz enabled */
21205 #define WMI_PEER_EXT_DMS_CAPABLE 0x00000004
21206 #define WMI_PEER_EXT_HE_CAPS_6GHZ_VALID        0x00000008  /* param he_caps_6ghz is valid or not */
21207 #define WMI_PEER_EXT_IS_QUALCOMM_NODE 0x00000010 /* Indicates if the peer connecting is a qualcomm node */
21208 #define WMI_PEER_EXT_IS_MESH_NODE 0x00000020 /* Indicates if the peer connecting is a mesh node */
21209 #define WMI_PEER_EXT_F_CRIT_PROTO_HINT_ENABLED 0x40000000
21210 
21211 /**
21212  * Peer rate capabilities.
21213  *
21214  * This is of interest to the ratecontrol
21215  * module which resides in the firmware. The bit definitions are
21216  * consistent with that defined in if_athrate.c.
21217  *
21218  * @todo
21219  * Move this to a common header file later so there is no need to
21220  * duplicate the definitions or maintain consistency.
21221  */
21222 #define WMI_RC_DS_FLAG          0x01    /* Dual stream flag */
21223 #define WMI_RC_CW40_FLAG        0x02    /* CW 40 */
21224 #define WMI_RC_SGI_FLAG         0x04    /* Short Guard Interval */
21225 #define WMI_RC_HT_FLAG          0x08    /* HT */
21226 #define WMI_RC_RTSCTS_FLAG      0x10    /* RTS-CTS */
21227 #define WMI_RC_TX_STBC_FLAG     0x20    /* TX STBC */
21228 #define WMI_RC_TX_STBC_FLAG_S   5       /* TX STBC */
21229 #define WMI_RC_RX_STBC_FLAG     0xC0    /* RX STBC ,2 bits */
21230 #define WMI_RC_RX_STBC_FLAG_S   6       /* RX STBC ,2 bits */
21231 #define WMI_RC_WEP_TKIP_FLAG    0x100   /* WEP/TKIP encryption */
21232 #define WMI_RC_TS_FLAG          0x200   /* Three stream flag */
21233 #define WMI_RC_UAPSD_FLAG       0x400   /* UAPSD Rate Control */
21234 
21235 enum WMI_PEER_STA_TYPE {
21236     WMI_PEER_STA_TYPE_INVALID                 = 0, /* Invalid type*/
21237     WMI_PEER_STA_TYPE_ONLY_STAVDEV            = 1, /* AP has only STAVDEV and APVDEV is not present on any radio */
21238     WMI_PEER_STA_TYPE_APVDEV_ON_OTHER_RADIO   = 2, /* AP has STAVDEV on one radio and APVDEV on other radios */
21239     WMI_PEER_STA_TYPE_FH_APVDEV_ON_SAME_RADIO = 3, /* AP has STAVDEV and APVDEV on same radio. During STAVDEV connection,
21240                                                     * no repeater client is connected with this repeater APVDEV
21241                                                     */
21242     WMI_PEER_STA_TYPE_BH_APVDEV_ON_SAME_RADIO = 4, /* AP has STAVDEV and APVDEV on same radio. During STAVDEV connection,
21243                                                     * at least one repeater client is connected with this repeater APVDEV
21244                                                     * (daisy chain config)
21245                                                     */
21246 };
21247 
21248 #define WMI_PEER_STA_TYPE_GET(dword)        WMI_GET_BITS(dword, 0, 8)
21249 #define WMI_PEER_STA_TYPE_SET(dword, value) WMI_SET_BITS(dword, 0, 8, value)
21250 
21251 #define WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS  (0)
21252 #define WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_MASK    (0x1 << WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS)
21253 #define WMI_PEER_ASSOC_SET_BSS_MAX_IDLE_OPTION(_dword, _val) \
21254     WMI_SET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS, 1, _val)
21255 #define WMI_PEER_ASSOC_GET_BSS_MAX_IDLE_OPTION(_dword) \
21256     WMI_GET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_OPTION_BITPOS, 1)
21257 
21258 #define WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS  (16)
21259 #define WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_MASK    (0xFFFF << WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS)
21260 #define WMI_PEER_ASSOC_SET_BSS_MAX_IDLE_PERIOD(_dword, _val) \
21261     WMI_SET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS, 16, _val)
21262 #define WMI_PEER_ASSOC_GET_BSS_MAX_IDLE_PERIOD(_dword) \
21263     WMI_GET_BITS(_dword, WMI_PEER_ASSOC_BSS_MAX_IDLE_PERIOD_BITPOS, 16)
21264 
21265 typedef struct {
21266     A_UINT32 tlv_header; /** TLV tag (MITLV_TAG_STRUC_wmi_peer_assoc_mlo_partner_link_params) and len */
21267     A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller. Set to 0xFFFFFFFF if no vdev is allocated. */
21268     A_UINT32 hw_mld_link_id; /** Unique link id across SOCs, got as part of QMI handshake. */
21269     wmi_mlo_flags mlo_flags;  /** MLO flags */
21270     A_UINT32 logical_link_index; /** Unique index for links of the mlo. Starts with Zero */
21271     A_UINT32 ieee_link_id;  /*link id in the 802.11 frames*/
21272     wmi_mac_addr bss_id;
21273     wmi_channel wmi_chan;
21274     wmi_mac_addr self_mac;
21275 } wmi_peer_assoc_mlo_partner_link_params;
21276 
21277 /* This TLV structure used to pass mlo Parameters on peer assoc, only apply for mlo-peers */
21278 typedef struct {
21279     A_UINT32 tlv_header; /** TLV tag and len; */
21280     /** MLO flags */
21281     wmi_mlo_flags mlo_flags;
21282     /** MLD MAC address */
21283     wmi_mac_addr mld_macaddr;
21284     /** Unique index for links of the mlo. Starts with Zero */
21285     A_UINT32 logical_link_index;
21286     /** ML Peer ID
21287      * In WIN systems, mld_peer_id is generated by Host.
21288      * In MCL systems, mld_peer_id will be set to invalid peer id.
21289      */
21290     A_UINT32 mld_peer_id;
21291     /** Link-ID of the AP to which STA is associated */
21292     A_UINT32 ieee_link_id;
21293     /** eMLSR transition timeout in microseconds */
21294     A_UINT32 emlsr_trans_timeout_us;
21295     /** eMLSR transition delay in microseconds */
21296     A_UINT32 emlsr_trans_delay_us;
21297     /** eMLSR padding delay in microseconds */
21298     A_UINT32 emlsr_padding_delay_us;
21299     union {
21300         /** Medium Synchronization Duration field in units of 32 microseconds */
21301         A_UINT32 msd_dur_subfield;
21302         /** DEPRECATED - DO NOT USE.
21303          * Medium Synchronization Duration in microseconds */
21304         A_UINT32 msd_dur_us;
21305     };
21306     /** Medium Synchronization OFDM ED Threshold */
21307     A_UINT32 msd_ofdm_ed_thr;
21308     /** Medium Synchronization Max Num of TXOPs */
21309     A_UINT32 msd_max_num_txops;
21310     /** max_num_simultaneous_links:
21311      * The maximum number of affiliated STAs in the non-AP MLD that
21312      * support simultaneous transmission or reception of frames.
21313      */
21314     A_UINT32 max_num_simultaneous_links;
21315     /** NSTR indication bitmap received in assoc req */
21316     A_UINT32 nstr_indication_bitmap;
21317 
21318     /** max num of active links recommended by AP or applications */
21319     A_UINT32 recommended_max_num_simultaneous_links;
21320 } wmi_peer_assoc_mlo_params;
21321 
21322 typedef struct {
21323     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_tid_to_link_map */
21324     A_UINT32 tlv_header;
21325 
21326     /**
21327      * A_UINT32
21328      *     WMI_TID_TO_LINK_MAP_TID_NUM_GET / WMI_TID_TO_LINK_MAP_TID_NUM_SET
21329      *     tid_num:5,
21330      *
21331      *     WMI_TID_TO_LINK_MAP_DIR_GET / WMI_TID_TO_LINK_MAP_DIR_SET
21332      *     dir:2,                 // 0 - DL, 1 - UL, 2 - BiDi
21333      *
21334      *     WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_GET /
21335      *         WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_SET
21336      *     default_link_mapping:1, // If this is set to 1, ignore
21337      *                             // link_mapping_mask for the specific tid
21338      *
21339      *     WMI_TID_TO_LINK_MAP_LINK_MASK_GET / WMI_TID_TO_LINK_MAP_LINK_MASK_SET
21340      *     link_mapping_mask:16,
21341      *
21342      *     rsvd:8;
21343      */
21344     A_UINT32 tid_to_link_map_info;
21345 } wmi_peer_assoc_tid_to_link_map;
21346 
21347 #define WMI_PDEV_MESH_RX_FILTER_GET(enable) WMI_GET_BITS(enable,0,1)
21348 #define WMI_PDEV_MESH_RX_FILTER_SET(enable,value) WMI_SET_BITS(enable,0,1,value)
21349 
21350 typedef struct {
21351     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_mesh_rx_filter_enable_fixed_param **/
21352     A_UINT32 tlv_header;
21353 
21354     A_UINT32 pdev_id;
21355     union {
21356         struct {
21357             A_UINT32 enable: 1, /** denotes enable/disable mesh rx filter, refer to WMI_PDEV_MESH_RX_FILTER_GET/SET macros */
21358                     reserved: 31;
21359         };
21360         A_UINT32 enable_word32;
21361     };
21362 
21363     /** Mac_Add for the RX filter **/
21364     wmi_mac_addr link_macaddr;
21365 } wmi_pdev_mesh_rx_filter_enable_fixed_param;
21366 
21367 
21368 /*
21369  * PEER assoc_flags for assoc complete:
21370  * Bit 0: Set for peer data flush
21371  */
21372 #define WMI_ASSOC_FLAG_FLUSH_PEER_DATA  0x00000001
21373 #define WMI_ASSOC_FLAG_FLUSH_PEER_DATA_GET(assoc_flags) WMI_GET_BITS(assoc_flags, 0, 1)
21374 #define WMI_ASSOC_FLAG_FLUSH_PEER_DATA_SET(assoc_flags, value) WMI_GET_BITS(assoc_flags, 0, 1, value)
21375 
21376 typedef struct {
21377     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
21378     /** peer MAC address */
21379     wmi_mac_addr peer_macaddr;
21380     /** VDEV id */
21381     A_UINT32 vdev_id;
21382     /** assoc = 1 reassoc = 0 */
21383     A_UINT32 peer_new_assoc;
21384     /** peer associd (16 bits) */
21385     A_UINT32 peer_associd;
21386     /** peer station flags: see definition above */
21387     A_UINT32 peer_flags;
21388     /** negotiated capabilities (lower 16 bits)*/
21389     A_UINT32 peer_caps;
21390     /** Listen interval */
21391     A_UINT32 peer_listen_intval;
21392     /** HT capabilities of the peer */
21393     A_UINT32 peer_ht_caps;
21394     /** maximum rx A-MPDU length */
21395     A_UINT32 peer_max_mpdu;
21396     /** mpdu density of the peer in usec(0 to 16) */
21397     A_UINT32 peer_mpdu_density;
21398     /** peer rate capabilities see flags above */
21399     A_UINT32 peer_rate_caps;
21400     /** num spatial streams */
21401     A_UINT32 peer_nss;
21402     /** VHT capabilities of the peer */
21403     A_UINT32 peer_vht_caps;
21404     /** phy mode */
21405     A_UINT32 peer_phymode;
21406     /** HT Operation Element of the peer. Five bytes packed in 2
21407      *  INT32 array and filled from lsb to msb.
21408      *  Note that the size of array peer_ht_info[] cannotbe changed
21409      *  without breaking WMI Compatibility. */
21410     A_UINT32 peer_ht_info[2];
21411     /** total number of negotiated legacy rate set. Also the sizeof
21412      *  peer_legacy_rates[] */
21413     A_UINT32 num_peer_legacy_rates;
21414     /** total number of negotiated ht rate set. Also the sizeof
21415      *  peer_ht_rates[] */
21416     A_UINT32 num_peer_ht_rates;
21417     /**
21418      * Bitmap providing the mapping of bandwidths to max Rx NSS for this peer
21419      * in VHT160 / VHT80+80 Mode.
21420      * As per the New IEEE 802.11 Update, the AP & Peer could advertise and
21421      * handshake with the Max Rx NSS differing for different bandwidths
21422      * instead of a single max Rx NSS Value.
21423      * Some QCA chipsets have to advertise a different max Rx NSS value for
21424      * 160 MHz and 80MHz.
21425      *
21426      *  bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
21427      *  bit[5:3] : Represents value of Rx NSS for VHT 80_80 MHz -
21428      *             Extended NSS support
21429      *  bit[30:6]: Reserved
21430      *  bit[31]  : MSB(0/1): 1 in case of valid data sent from Host
21431      */
21432     A_UINT32 peer_bw_rxnss_override;
21433 
21434     /* 802.11ax capabilities */
21435     wmi_ppe_threshold peer_ppet;
21436     A_UINT32 peer_he_cap_info; /* protocol-defined HE / 11ax capability flags */
21437     A_UINT32 peer_he_ops; /* HE operation contains BSS color */
21438     A_UINT32 peer_he_cap_phy[WMI_MAX_HECAP_PHY_SIZE];
21439     A_UINT32 peer_he_mcs; /* Indicates number of HE MCS TLV present */
21440 
21441     /* 2nd DWORD of 11ax MAC Capabilities */
21442     A_UINT32 peer_he_cap_info_ext;
21443 
21444     /*
21445      * bit 0     : Indicated support for RX 1xLTF + 0.4us
21446      * bit 1     : Indicates support for RX 2xLTF + 0.4us
21447      * bit 2     : Indicates support for 2xLTF in 160/80+80 MHz HE PPDU
21448      * bit[4:3]  : Indicates support for DL OFDMA
21449      *             Refer to enum WMI_HE_RX_DL_OFDMA_SUPPORT_x
21450      * bit[6:5]  : Indicates support for DL MU-MIMO
21451      *             Refer to enum WMI_HE_RX_DL_MUMIMO_SUPPORT_x
21452      * bit[31:7] : Reserved
21453      * Refer to WMI_HE_CAP_xx_LTF_xxx_SUPPORT_GET/SET macros
21454      */
21455     A_UINT32 peer_he_cap_info_internal;
21456 
21457     /* min data rate to be used in Mbps */
21458     A_UINT32 min_data_rate;
21459 
21460     /** HE 6 GHz Band Capabilities of the peer.
21461      * (Defined in 9.4.2.261 HE 6 GHz Band Capabilities element in
21462      * 802.11ax_D5.0.)
21463      * valid when WMI_PEER_HE is set and WMI_PEER_VHT/HT are not set.
21464      */
21465     A_UINT32 peer_he_caps_6ghz;
21466 
21467     /* bit[0-7] : sta_type
21468      * bit[8-31]: reserved
21469      * Refer to enum WMI_PEER_STA_TYPE for sta_type values.
21470      * Refer to WMI_PEER_STA_TYPE_GET/SET macros.
21471      */
21472     A_UINT32 sta_type;
21473 
21474     /*
21475      * @bss_max_idle_option - Parameters exchanged for BSS Max Idle capability.
21476      * bit 0       : If set, only a protected frame indicates activity.
21477      *               If cleared, either an unprotected or a protected frame
21478      *               indicates activity.
21479      *               Refer to the WMI_PEER_ASSOC_[SET,GET]_BSS_MAX_IDLE_OPTION
21480      *               macros.
21481      * bit [1:15]  : Reserved
21482      * bit [16:31] : Max idle period in units of 1000 TUs
21483      *               Refer to the WMI_PEER_ASSOC_[SET,GET]_BSS_MAX_IDLE_PERIOD
21484      *               macros.
21485      */
21486     A_UINT32 bss_max_idle_option;
21487 
21488     /*
21489      * Connected AP auth mode values are from  WMI_AUTH_ enum.
21490      * The target shall ignore an auth_mode value of 0 / WMI_AUTH_NONE,
21491      * due to ambiguity whether a zero value was provided explicitly or
21492      * simply as a default.
21493      */
21494     A_UINT32 auth_mode;
21495 
21496     /* Refer to WMI_PEER_EXT_xxx defs */
21497     A_UINT32 peer_flags_ext;
21498 
21499     /* 802.11be capabilities and other params */
21500     A_UINT32 puncture_20mhz_bitmap; /* each bit indicates one 20Mhz bw puntured */
21501     /* EHT mac capabilities from BSS beacon EHT cap IE, total WMI_MAX_EHTCAP_MAC_SIZE*A_UINT32 bits */
21502     A_UINT32 peer_eht_cap_mac[WMI_MAX_EHTCAP_MAC_SIZE];
21503     /* EHT phy capabilities from BSS beacon EHT cap IE, total WMI_MAX_EHTCAP_PHY_SIZE*A_UINT32 bits */
21504     A_UINT32 peer_eht_cap_phy[WMI_MAX_EHTCAP_PHY_SIZE];
21505     A_UINT32 peer_eht_ops;
21506     wmi_ppe_threshold peer_eht_ppet;
21507     A_UINT32 assoc_flags;
21508 
21509 /* Following this struct are the TLV's:
21510  *     A_UINT8 peer_legacy_rates[];
21511  *     A_UINT8 peer_ht_rates[];
21512  *     wmi_vht_rate_set peer_vht_rates; <-- VHT capabilities of the peer
21513  *     WMI_he_rate_set_peer_he_rates; <-- HE capabilities of the peer
21514  *     wmi_peer_assoc_mlo_params  mlo_params[0,1]; <-- MLO parameters opt. TLV
21515  *         Only present for MLO peers.
21516  *         For non-MLO peers the array length should be 0.
21517  *     wmi_eht_rate_set peer_eht_rates; <-- EHT capabilities of the peer
21518  *     wmi_peer_assoc_mlo_partner_link_params link_info[] <-- partner link info
21519  *     wmi_peer_assoc_tid_to_link_map[] <-- tid to link_map info
21520  */
21521 } wmi_peer_assoc_complete_cmd_fixed_param;
21522 
21523 typedef struct {
21524     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_ap_oper_bw_cmd_fixed_param */
21525     A_UINT32 vdev_id;
21526     A_UINT32 ap_phymode; /* contains a WLAN_PHY_MODE value */
21527 } wmi_vdev_report_ap_oper_bw_cmd_fixed_param;
21528 
21529 /* WDS Entry Flags */
21530 #define WMI_WDS_FLAG_STATIC    0x1    /* Disable aging & learning */
21531 
21532 typedef struct {
21533     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
21534     /** peer MAC address */
21535     wmi_mac_addr peer_macaddr;
21536     /** wds MAC addr */
21537     wmi_mac_addr wds_macaddr;
21538     /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
21539     A_UINT32 flags;
21540     A_UINT32 vdev_id;
21541 } wmi_peer_add_wds_entry_cmd_fixed_param;
21542 
21543 #define WMI_CHAN_INFO_START_RESP 0
21544 #define WMI_CHAN_INFO_END_RESP 1
21545 /* deprecated but maintained as aliases: old names containing typo */
21546 #define WMI_CHAN_InFO_START_RESP WMI_CHAN_INFO_START_RESP
21547 #define WMI_CHAN_InFO_END_RESP   WMI_CHAN_INFO_END_RESP
21548 /* end deprecated */
21549 #define WMI_CHAN_INFO_ENTRY_RESP 2
21550 
21551 typedef struct {
21552     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
21553     /** wds MAC addr */
21554     wmi_mac_addr wds_macaddr;
21555     A_UINT32 vdev_id;
21556 } wmi_peer_remove_wds_entry_cmd_fixed_param;
21557 
21558 
21559 typedef struct {
21560     /** peer MAC address */
21561     wmi_mac_addr peer_macaddr;
21562 } wmi_peer_q_empty_callback_event;
21563 
21564 /*
21565  * Command to update an already existing WDS entry. Different address setting
21566  * combinations are possible.
21567  *
21568  * Valid wds and peer      -> Associated WDS entry peer ptr & flags will be updated.
21569  * Valid wds and null peer -> Associated WDS entry flags will be updated.
21570  * Null wds and Valid peer -> Flags will be updated for all WDS entries behind the peer.
21571  * Null wds and peer       -> Flags will be updated for all WDS entries.
21572  */
21573 typedef struct {
21574     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param */
21575     /** peer MAC address */
21576     wmi_mac_addr peer_macaddr;
21577     /** wds MAC addr */
21578     wmi_mac_addr wds_macaddr;
21579     /* Flags associated with WDS entry */
21580     A_UINT32 flags;
21581     A_UINT32 vdev_id;
21582 } wmi_peer_update_wds_entry_cmd_fixed_param;
21583 
21584 /**
21585  * Channel info WMI event
21586  */
21587 typedef struct {
21588     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
21589     /** Error code */
21590     A_UINT32 err_code;
21591     /** Channel freq */
21592     A_UINT32 freq;
21593     /** Read flags */
21594     A_UINT32 cmd_flags;
21595     /** Noise Floor value */
21596     A_UINT32 noise_floor;
21597     /** rx clear count */
21598     A_UINT32 rx_clear_count;
21599     /** cycle count */
21600     A_UINT32 cycle_count;
21601     /** channel tx power per range in 0.5dBm steps */
21602     A_UINT32 chan_tx_pwr_range;
21603     /** channel tx power per throughput */
21604     A_UINT32 chan_tx_pwr_tp;
21605     /** rx frame count (cumulative) */
21606     A_UINT32   rx_frame_count;
21607     /** BSS rx cycle count */
21608     A_UINT32 my_bss_rx_cycle_count;
21609     /** b-mode data rx time (units are microseconds) */
21610     A_UINT32 rx_11b_mode_data_duration;
21611     /** tx frame count */
21612     A_UINT32 tx_frame_cnt;
21613     /** mac clock */
21614     A_UINT32 mac_clk_mhz;
21615     /** unique id identifying the VDEV */
21616     A_UINT32 vdev_id;
21617     /**
21618      * Noise Floor value for all chain in dBm.
21619      * If per_chain_noise_floor value is 0 then it should be ignored.
21620      */
21621     A_UINT32 per_chain_noise_floor[WMI_MAX_CHAINS];
21622 
21623 /**
21624  * Following this structure is the optional TLV:
21625  * struct wmi_scan_blanking_params_info[0/1];
21626  * struct wmi_cca_busy_subband_info[];
21627  *     Reporting subband CCA busy info in host requested manner.
21628  */
21629 } wmi_chan_info_event_fixed_param;
21630 
21631 typedef struct {
21632     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_cca_busy_subband_info */
21633     A_UINT32 tlv_header;
21634     /** rx clear count */
21635     A_UINT32 rx_clear_count;
21636 } wmi_cca_busy_subband_info;
21637 
21638 /**
21639  * The below structure contains parameters related to the scan radio
21640  * blanking feature
21641  */
21642 typedef struct {
21643     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_blanking_params_info */
21644     A_UINT32 tlv_header;
21645     /* scan_radio_blanking_duration:
21646      * Cumulative scan disabled duration which indicates the total time in
21647      * micro seconds where rx blanking was enabled on the scan radio due to
21648      * simultaneous transmissions on the same band in the serving radio.
21649      */
21650     A_UINT32 scan_radio_blanking_duration;
21651     /* scan_radio_blanking_count:
21652      * Count of the number of times rx blanking was enabled on the scan radio
21653      * due to simultaneous transmissions on the same band in the serving radio.
21654      */
21655     A_UINT32 scan_radio_blanking_count;
21656 } wmi_scan_blanking_params_info;
21657 
21658 typedef enum {
21659     /* Blanking feature will be disabled */
21660     WMI_SCAN_BLANKING_DISABLED = 0,
21661 
21662     /* Blanking enabled only on current operating band */
21663     WMI_SCAN_BLANKING_ENABLED,
21664 
21665     /*
21666      * Blanking enabled on both 5GHz and 6GHz bands when scan radio
21667      * home channel is on either 5GHz or 6GHz bands
21668      */
21669     WMI_SCAN_BLANKING_ENABLED_NO_ISOLATION,
21670 
21671     WMI_SCAN_BLANKING_MAX,
21672 } WMI_SCAN_BLANKING_MODE;
21673 
21674 /**
21675  * The below three structures are the params used for converting RSSI
21676  * from dB to dBm units.
21677  */
21678 
21679 typedef struct {
21680     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_dbm_conversion_params_info */
21681     /* Current operating bandwidth as per wmi_channel_width */
21682     A_UINT32 curr_bw;
21683     /* Current rx chainmask */
21684     A_UINT32 curr_rx_chainmask;
21685     /* 3 Bytes of xbar_config are used for RF to BB mapping*/
21686     /* Samples of xbar_config,
21687      * If xbar_config is 0xFAC688(hex):
21688      *     RF chains 0-7 are connected to BB chains 0-7
21689      *     here,
21690      *         bits 0 to 2 = 0, maps BB chain 0 for RF chain 0
21691      *         bits 3 to 5 = 1, maps BB chain 1 for RF chain 1
21692      *         bits 6 to 8 = 2, maps BB chain 2 for RF chain 2
21693      *         bits 9 to 11 = 3, maps BB chain 3 for RF chain 3
21694      *         bits 12 to 14 = 4, maps BB chain 4 for RF chain 4
21695      *         bits 15 to 17 = 5, maps BB chain 5 for RF chain 5
21696      *         bits 18 to 20 = 6, maps BB chain 6 for RF chain 6
21697      *         bits 21 to 23 = 7, maps BB chain 7 for RF chain 7
21698      *
21699      * If xbar_config is 0x688FAC(hex):
21700      *     RF chains 0-3 are connected to BB chains 4-7
21701      *     RF chains 4-7 are connected to BB chains 0-3
21702      *     here,
21703      *         bits 0 to 2 = 4, maps BB chain 4 for RF chain 0
21704      *         bits 3 to 5 = 5, maps BB chain 5 for RF chain 1
21705      *         bits 6 to 8 = 6, maps BB chain 6 for RF chain 2
21706      *         bits 9 to 11 = 7, maps BB chain 7 for RF chain 3
21707      *         bits 12 to 14 = 0, maps BB chain 0 for RF chain 4
21708      *         bits 15 to 17 = 1, maps BB chain 1 for RF chain 5
21709      *         bits 18 to 20 = 2, maps BB chain 2 for RF chain 6
21710      *         bits 21 to 23 = 3, maps BB chain 3 for RF chain 7
21711      */
21712     A_UINT32 xbar_config;
21713     /* The below xlna_bypass params needed in old target architecture
21714      * generation, not applicable for current target architecture generation.
21715      * Values will be zero for current target architectures. */
21716     /* Low noise amplifier bypass offset; signed integer; units are in dB */
21717     A_INT32 xlna_bypass_offset;
21718     /* Low noise amplifier bypass threshold; signed integer; units are in dB */
21719     A_INT32 xlna_bypass_threshold;
21720     /* nf_hw_dbm:
21721      * 2D byte array of HW noise floor in dBm per chain, per 20MHz subband
21722      * This array is filled in little endian format.
21723      * for big-endian hosts, manual endian conversion is needed to obtain
21724      * correct sequence of values.
21725      */
21726     A_INT8 nf_hw_dbm[MAX_ANTENNA_EIGHT][MAX_20MHZ_SEGMENTS];
21727 } wmi_rssi_dbm_conversion_params_info;
21728 
21729 typedef struct {
21730     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_dbm_conversion_temp_offset_info */
21731     /**
21732      * RSSI offset based on the current temperature, signed integer,
21733      * units are in dB
21734      */
21735     A_INT32 rssi_temp_offset;
21736 } wmi_rssi_dbm_conversion_temp_offset_info;
21737 
21738 /**
21739  * RSSI dB to dBm conversion params event to host
21740  */
21741 typedef struct {
21742     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_dbm_conversion_fixed_param */
21743     /* PDEV id */
21744     A_UINT32 pdev_id;
21745     /**
21746      * Followed by these TLVs below.
21747      * wmi_rssi_dbm_conversion_params_info rssi_dbm_conversion_param[0 or 1]
21748      *     wmi_rssi_dbm_conversion_params_info will be sent in case of
21749      *     channel, BW, rx_chainmask change.
21750      * wmi_rssi_dbm_conversion_temp_offset_info rssi_temp_offset[0 or 1]
21751      *     wmi_rssi_dbm_conversion_temp_offset_info will be sent when the
21752      *     RSSI temp offset changes.
21753      */
21754 } wmi_rssi_dbm_conversion_params_info_event_fixed_param;
21755 
21756 /**
21757  * Non wlan interference event
21758  */
21759 typedef struct {
21760     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_cw_int */
21761     A_UINT32 channel; /* either number or freq in mhz*/
21762 } wlan_dcs_cw_int;
21763 #define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */
21764 
21765 /**
21766  *  wlan_dcs_im_tgt_stats
21767  *
21768  */
21769 typedef struct _wlan_dcs_im_tgt_stats {
21770     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t */
21771 
21772     /** current running TSF from the TSF-1 */
21773     A_UINT32 reg_tsf32;
21774 
21775     /** Known last frame RSSI, in case of multiple stations, if
21776      *  and at different ranges, this would not guarantee that
21777      *  this is the least RSSI.
21778      */
21779     A_UINT32 last_ack_rssi;
21780 
21781     /**  Sum of all the failed durations in the last one second interval.
21782      */
21783     A_UINT32 tx_waste_time;
21784     /** count how many times the hal_rxerr_phy is marked, in this
21785      *  time period
21786      */
21787     A_UINT32 rx_time;
21788     A_UINT32 phyerr_cnt;
21789 
21790     /**
21791      *  WLAN IM stats from target to host
21792      *
21793      *  Below statistics are sent from target to host periodically.
21794      *  These are collected at target as long as target is running
21795      *  and target chip is not in sleep.
21796      *
21797      */
21798 
21799     /** listen time from ANI */
21800     A_INT32 listen_time;
21801 
21802     /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
21803     A_UINT32 reg_tx_frame_cnt;
21804 
21805     /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
21806     A_UINT32 reg_rx_frame_cnt;
21807 
21808     /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
21809     A_UINT32 reg_rxclr_cnt;
21810 
21811     /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
21812     A_UINT32 reg_cycle_cnt; /* delta cycle count */
21813 
21814     /** extension channel rx clear count  */
21815     A_UINT32 reg_rxclr_ext_cnt;
21816 
21817     /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
21818     A_UINT32 reg_ofdm_phyerr_cnt;
21819 
21820     /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
21821     A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
21822 
21823     /** Channel noise floor (units are dBm) */
21824     A_INT32 chan_nf;
21825 
21826     /** BSS rx cycle count */
21827     A_UINT32 my_bss_rx_cycle_count;
21828 } wlan_dcs_im_tgt_stats_t;
21829 
21830 typedef struct wlan_dcs_awgn_info {
21831     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_awgn_int_t */
21832     A_UINT32 tlv_header;
21833     /** Channel width (20, 40, 80, 80+80, 160, 320 ) enum wmi_channel_width */
21834     A_UINT32 channel_width;
21835     /** Primary channel frequency (MHz) */
21836     A_UINT32 chan_freq;
21837     /** center frequency (MHz) first segment */
21838     A_UINT32 center_freq0;
21839     /** center frequency (MHz) second segment */
21840     A_UINT32 center_freq1;
21841     /*
21842      * Indicates which 20MHz segments contain interference
21843      *  320 MHz: bits 0-15
21844      *  160 MHz: bits 0-7
21845      *   80 MHz: bits 0-3
21846      * Bitmap - Each bit position will indicate 20MHz in which
21847      * interference is seen. (Valid 16 bits out of 32 bit integer)
21848      * Note: for 11be, the interference present 20MHz can be punctured
21849      * for better channel utilization.
21850      */
21851     A_UINT32 chan_bw_interference_bitmap;
21852 } wmi_dcs_awgn_int_t;
21853 
21854 typedef struct wlan_dcs_obss_info {
21855     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_obss_int_t */
21856     A_UINT32 tlv_header;
21857     /** Channel width (20, 40, 80, 80+80, 160, 320) enum wmi_channel_width */
21858     A_UINT32 channel_width;
21859     /** Primary channel frequency (MHz) */
21860     A_UINT32 chan_freq;
21861     /** center frequency (MHz) first segment */
21862     A_UINT32 center_freq0;
21863     /** center frequency (MHz) second segment */
21864     A_UINT32 center_freq1;
21865     /* chan_bw_interference_bitmap:
21866      * Indicates which 20MHz segments contain interference
21867      *  320 MHz: bits 0-15
21868      *  160 MHz: bits 0-7
21869      *   80 MHz: bits 0-3
21870      * Within the bitmap, Bit-0 represents lowest 20Mhz, Bit-1 represents
21871      * second lowest 20Mhz and so on.
21872      * Each bit position will indicate 20MHz in which interference is seen.
21873      * (Valid 16 bits out of 32 bit integer)
21874      * Note: for 11be, the interference present 20MHz can be punctured
21875      * for better channel utilization.
21876      */
21877     A_UINT32 chan_bw_interference_bitmap;
21878 } wmi_dcs_obss_int_t;
21879 
21880 /**
21881  *  wmi_dcs_interference_event_t
21882  *
21883  *  Right now this is event and stats together. Partly this is
21884  *  because cw interference is handled in target now. This
21885  *  can be done at host itself, if we can carry the NF alone
21886  *  as a stats event. In future this would be done and this
21887  *  event would carry only stats.
21888  */
21889 typedef struct {
21890     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
21891     /**
21892      * Type of the event present, either the cw interference event, or the wlan_im stats, or AWGN int
21893      *  ATH_CAP_DCS_CWIM   0x01
21894      *  ATH_CAP_DCS_WLANIM 0x02
21895      *  ATH_CAP_DCS_AGWNIM 0x04
21896      *  reserved (AFC)     0x08
21897      *  ATH_CAP_DCS_OBSSIM 0x10
21898      */
21899     A_UINT32 interference_type; /* type of interference, wlan, cw, or AWGN */
21900     /** pdev_id for identifying the MAC
21901      * See macros starting with WMI_PDEV_ID_ for values.
21902      */
21903     A_UINT32 pdev_id;
21904     /** VDEV ID for identifying DCS stats reported at VDEV level.
21905      * Should be interpreted only when WMI_SERVICE_VDEV_DCS_STATS_SUPPORT
21906      * service cap is advertized by target.
21907      * And value would be 0xFF if DCS stats is still configured at PDEV level.
21908      */
21909     A_UINT32 vdev_id;
21910 /*
21911  * Following this struct are these TLVs. Note that they are both array of structures
21912  * but can have at most one element. Which TLV is empty or has one element depends
21913  * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
21914  * elements (not arrays).     union { wlan_dcs_cw_int cw_int; wlan_dcs_im_tgt_stats_t   wlan_stat; } int_event;
21915  *
21916  *       wlan_dcs_cw_int            cw_int[];   <-- cw_interference event
21917  *       wlan_dcs_im_tgt_stats_t   wlan_stat[]; <-- wlan im interference stats
21918  *       wmi_dcs_awgn_int_t        awgn_int[];  <-- Additive white Gaussian noise (AWGN) interference
21919  *       wmi_dcs_obss_int_t        obss_int[];  <-- Overlapping Basic Service Set (OBSS) interference
21920  */
21921 } wmi_dcs_interference_event_fixed_param;
21922 
21923 enum wmi_peer_mcast_group_action {
21924     wmi_peer_mcast_group_action_add = 0,
21925     wmi_peer_mcast_group_action_del = 1
21926 };
21927 #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M   0x1
21928 #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S   0
21929 #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
21930 #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
21931 #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4 /* flag to exclude an ip while filtering. set to exclude */
21932 #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
21933 #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8 /* flag to say ipv4/ipv6. Will be set for ipv6 */
21934 #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
21935 #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10 /* delete all mcast table entries. */
21936 #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
21937 
21938 /* multicast group membership commands */
21939 /* TODO: Converting this will be tricky since it uses an union.
21940  Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
21941 typedef struct {
21942     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
21943     A_UINT32 flags;
21944     wmi_mac_addr ucast_mac_addr;
21945     /* in network byte order */
21946     /* for ipv4, bytes (12-15) should contain ip address and other lower bytes 0. ipv6 should have all bytes valid */
21947     A_UINT8 mcast_ip_addr[16];
21948     /* for ipv6, all 16 bytes has to be valid; for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s */
21949     A_UINT8 mcast_ip_mask[16];/* zero out lower bytes if ipv4*/
21950     /* number of address filters - irrespective of ipv4/ipv6 addresses */
21951     A_UINT32 num_filter_addr;
21952     /* this array should contain the src IPs that are to be filtered during find
21953        The array should be packed.
21954        If there are 2 ipv4 addresses, there should be 8 bytes and rest all 0s */
21955     A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
21956     A_UINT8  vdev_id; /* vdev of this mcast group */
21957 } wmi_peer_mcast_group_cmd_fixed_param;
21958 
21959 
21960 /** Offload Scan and Roaming related  commands */
21961 /** The FW performs 2 different kinds of offload scans independent
21962  *  of host. One is Roam scan which is primarily performed  on a
21963  *  station VDEV after association to look for a better AP that
21964  *  the station VDEV can roam to. The second scan is connect scan
21965  *  which is mainly performed when the station is not associated
21966  *  and to look for a matching AP profile from a list of
21967  *  configured profiles. */
21968 
21969 /* flags for roam_scan_mode_cmd
21970  * indicate the status (success/fail) of wmi_roam_scan_mode cmd through WMI_ROAM_EVENTID */
21971 #define WMI_ROAM_SCAN_MODE_FLAG_REPORT_STATUS  0x1
21972 
21973 /**
21974  * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
21975  *   the roam scan mode is one of the periodic, RSSI change, both, none.
21976  *   None        : Disable Roam scan. No Roam scan at all.
21977  *   Periodic    : Scan periodically with a configurable period.
21978  *   Rssi change : Scan when ever RSSI to current AP changes by the threshold value
21979  *                 set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
21980  *   Both        : Both of the above (scan when either period expires or rss to current AP changes by X amount)
21981  *
21982  */
21983 typedef struct {
21984     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
21985     A_UINT32 roam_scan_mode;
21986     A_UINT32 vdev_id;
21987     A_UINT32 flags; /* see WMI_ROAM_SCAN_MODE_FLAG defs */
21988     /*
21989      * Minimum duration allowed between two consecutive roam scans.
21990      * Roam scan is not allowed, if duration between two consecutive
21991      * roam scans is less than this time.
21992      */
21993     A_UINT32 min_delay_btw_scans; /* In msec */
21994     /*
21995      * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
21996      * positions) showing for which roam_trigger_reasons the
21997      * min_delay_btw_scans constraint should be applied.
21998      * 0x0 means there is no time restrictions between successive roam scans.
21999      */
22000     A_UINT32 min_delay_roam_trigger_reason_bitmask;
22001 } wmi_roam_scan_mode_fixed_param;
22002 
22003 #define WMI_ROAM_SCAN_MODE_NONE        0x0
22004 #define WMI_ROAM_SCAN_MODE_PERIODIC    0x1
22005 #define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
22006 #define WMI_ROAM_SCAN_MODE_BOTH        0x3
22007 /* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
22008 #define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
22009 
22010 
22011 typedef struct {
22012     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
22013     A_UINT32 vdev_id;
22014     A_UINT32 command_arg;
22015 } wmi_roam_scan_cmd_fixed_param;
22016 
22017 #define WMI_ROAM_SCAN_STOP_CMD 0x1
22018 
22019 /** flags for WMI_ROAM_SCAN_RSSI_THRESHOLD command:
22020  *  BIT 0     -> Indicate High RSSI Trigger support is enabled for roaming
22021  *               from 5 GHz to 6 GHz Band
22022  *  BIT 1-31  -> Reserved
22023  */
22024 #define WMI_ROAM_SCAN_RSSI_THRESHOLD_FLAG_ROAM_HI_RSSI_EN_ON_5G 0x1
22025 
22026 /**
22027  * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan RSSI threshold
22028  *  scan RSSI threshold is the RSSI threshold below which the FW will start running Roam scans.
22029  * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
22030  */
22031 typedef struct {
22032     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
22033     /** unique id identifying the VDEV, generated by the caller */
22034     A_UINT32 vdev_id;
22035     /** roam scan RSSI threshold */
22036     A_UINT32 roam_scan_rssi_thresh;
22037     /** When using Hw generated beacon RSSI interrupts */
22038     A_UINT32 roam_rssi_thresh_diff;
22039     /** 5G scan max count */
22040     A_UINT32 hirssi_scan_max_count;
22041     /** 5G scan RSSI change threshold value */
22042     A_UINT32 hirssi_scan_delta;
22043     /** 5G scan upper bound */
22044     A_UINT32 hirssi_upper_bound;
22045     /** roam scan RSSI threshold for 5G band.
22046      *  offset from roam_scan_rssi_thres, in dB units
22047      */
22048     A_INT32 rssi_thresh_offset_5g;
22049     /** flags for WMI_ROAM_SCAN_RSSI_THRESHOLD Command */
22050     A_UINT32 flags; /* see WMI_ROAM_SCAN_RSSI_THRESHOLD_FLAG defs */
22051     /* The TLVs will follow.
22052      * wmi_roam_scan_extended_threshold_param extended_param;
22053      * wmi_roam_earlystop_rssi_thres_param earlystop_param;
22054      * wmi_roam_dense_thres_param dense_param;
22055      * wmi_roam_bg_scan_roaming_param bg_scan_param;
22056      * wmi_roam_data_rssi_roaming_param data_rssi_param;
22057      */
22058 } wmi_roam_scan_rssi_threshold_fixed_param;
22059 
22060 /**
22061  * WMI_ROAM_BTM_CONFIG_CMDID : set BTM (BSS Transition Management. 802.11v) offload config
22062  *  Applicable only when WMI_ROAM_SCAN_MODE is enabled with WMI_ROAM_SCAN_MODE_ROAMOFFLOAD
22063  */
22064 
22065 /**
22066  *  btm_config.flags
22067  *  BIT 0     : Enable/Disable the BTM offload.
22068  *  BIT 1-2   : Action on non matching candidate with cache. Used WMI_ROAM_BTM_OFLD_NON_MATCHING_CND_XXX
22069  *  BIT 3-5   : Roaming handoff decisions. Use WMI_ROAM_BTM_OFLD_CNDS_MATCH_XXX
22070  *  BIT 6     : Enable/Disable solicited BTM
22071  *  BIT 7     : Roam BTM candidates based on the roam score instead of BTM preferred value
22072  *  BIT 8     : BTM query preference over 11k neighbor report request
22073  *  BIT 9     : Send BTM query with preferred candidates list
22074  *  BIT 10    : Forward MBO BTM Request to Host if MBO ASSOC RETRY attribute is set
22075  *  BIT 11-31 : Reserved
22076  */
22077 #define WMI_ROAM_BTM_SET_ENABLE(flags, val)                        WMI_SET_BITS(flags, 0, 1, val)
22078 #define WMI_ROAM_BTM_GET_ENABLE(flags)                             WMI_GET_BITS(flags, 0, 1)
22079 #define WMI_ROAM_BTM_SET_NON_MATCHING_CND_ACTION(flags, val)       WMI_SET_BITS(flags, 1, 2, val)
22080 #define WMI_ROAM_BTM_GET_NON_MATCHING_CND_ACTION(flags)            WMI_GET_BITS(flags, 1, 2)
22081 #define WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION(flags, val)          WMI_SET_BITS(flags, 3, 3, val)
22082 #define WMI_ROAM_BTM_GET_CNDS_MATCH_CONDITION(flags)               WMI_GET_BITS(flags, 3, 3)
22083 #define WMI_ROAM_BTM_SET_SOLICITED_BTM_ENABLE(flags, val)          WMI_SET_BITS(flags, 6, 1, val)
22084 #define WMI_ROAM_BTM_GET_SOLICITED_BTM_ENABLE(flags)               WMI_GET_BITS(flags, 6, 1)
22085 #define WMI_ROAM_BTM_SET_CNDS_SELECT_BASED_ON_SCORE(flags, val)    WMI_SET_BITS(flags, 7, 1, val)
22086 #define WMI_ROAM_BTM_GET_CNDS_SELECT_BASED_ON_SCORE(flags)         WMI_GET_BITS(flags, 7, 1)
22087 #define WMI_ROAM_BTM_SET_BTM_QUERY_PREFERENCE_OVER_11K(flags, val) WMI_SET_BITS(flags, 8, 1, val)
22088 #define WMI_ROAM_BTM_GET_BTM_QUERY_PREFERENCE_OVER_11K(flags)      WMI_GET_BITS(flags, 8, 1)
22089 #define WMI_ROAM_BTM_SET_BTM_QUERY_WITH_CANDIDATE_LIST(flags, val) WMI_SET_BITS(flags, 9, 1, val)
22090 #define WMI_ROAM_BTM_GET_BTM_QUERY_WITH_CANDIDATE_LIST(flags)      WMI_GET_BITS(flags, 9, 1)
22091 #define WMI_ROAM_BTM_SET_FORWARD_MBO_ASSOC_RETRY_BTM_REQUEST_TO_HOST(flags, val)    WMI_SET_BITS(flags, 10, 1, val)
22092 #define WMI_ROAM_BTM_GET_FORWARD_MBO_ASSOC_RETRY_BTM_REQUEST_TO_HOST(flags)         WMI_GET_BITS(flags, 10, 1)
22093 
22094 
22095 /** 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 */
22096 #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 */
22097 #define WMI_ROAM_BTM_NON_MATCHING_CNDS_NO_SCAN_FORWARD   1 /** Does not allow roam scan and forward BTM frame to host */
22098 /** reserved upto 3 */
22099 
22100 /** 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 */
22101 #define WMI_ROAM_BTM_CNDS_MATCH_EXACT                    0 /** Exactly matched with roam candidate list to BTM candidates */
22102 #define WMI_ROAM_BTM_CNDS_MATCH_AT_LEAST_TOP             1 /** At least one or more top priority bssid matched */
22103 /** reserved upto 7 */
22104 
22105 typedef struct {
22106     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_btm_config_fixed_param */
22107     A_UINT32 tlv_header;
22108     /** unique id identifying the VDEV on which BTM is enabled/disabled */
22109     A_UINT32 vdev_id;
22110     /** BTM configuration control flags */
22111     A_UINT32 flags;
22112     /*  BTM query timeout, unit: milliseconds
22113      *  valid value range: 1-10000,
22114      *  default value: 100 will be set if invalid value is given
22115      */
22116     A_UINT32 solicited_timeout_ms;
22117     /*  Maximum attempt of solicited BTM
22118      *  If continuous failure reach to this value, solicited BTM to current
22119      *  ESS will be disabled.
22120      *  valid value range: 1 - (2^32-1). (2^32)-1 means sending forever
22121      *  Default value: 3 will be set if invalid value is given
22122      */
22123     A_UINT32 max_attempt_cnt;
22124     /*  Time to stick to current AP after BTM, unit: seconds
22125      *  valid value range: 0 -(2^16-1).
22126      *  Either 0 or (2^16)-1 means stick to AP forever.
22127      *  Default value: 300 will be set if invalid value is given
22128      */
22129      A_UINT32 stick_time_seconds;
22130     /*  Disassoc time threshold in milliseconds
22131      *  This time threshold allows the target to judge whether the STA
22132      *  should can move to another AP immediately, or if the STA has time
22133      *  to calculate roaming candidates.
22134      *  If the disassoc_timer_threshold value is 0x0, the field should be
22135      *  disregarded.
22136      */
22137     A_UINT32 disassoc_timer_threshold;
22138     /*
22139      * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
22140      * positions) showing for which roam_trigger_reasons the
22141      * btm query needs to be sent.
22142      * If roam trigger reasons are unspecified, btm_bitmap will be 0x0.
22143      */
22144     A_UINT32 btm_bitmap;
22145     /*
22146      * Consider AP as roam candidate only if AP score is better than
22147      * btm_candidate_min_score for BTM roam trigger
22148      */
22149     A_UINT32 btm_candidate_min_score;
22150 } wmi_btm_config_fixed_param;
22151 
22152 #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED  0x0
22153 #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
22154 #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG    0x2
22155 #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP    0x3
22156 
22157 typedef struct {
22158     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
22159     A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
22160     A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
22161     A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
22162     A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
22163     A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
22164     A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
22165     A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
22166     A_UINT32 max_penalty_5g; /** maximum penalty that can be applied to a 5GHz RSSI */
22167     A_UINT32 good_rssi_threshold; /**  RSSI below which roam is kicked in by background scan, although RSSI is still good */
22168 } wmi_roam_scan_extended_threshold_param;
22169 
22170 /**
22171  * WMI_ROAM_SCAN_PERIOD: period for roam scan.
22172  *  Applicable when the scan mode is Periodic or both.
22173  */
22174 typedef struct {
22175     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
22176     /** unique id identifying the VDEV, generated by the caller */
22177     A_UINT32 vdev_id;
22178     /** roam scan period value */
22179     A_UINT32 roam_scan_period; /* units = milliseconds */
22180     /** Aging for Roam scans */
22181     A_UINT32 roam_scan_age;
22182     /** Inactivity monitoring time to consider device is in inactive state with data count is less than roam_inactive_count */
22183     A_UINT32 inactivity_time_period; /* units = milliseconds */
22184     /** Maximum allowed data packets count during inactivity_time_period */
22185     A_UINT32 roam_inactive_count;
22186     /** New roam scan period after device is in inactivity state */
22187     A_UINT32 roam_scan_period_after_inactivity; /* units = milliseconds */
22188     /** roam full scan period value */
22189     A_UINT32 roam_full_scan_period; /* units = milliseconds */
22190 } wmi_roam_scan_period_fixed_param;
22191 
22192 /**
22193  * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : RSSI delta to trigger the roam scan.
22194  *   Rssi change threshold used when mode is Rssi change (or) Both.
22195  *   The FW will run the roam scan when ever the RSSI changes (up or down) by the value set by this parameter.
22196  *   Note scan is triggered based on the RSSI threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
22197  */
22198 typedef struct {
22199     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
22200     /** unique id identifying the VDEV, generated by the caller */
22201     A_UINT32 vdev_id;
22202     /** roam scan RSSI change threshold value */
22203     A_UINT32 roam_scan_rssi_change_thresh;
22204     /** When using Hw generated beacon RSSI interrupts */
22205     A_UINT32 bcn_rssi_weight;
22206     /** Minimum delay between two 5G scans */
22207     A_UINT32 hirssi_delay_btw_scans;
22208 } wmi_roam_scan_rssi_change_threshold_fixed_param;
22209 
22210 #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
22211 #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
22212 #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
22213 
22214 #define WMI_ROAM_SCAN_LIST_FLAG_FLUSH_STATIC 0x1 /* Flush static roam scan channel list in FW */
22215 #define WMI_ROAM_SCAN_LIST_FLAG_FLUSH_DYNAMIC 0x2 /* Flush dynamic roam scan channel list in FW */
22216 
22217 /**
22218  * TLV for roaming channel list
22219  */
22220 typedef struct {
22221     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
22222     /** unique id identifying the VDEV, generated by the caller */
22223     A_UINT32 vdev_id;
22224     /** WMI_CHAN_LIST_TAG */
22225     A_UINT32 chan_list_type;
22226     /** # if channels to scan */
22227     A_UINT32 num_chan;
22228     A_UINT32 flags; /* refer to WMI_ROAM_SCAN_LIST_FLAG_xxx defs */
22229 /**
22230  * TLV (tag length value) parameters follow the wmi_roam_chan_list
22231  * structure. The TLV's are:
22232  *     A_UINT32 channel_list[]; // in MHz
22233  **/
22234 } wmi_roam_chan_list_fixed_param;
22235 
22236 /** Authentication modes */
22237 enum {
22238     WMI_AUTH_NONE, /* no upper level auth */
22239     WMI_AUTH_OPEN, /* open */
22240     WMI_AUTH_SHARED, /* shared-key */
22241     WMI_AUTH_8021X, /* 802.1x */
22242     WMI_AUTH_AUTO, /* Auto */
22243     WMI_AUTH_WPA, /* WPA */
22244     WMI_AUTH_RSNA, /* WPA2/RSNA */
22245     WMI_AUTH_CCKM, /* CCKM */
22246     WMI_AUTH_WAPI, /* WAPI */
22247     WMI_AUTH_AUTO_PSK,
22248     WMI_AUTH_WPA_PSK,
22249     WMI_AUTH_RSNA_PSK,
22250     WMI_AUTH_WAPI_PSK,
22251     WMI_AUTH_FT_RSNA, /* 11r FT */
22252     WMI_AUTH_FT_RSNA_PSK,
22253     WMI_AUTH_RSNA_PSK_SHA256,
22254     WMI_AUTH_RSNA_8021X_SHA256,
22255     WMI_AUTH_CCKM_WPA,
22256     WMI_AUTH_CCKM_RSNA,
22257     WMI_AUTH_RSNA_FILS_SHA256,
22258     WMI_AUTH_RSNA_FILS_SHA384,
22259     WMI_AUTH_RSNA_SUITE_B_8021X_SHA256,
22260     WMI_AUTH_RSNA_SUITE_B_8021X_SHA384,
22261     WMI_AUTH_FT_RSNA_SAE,
22262     WMI_AUTH_FT_RSNA_SUITE_B_8021X_SHA384,
22263     WMI_AUTH_FT_RSNA_FILS_SHA256,
22264     WMI_AUTH_FT_RSNA_FILS_SHA384,
22265     WMI_AUTH_WPA3_SAE,
22266     WMI_AUTH_WPA3_OWE,
22267     WMI_AUTH_PASN,
22268     WMI_AUTH_RSNA_8021X_SHA384,
22269     WMI_AUTH_WPA3_SAE_SHA384,
22270     WMI_AUTH_FT_RSNA_SAE_SHA384,
22271 };
22272 
22273 typedef enum {
22274     WMI_SCAN_CLIENT_NLO = 0x1,  /* 1 */
22275     WMI_SCAN_CLIENT_EXTSCAN,    /* 2 */
22276     WMI_SCAN_CLIENT_ROAM,       /* 3 */
22277     WMI_SCAN_CLIENT_P2P,        /* 4 */
22278     WMI_SCAN_CLIENT_LPI,        /* 5 */
22279     WMI_SCAN_CLIENT_NAN,        /* 6 */
22280     WMI_SCAN_CLIENT_ANQP,       /* 7 */
22281     WMI_SCAN_CLIENT_OBSS,       /* 8 */
22282     WMI_SCAN_CLIENT_PLM,        /* 9 */
22283     WMI_SCAN_CLIENT_HOST,       /* 10 */
22284 } WMI_SCAN_CLIENT_ID;
22285 
22286 typedef struct {
22287     /** authentication mode (defined above)  */
22288     A_UINT32 rsn_authmode;
22289     /** unicast cipher set */
22290     A_UINT32 rsn_ucastcipherset;
22291     /** mcast/group cipher set */
22292     A_UINT32 rsn_mcastcipherset;
22293     /** mcast/group management frames cipher set */
22294     A_UINT32 rsn_mcastmgmtcipherset;
22295 } wmi_rsn_params;
22296 
22297 /** looking for a wps enabled AP */
22298 #define WMI_AP_PROFILE_FLAG_WPS    0x1
22299 /** looking for a secure AP  */
22300 #define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
22301 /** looking for a PMF enabled AP */
22302 #define WMI_AP_PROFILE_FLAG_PMF    0x4
22303 /** If this flag is set roam to SAE_H2E (Hash to Element) enabled APs only */
22304 #define WMI_AP_PROFILE_FLAG_SAE_H2E 0x8
22305 
22306 /* the value used in wmi_roam_cnd_scoring_param->disable_bitmap */
22307 #define WLAN_ROAM_SCORING_RSSI_DISABLE                  0x00000001
22308 #define WLAN_ROAM_SCORING_HT_DISABLE                    0x00000002
22309 #define WLAN_ROAM_SCORING_VHT_DISABLE                   0x00000004
22310 #define WLAN_ROAM_SCORING_BW_DISABLE                    0x00000008
22311 #define WLAN_ROAM_SCORING_BAND_DISABLE                  0x00000010
22312 #define WLAN_ROAM_SCORING_NSS_DISABLE                   0x00000020
22313 #define WLAN_ROAM_SCORING_CHAN_CONGESTION_DISABLE       0x00000040
22314 #define WLAN_ROAM_SCORING_BEAMFORMING_DISABLE           0x00000080
22315 #define WLAN_ROAM_SCORING_PCL_DISABLE                   0x00000100
22316 #define WLAN_ROAM_SCORING_HE_DISABLE                    0x00000200
22317 #define WLAN_ROAM_SCORING_OCE_WAN_DISABLE               0x00000400
22318 #define WLAN_ROAM_SCORING_ETH_DISABLE                   0x00000800
22319 #define WLAN_ROAM_SCORING_MLO_DISABLE                   0x00001000
22320 
22321 #define WLAN_ROAM_SCORING_DISABLE_ALL                   0xFFFFFFFF
22322 #define WLAN_ROAM_SCORING_DEFAULT_PARAM_ALLOW           0x0
22323 
22324 #define WLAN_ROAM_MAX_SELECTION_SCORE                   10000
22325 
22326 #define WLAN_ROAM_SCORE_20MHZ_BW_INDEX                  0
22327 #define WLAN_ROAM_SCORE_40MHZ_BW_INDEX                  1
22328 #define WLAN_ROAM_SCORE_80MHZ_BW_INDEX                  2
22329 #define WLAN_ROAM_SCORE_160MHZ_BW_INDEX                 3
22330 #define WLAN_ROAM_SCORE_MAX_BW_INDEX                    4
22331 #define WMI_ROAM_GET_BW_SCORE_PERCENTAGE(value32, bw_index)                   WMI_GET_BITS(value32, (8 * (bw_index)), 8)
22332 #define WMI_ROAM_SET_BW_SCORE_PERCENTAGE(value32, score_pcnt, bw_index)       WMI_SET_BITS(value32, (8 * (bw_index)), 8, score_pcnt)
22333 
22334 #define WLAN_ROAM_SCORE_NSS_1x1_INDEX                   0
22335 #define WLAN_ROAM_SCORE_NSS_2x2_INDEX                   1
22336 #define WLAN_ROAM_SCORE_NSS_3x3_INDEX                   2
22337 #define WLAN_ROAM_SCORE_NSS_4x4_INDEX                   3
22338 #define WLAN_ROAM_SCORE_MAX_NSS_INDEX                   4
22339 #define WMI_ROAM_GET_NSS_SCORE_PERCENTAGE(value32, nss_index)                 WMI_GET_BITS(value32, (8 * (nss_index)), 8)
22340 #define WMI_ROAM_SET_NSS_SCORE_PERCENTAGE(value32, score_pcnt, nss_index)     WMI_SET_BITS(value32, (8 * (nss_index)), 8, score_pcnt)
22341 
22342 #define WLAN_ROAM_SCORE_BAND_2G_INDEX                   0
22343 #define WLAN_ROAM_SCORE_BAND_5G_INDEX                   1
22344 #define WLAN_ROAM_SCORE_BAND_6G_INDEX                   2
22345 /* 3 is reserved */
22346 #define WLAN_ROAM_SCORE_MAX_BAND_NUM_INDICES            4
22347 #define WLAN_ROAM_SCORE_MAX_BAND_INDEX WLAN_ROAM_SCORE_MAX_BAND_NUM_INDICES
22348 
22349 #define WLAN_ROAM_SCORE_SECURITY_WPA_INDEX              0
22350 #define WLAN_ROAM_SCORE_SECURITY_WPA2_INDEX             1
22351 #define WLAN_ROAM_SCORE_SECURITY_WPA3_INDEX             2
22352 /* 3 is reserved */
22353 #define WLAN_ROAM_SCORE_SECURITY_MAX_NUM_INDICES        4
22354 
22355 #define WMI_ROAM_GET_BAND_SCORE_PERCENTAGE(value32, band_index)                 WMI_GET_BITS(value32, (8 * (band_index)), 8)
22356 #define WMI_ROAM_SET_BAND_SCORE_PERCENTAGE(value32, score_pcnt, band_index)     WMI_SET_BITS(value32, (8 * (band_index)), 8, score_pcnt)
22357 
22358 #define WLAN_ROAM_SCORE_MAX_CHAN_CONGESTION_SLOT        16
22359 #define WLAN_ROAM_SCORE_DEFAULT_CONGESTION_SLOT         0
22360 
22361 #define WLAN_ROAM_SCORE_MAX_OCE_WAN_SLOT                16
22362 #define WLAN_ROAM_SCORE_DEFAULT_OCE_WAN_SLOT            0
22363 
22364 #define WLAN_ROAM_SCORE_320MHZ_BW_EXT_INDEX             0
22365 #define WLAN_ROAM_SCORE_MAX_BW_EXT_INDEX                4
22366 
22367 #define WLAN_ROAM_SCORE_MLSR_INDEX                      0
22368 #define WLAN_ROAM_SCORE_MLMR_INDEX                      1
22369 #define WLAN_ROAM_SCORE_EMLSR_INDEX                     2
22370 #define WLAN_ROAM_SCORE_EMLMR_INDEX                     3
22371 #define WLAN_ROAM_SCORE_MLO_INDEX                       4
22372 #define WMI_ROAM_GET_MLO_SCORE_PERCENTAGE(value32, mlo_index)                 WMI_GET_BITS(value32, (8 * (mlo_index)), 8)
22373 #define WMI_ROAM_SET_MLO_SCORE_PERCENTAGE(value32, score_pcnt, mlo_index)     WMI_SET_BITS(value32, (8 * (mlo_index)), 8, score_pcnt)
22374 #define WMI_ROAM_GET_SECURITY_SCORE_PERCENTAGE(value32, security_index) \
22375     WMI_GET_BITS(value32, (8 * (security_index)), 8)
22376 #define WMI_ROAM_SET_SECURITY_SCORE_PERCENTAGE(value32, score_pcnt, security_index) \
22377     WMI_SET_BITS(value32, (8 * (security_index)), 8, score_pcnt)
22378 
22379 /**
22380     best_rssi_threshold: Roamable AP RSSI equal or better than this threshold, full RSSI score 100. Units in dBm.
22381     good_rssi_threshold: Below this threshold, scoring linear percentage between rssi_good_pcnt and 100. Units in dBm.
22382     bad_rssi_threshold:  Between good and bad RSSI threshold, scoring linear percentage between rssi_bad_pcnt and rssi_good_pcnt. Units in dBm.
22383     good_rssi_pcnt: Used to assigned scoring percentage of each slot between best to good RSSI threshold. Units in percentage.
22384     bad_rssi_pcnt: Used to assigned scoring percentage of each slot between good to bad RSSI threshold. Units in percentage.
22385     good_bucket_size : bucket size of slot in good zone.  Units in dB.
22386     bad_bucket_size : bucket size of slot in bad zone. Units in dB.
22387     rssi_pref_5g_rssi_thresh: Below RSSI threshold, 5G AP have given preference of band percentage. Units in dBm.
22388 */
22389 /**
22390     The graph below explains how RSSI scoring percentage is calculated
22391     as the RSSI improves.  In the graph, the derived parameters good_buckets
22392     and bad_buckets are used.  These derived parameters are related to the
22393     specified parameters as follows:
22394         good_buckets =
22395             (best_rssi_threshold - good_rssi_threshold) / good_bucket_size
22396         bad_buckets =
22397             (good_rssi_threshold - bad_rssi_threshold) / bad_bucket_size
22398 
22399       |     (x0,y0) (x0 = best_rssi, y0 = 100)
22400 p 100 |-------o
22401 e     |       |<--------- (100 - good_rssi_pct)/good_buckets
22402 r     |       |___  ,---- good_bucket_size
22403 c     |           | |
22404 e     |           |_V_
22405 n     |               |
22406 t     |               |___o (x1,y1) (x1 = good_rssi, y1 = good_rssi_pcnt)
22407    80 |                   |
22408 %     |                   |<------ (good_rssi_pcnt - bad_rssi_pcnt)/bad_buckets
22409       |                   |_____
22410       |                         |  ,-- bad_bucket_size
22411       |                         |  |
22412       |                         |__v__
22413       |                               |
22414       |                               |
22415    40 |                               o------------
22416       |                             (x2,y2) (x2 = bad_rssi, y2 = bad_rssi_pcnt)
22417       +------o------------o-----------o------------->
22418             -50         -70          -80          RSSI dBm
22419 
22420 | excellent  |  good      | bad       | poor
22421 | zone       |  zone      | zone      | zone
22422              V            V           V
22423         BEST_THRES   GOOD_THRES     BAD_THRES
22424  */
22425 typedef struct {
22426     A_INT32  best_rssi_threshold;
22427     A_INT32  good_rssi_threshold;
22428     A_INT32  bad_rssi_threshold;
22429     A_UINT32 good_rssi_pcnt;
22430     A_UINT32 bad_rssi_pcnt;
22431     A_UINT32 good_bucket_size;
22432     A_UINT32 bad_bucket_size;
22433     A_INT32  rssi_pref_5g_rssi_thresh;
22434 } wmi_roam_cnd_rssi_scoring;
22435 
22436 /**
22437     Use macro WMI_ROAM_CND_GET/SET_BW_SCORE_PERCENTAGE to get and set the
22438     value respectively of bw_scoring
22439         BITS 0-7   :- It contains scoring percentage of 20MHz  BW
22440         BITS 8-15  :- It contains scoring percentage of 40MHz  BW
22441         BITS 16-23 :- It contains scoring percentage of 80MHz  BW
22442         BITS 24-31 :- It contains scoring percentage of 160MHz BW
22443 
22444     Use macro WMI_ROAM_CND_GET/SET_BW_SCORE_PERCENTAGE to get and set the
22445     value respectively of ext_bw_scoring:
22446         BITS 0-7   :- It contains scoring percentage of 320MHz BW
22447         BITS 8-15  :- reserved
22448         BITS 16-23 :- reserved
22449         BITS 24-31 :- reserved
22450 
22451     The value of each index must be 0-100
22452  */
22453 typedef struct {
22454     A_UINT32 score_pcnt;
22455 } wmi_roam_cnd_bw_scoring;
22456 
22457 /**
22458     Use macro WMI_ROAM_CND_GET/SET_BAND_SCORE_PERCENTAGE to get and set the value respectively.
22459     BITS 0-7   :- It contains scoring percentage of 2G
22460     BITS 8-15  :- It contains scoring percentage of 5G
22461     BITS 16-23 :- reserved
22462     BITS 24-31 :- reserved
22463 
22464     The value of each index must be 0-100
22465  */
22466 typedef struct {
22467     A_UINT32 score_pcnt;
22468 } wmi_roam_cnd_band_scoring;
22469 
22470 /**
22471     Use macro WMI_ROAM_CND_GET/SET_NSS_SCORE_PERCENTAGE to get and set the value respectively.
22472         BITS 0-7   :- It contains scoring percentage of 1x1
22473         BITS 8-15  :- It contains scoring percentage of 2x2
22474         BITS 16-23 :- It contains scoring percentage of 3x3
22475         BITS 24-31 :- It contains scoring percentage of 4x4
22476 
22477     The value of each index must be 0-100
22478  */
22479 typedef struct {
22480     A_UINT32 score_pcnt;
22481 } wmi_roam_cnd_nss_scoring;
22482 
22483 /**
22484     score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
22485                 BITS 0-7   :- the scoring pcnt when AP is not advertise QBSS/ESP info
22486                 BITS 8-15 :-  SLOT_1
22487                 BITS 16-23 :- SLOT_2
22488                 BITS 24-31 :- SLOT_3
22489                 BITS 32-      ...
22490 
22491     num_slot will equally divide 100. e.g, if num_slot = 4
22492     slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
22493 */
22494 typedef struct {
22495     A_UINT32 num_slot; /* max 15 */
22496     A_UINT32 score_pcnt3_to_0;
22497     A_UINT32 score_pcnt7_to_4;
22498     A_UINT32 score_pcnt11_to_8;
22499     A_UINT32 score_pcnt15_to_12;
22500 } wmi_roam_cnd_esp_qbss_scoring;
22501 
22502 /**
22503     score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
22504                 BITS 0-7   :- the scoring pcnt when AP is not advertise QBSS/ESP info
22505                 BITS 8-15 :-  SLOT_1
22506                 BITS 16-23 :- SLOT_2
22507                 BITS 24-31 :- SLOT_3
22508                 BITS 32-      ...
22509 
22510     num_slot will equally divide 100. e.g, if num_slot = 4
22511     slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
22512 */
22513 typedef struct {
22514     A_UINT32 num_slot; /* max 15  */
22515     A_UINT32 score_pcnt3_to_0;
22516     A_UINT32 score_pcnt7_to_4;
22517     A_UINT32 score_pcnt11_to_8;
22518     A_UINT32 score_pcnt15_to_12;
22519 } wmi_roam_cnd_oce_wan_scoring;
22520 
22521 /**
22522  *  Use macro WMI_ROAM_CND_GET/SET_SECURITY_SCORE_PERCENTAGE
22523  *  to get and set the value respectively.
22524  *  BITS 0-7   :- It contains scoring percentage of WPA security
22525  *  BITS 8-15  :- It contains scoring percentage of WPA2 security
22526  *  BITS 16-23 :- It contains scoring percentage of WPA3 security
22527  *  BITS 24-31 :- reserved
22528  *
22529  *  The value of each score must be 0-100
22530  */
22531 typedef struct {
22532     A_UINT32 score_pcnt;
22533 } wmi_roam_cnd_security_scoring;
22534 
22535 typedef enum {
22536     WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID_NONE = 0, /* Legacy roam score algorithm */
22537     WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID_RSSI_CU_BASED = 1, /* Roam score algorithm based on RSSI and CU */
22538 }  WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID;
22539 
22540 /**
22541     disable_bitmap :- Each bit will be either allow(0)/disallow(1) to considered the roam score param.
22542     rssi_weightage_pcnt :- RSSI weightage out of total score in percentage
22543     ht_weightage_pcnt :- HT weightage out of total score in percentage.
22544     vht_weightage_pcnt :- VHT weightage out of total score in percentage.
22545     he_weightage_pcnt :- 11ax weightage out of total score in percentage.
22546     bw_weightage_pcnt :- Bandwidth weightage out of total score in percentage.
22547     band_weightage_pcnt :- Band(2G/5G) weightage out of total score in percentage.
22548     nss_weightage_pcnt:- NSS(1x1 / 2x2) weightage out of total score in percentage.
22549     esp_qbss_weightage_pcnt: ESP/QBSS weightage out of total score in percentage.
22550     beamforming_weightage_pcnt :- Beamforming weightage out of total score in percentage.
22551     pcl_weightage_pcnt :- PCL weightage out of total score in percentage.
22552     oce_wan_weightage_pcnt :- OCE WAN metrics weightage out of total score in percentage.
22553     rssi_scoring :- RSSI scoring information.
22554     bw_scoring :- channel BW scoring percentage information.
22555     band_scoring : - band scording percentage information.
22556     nss_scoring :- NSS scoring percentage information.
22557     esp_qbss_scoring :- ESP/QBSS scoring percentage information
22558     oce_wan_scoring : OCE WAN metrics percentage information
22559     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
22560     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.
22561 */
22562 typedef struct {
22563     A_UINT32 tlv_header;     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_scoring_param */
22564     A_UINT32 disable_bitmap;
22565     A_INT32 rssi_weightage_pcnt;
22566     A_INT32 ht_weightage_pcnt;
22567     A_INT32 vht_weightage_pcnt;
22568     A_INT32 he_weightage_pcnt;
22569     A_INT32 bw_weightage_pcnt;
22570     A_INT32 band_weightage_pcnt;
22571     A_INT32 nss_weightage_pcnt;
22572     A_INT32 esp_qbss_weightage_pcnt;
22573     A_INT32 beamforming_weightage_pcnt;
22574     A_INT32 pcl_weightage_pcnt;
22575     A_INT32 oce_wan_weightage_pcnt;
22576     wmi_roam_cnd_rssi_scoring rssi_scoring;
22577     wmi_roam_cnd_bw_scoring bw_scoring;
22578     wmi_roam_cnd_band_scoring band_scoring;
22579     wmi_roam_cnd_nss_scoring nss_scoring;
22580     wmi_roam_cnd_esp_qbss_scoring esp_qbss_scoring;
22581     wmi_roam_cnd_oce_wan_scoring oce_wan_scoring;
22582     A_UINT32 roam_score_delta_pcnt;
22583     A_UINT32 roam_score_delta_mask;
22584     /* Vendor specific roam score algorithm ID from WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID enum */
22585     A_UINT32 vendor_roam_score_algorithm_id;
22586     /*
22587      * During CU and low RSSI based roam triggers, consider AP as
22588      * roam candidate only if its roam score is better than connected AP score
22589      * by at least candidate_min_roam_score_delta.
22590      */
22591     A_UINT32 candidate_min_roam_score_delta;
22592     /*
22593      * For OCE Release 2, give weightage to roam candidate tx power if
22594      * oce_ap_tx_pwr_weightage_pcnt != 0.
22595      */
22596     A_UINT32 oce_ap_tx_pwr_weightage_pcnt;
22597     /*
22598      * For OCE Release 2, give weightage to roam candidate based on
22599      * advertised subnet id.
22600      * Only used if oce_ap_subnet_id_weightage_pcnt != 0.
22601      */
22602     A_UINT32 oce_ap_subnet_id_weightage_pcnt;
22603     /*
22604      * Give weightage to SAE-PK (Simultaneous Authentication of Equals -
22605      * Public Key) enabled network APs.
22606      * Only used if sae_pk_ap_weightage_pcnt != 0.
22607      */
22608     A_UINT32 sae_pk_ap_weightage_pcnt;
22609     /*
22610      * Give weightage to bandwidth which is greater than 160Mhz.
22611      */
22612     wmi_roam_cnd_bw_scoring ext_bw_scoring;
22613     /*
22614      * eht_weightage_pcnt :- 11be weightage out of total score in percentage.
22615      */
22616     A_UINT32 eht_weightage_pcnt;
22617     /*
22618      * mlo_weightage_pcnt :- give weightage to candidate based on MLO support.
22619      */
22620     A_UINT32 mlo_weightage_pcnt;
22621     /*
22622      * btc_score_factor :- Scale down 2.4GHz AP total score by btc_score_factor
22623      * during BT coex.
22624      * Value 0 should be ignored
22625      */
22626     A_UINT32 btc_score_factor;
22627     /*
22628      * btc_etp_factor :- Scale down 2.4GHz AP total etp value by btc_etp_factor
22629      * during BT coex.
22630      * Value 0 should be ignored
22631      */
22632     A_UINT32 btc_etp_factor;
22633     /* Scoring for security mode */
22634     A_INT32 security_weightage_pcnt;
22635     wmi_roam_cnd_security_scoring security_scoring;
22636     /* mlo_etp_weightage_pcnt:
22637      * Give etp weightage to candidate based on MLO support.
22638      * In host INI configuration, it will give boost(+) or reduction(-)
22639      * percentage value and host will deliver actual weighted number
22640      * based on 100. For example:
22641      * If percentage value in INI is 20, then host will give 120 (100 * 1.2)
22642      * as mlo_etp_weightage_pcnt.
22643      * If percentage value in INI is -20, then host will give 80 (100 * 0.8)
22644      * as mlo_etp_weightage_pcnt.
22645      */
22646     A_UINT32 mlo_etp_weightage_pcnt;
22647 } wmi_roam_cnd_scoring_param;
22648 
22649 typedef struct {
22650     A_UINT32 tlv_header;   /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_score_delta_param */
22651     /* Roam trigger reason ID from WMI_ROAM_TRIGGER_REASON_ID */
22652     A_UINT32 roam_trigger_reason;
22653     /* Roam score delta in %.
22654      * Consider AP as roam candidate only if AP score is at least
22655      * roam_score_delta % better than connected AP score.
22656      * Ex: roam_score_delta = 20, and connected AP score is 4000,
22657      * then consider candidate AP only if its score is at least
22658      * 4800 (= 4000 * 120%)
22659      */
22660     A_UINT32 roam_score_delta;
22661 } wmi_roam_score_delta_param;
22662 
22663 typedef struct {
22664     A_UINT32 tlv_header;    /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_min_rssi_param */
22665     /* Roam trigger reason ID from WMI_ROAM_TRIGGER_REASON_ID */
22666     A_UINT32 roam_trigger_reason;
22667     /*
22668      * Consider AP as roam candidate only if AP RSSI is better than
22669      * candidate_min_rssi
22670      */
22671     A_UINT32 candidate_min_rssi; /* units = dBm */
22672 } wmi_roam_cnd_min_rssi_param;
22673 
22674 /** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
22675  *  and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
22676  *  To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
22677  *  and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
22678  */
22679 
22680 typedef struct {
22681     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
22682     /** flags as defined above */
22683     A_UINT32 flags;
22684     /**
22685      * RSSI threshold value in dB: the value of the candidate AP should
22686      * higher by this threshold than the RSSI of the currently associated AP.
22687      */
22688     A_UINT32 rssi_threshold;
22689     /**
22690      * ssid value to be matched.
22691      */
22692     wmi_ssid ssid;
22693 
22694     /**
22695      * security params to be matched.
22696      */
22697     /** authentication mode (defined above)  */
22698     A_UINT32 rsn_authmode;
22699     /** unicast cipher set */
22700     A_UINT32 rsn_ucastcipherset;
22701     /** mcast/group cipher set */
22702     A_UINT32 rsn_mcastcipherset;
22703     /** mcast/group management frames cipher set */
22704     A_UINT32 rsn_mcastmgmtcipherset;
22705     /**
22706      * rssi_abs_threshold value: the value of the candidate AP should
22707      * higher than this absolute RSSI threshold.
22708      * Zero means no absolute minimum RSSI is required.
22709      * units are the offset from the noise floor in dB.
22710      */
22711     A_UINT32 rssi_abs_thresh;
22712     /**
22713      * bg_rssi_threshold value in dB: For background scan the value of
22714      * the candidate AP should be higher by this threshold than the RSSI
22715      * of the currently associated AP.
22716      */
22717     A_UINT32 bg_rssi_threshold;
22718 } wmi_ap_profile;
22719 
22720 typedef struct {
22721     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_owe_ap_profile */
22722 
22723     /* OPEN SSID value when STA is connected to OWE transition AP in OWE security */
22724     wmi_ssid open_ssid_for_owe_transition;
22725 } wmi_owe_ap_profile;
22726 
22727 typedef struct {
22728     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_vendor_scoring_param */
22729     A_UINT32 tlv_header;
22730     /** Indicates the channel band for which these vendor scoring params needs to be applied.
22731      *  Refer WLAN_ROAM_SCORE_MAX_BAND_INDEX for possible band_idx values.
22732      */
22733     A_UINT32 band_idx;
22734     /** Below RSSI/CU factor_value & factor_score param values are configured by vendor */
22735     A_UINT32 rssi_factor_value1;
22736     A_UINT32 rssi_factor_value2;
22737     A_UINT32 rssi_factor_value3;
22738     A_UINT32 rssi_factor_value4;
22739     A_UINT32 rssi_factor_value5;
22740     A_UINT32 rssi_factor_score1;
22741     A_UINT32 rssi_factor_score2;
22742     A_UINT32 rssi_factor_score3;
22743     A_UINT32 rssi_factor_score4;
22744     A_UINT32 rssi_factor_score5;
22745     A_UINT32 cu_factor_value1;
22746     A_UINT32 cu_factor_value2;
22747     A_UINT32 cu_factor_score1;
22748     A_UINT32 cu_factor_score2;
22749 } wmi_roam_cnd_vendor_scoring_param;
22750 
22751 /** Support early stop roaming scanning when finding a strong candidate AP
22752  * A 'strong' candidate is
22753  * 1) Is eligible candidate
22754  *    (all conditions are met in existing candidate selection).
22755  * 2) Its RSSI is better than earlystop threshold.
22756  *    Earlystop threshold will be relaxed as each channel is scanned.
22757  */
22758 typedef struct {
22759     A_UINT32 tlv_header;
22760     /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
22761     A_UINT32 roam_earlystop_thres_min;
22762     /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
22763     A_UINT32 roam_earlystop_thres_max;
22764 } wmi_roam_earlystop_rssi_thres_param;
22765 
22766 typedef struct {
22767     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param */
22768     A_UINT32 tlv_header;
22769     /** RSSI threshold offset under trffic and dense env */
22770     A_UINT32 roam_dense_rssi_thres_offset;
22771     /** minimum number of APs to determine dense env */
22772     A_UINT32 roam_dense_min_aps;
22773     /** initial dense status detected by host at the time of initial connection */
22774     A_UINT32 roam_dense_status;
22775     /* traffic threshold to enable aggressive roaming in dense env; units are percent of medium occupancy, 0 - 100 */
22776     A_UINT32 roam_dense_traffic_thres;
22777 } wmi_roam_dense_thres_param;
22778 
22779 /* Definition for flags in wmi_roam_bg_scan_roaming_param
22780  * Bit 0: BG roaming enabled when we connect to 2G AP only and roaming to 5G AP only.
22781  * Bit 1-31: Reserved
22782  */
22783 #define WMI_ROAM_BG_SCAN_FLAGS_2G_TO_5G_ONLY   1
22784 
22785 typedef struct {
22786     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bg_scan_roaming_param */
22787     A_UINT32 tlv_header;
22788     /** RSSI threshold in dBm below which roaming will be triggered during background scan(non-roam scan). 0 will disable this threshold */
22789     A_UINT32 roam_bg_scan_bad_rssi_thresh;
22790     /** 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 */
22791     A_UINT32 roam_bg_scan_client_bitmap;
22792     /** roam scan RSSI threshold for 2 GHz band.
22793      *  offset from roam_bg_scan_bad_rssi_thresh, in dB units
22794      */
22795     A_INT32 bad_rssi_thresh_offset_2g;
22796     /* flags for background roaming */
22797     A_UINT32 flags;
22798 } wmi_roam_bg_scan_roaming_param;
22799 
22800 /*
22801  * If there's rx activity during rx_inactivity_ms and avg of data_rssi
22802  * is better than roam_data_rssi_thres, then suppress low rssi roaming.
22803  */
22804 #define WMI_ROAM_DATA_RSSI_FLAG_LOW_RSSI   0x00000001
22805 /*
22806  * If there's no rx activity during rx_inactivity_ms or avg of data_rssi
22807  * is better than roam_data_rssi_thres, then suppress this background roaming.
22808  */
22809 #define WMI_ROAM_DATA_RSSI_FLAG_BACKGROUND 0x00000002
22810 
22811 typedef struct {
22812     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_data_rssi_roaming_param */
22813     A_UINT32 tlv_header;
22814     /* flags for when consider data_rssi,
22815      * valid values are OR operation of WMI_ROAM_DATA_RSSI_FLAG_ .
22816      * value 0 to disable the feature.
22817      */
22818     A_UINT32 flags;
22819     /**
22820      * RSSI threshold in dBm above which roaming scan will be suppressed
22821      * during some roaming trigger.
22822      */
22823     A_INT32 roam_data_rssi_thres;
22824     /** rx inactivity time, in unit of milliseconds. */
22825     A_UINT32 rx_inactivity_ms;
22826 } wmi_roam_data_rssi_roaming_param;
22827 
22828 /** Beacon filter wmi command info */
22829 
22830 #define BCN_FLT_MAX_SUPPORTED_IES    256
22831 #define BCN_FLT_MAX_ELEMS_IE_LIST    (BCN_FLT_MAX_SUPPORTED_IES/32)
22832 
22833 typedef struct bss_bcn_stats {
22834     A_UINT32 vdev_id;
22835     A_UINT32 bss_bcnsdropped;
22836     A_UINT32 bss_bcnsdelivered;
22837 } wmi_bss_bcn_stats_t;
22838 
22839 typedef struct bcn_filter_stats {
22840     A_UINT32 bcns_dropped;
22841     A_UINT32 bcns_delivered;
22842     A_UINT32 activefilters;
22843     wmi_bss_bcn_stats_t bss_stats;
22844 } wmi_bcnfilter_stats_t;
22845 
22846 typedef struct wmi_add_bcn_filter_cmd {
22847     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
22848     A_UINT32 vdev_id;
22849 /*
22850  * Following this structure is the TLV:
22851  *    A_UINT32   ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
22852  */
22853 } wmi_add_bcn_filter_cmd_fixed_param;
22854 
22855 typedef struct wmi_rmv_bcn_filter_cmd {
22856     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
22857     A_UINT32 vdev_id;
22858 } wmi_rmv_bcn_filter_cmd_fixed_param;
22859 
22860 #define WMI_BCN_SEND_DTIM_ZERO         1
22861 #define WMI_BCN_SEND_DTIM_BITCTL_SET   2
22862 typedef struct wmi_bcn_send_from_host {
22863     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param  */
22864     A_UINT32 vdev_id;
22865     A_UINT32 data_len;
22866     union {
22867         A_UINT32 frag_ptr; /* Physical address of the frame */
22868         A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
22869     };
22870     A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
22871     A_UINT32 dtim_flag; /* to control CABQ traffic */
22872     A_UINT32 bcn_antenna;   /* Antenna for beacon transmission */
22873     A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
22874 } wmi_bcn_send_from_host_cmd_fixed_param;
22875 
22876 /* cmd to support bcn snd for all vaps at once */
22877 typedef struct wmi_pdev_send_bcn {
22878     A_UINT32 num_vdevs;
22879     WMI_VAR_LEN_ARRAY1(wmi_bcn_send_from_host_cmd_fixed_param, bcn_cmd);
22880 } wmi_pdev_send_bcn_cmd_t;
22881 
22882 typedef struct wmi_fd_send_from_host {
22883     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fd_send_from_host_cmd_fixed_param  */
22884     A_UINT32 vdev_id;
22885     A_UINT32 data_len;
22886     union {
22887         A_UINT32 frag_ptr; /* Physical address of the frame */
22888         A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
22889     };
22890     A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
22891     A_UINT32 frame_ctrl; /* frame ctrl to setup PPDU desc */
22892 } wmi_fd_send_from_host_cmd_fixed_param;
22893 
22894 /*
22895  * Control to send broadcast probe response instead of FD frames.
22896  * When this flag is not set then FD frame will be transmitted when
22897  * fd_period is non-zero
22898  */
22899 #define WMI_FILS_FLAGS_BITMAP_BCAST_PROBE_RSP   0x1
22900 
22901 /*
22902  * WMI command structure for FILS feature enable/disable
22903  */
22904 typedef struct {
22905     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enable_fils_cmd_fixed_param  */
22906     /* VDEV identifier */
22907     A_UINT32 vdev_id;
22908     A_UINT32 fd_period; /* non-zero - enable Fils Discovery frames or broadcast probe response with this period (in TU),
22909                          * 0 - disable FD and broadcast probe response frames */
22910     A_UINT32 flags; /* WMI_FILS_FLAGS_BITMAP flags */
22911 } wmi_enable_fils_cmd_fixed_param;
22912 
22913 /*
22914  * WMI_ROAM_AP_PROFILE:  AP profile of connected AP for roaming.
22915  */
22916 typedef struct {
22917     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
22918     /** id of AP criteria */
22919     A_UINT32 id;
22920 
22921     /** unique id identifying the VDEV, generated by the caller */
22922     A_UINT32 vdev_id;
22923 
22924 /*
22925  * Following this structure are the TLVs:
22926  *     wmi_ap_profile ap_profile; <-- AP profile info
22927  *     wmi_roam_cnd_scoring_param roam_cnd_scoring_param
22928  *     wmi_roam_score_delta_param roam_score_delta_param_list[]
22929  *     wmi_roam_cnd_min_rssi_param roam_cnd_min_rssi_param_list[]
22930  *     wmi_roam_cnd_vendor_scoring_param roam_cnd_vendor_scoring_param[]
22931  *     wmi_owe_ap_profile owe_ap_profile[]
22932  *     A_UINT32 authmode_list[] <-- List of authmode allowed for roaming.
22933  *         Refer WMI_AUTH_ for authmode values.
22934  */
22935 } wmi_roam_ap_profile_fixed_param;
22936 
22937 /**
22938  * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
22939  */
22940 typedef struct {
22941     /** id of AP criteria */
22942     A_UINT32 id;
22943 
22944     /** unique id identifying the VDEV, generated by the caller */
22945     A_UINT32 vdev_id;
22946 
22947     /** AP profile info */
22948     wmi_ap_profile ap_profile;
22949 
22950 } wmi_ofl_scan_add_ap_profile;
22951 
22952 /**
22953  * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
22954  */
22955 typedef struct {
22956     /** id of AP criteria */
22957     A_UINT32 id;
22958     /** unique id identifying the VDEV, generated by the caller */
22959     A_UINT32 vdev_id;
22960 } wmi_ofl_scan_remove_ap_profile;
22961 
22962 /**
22963  * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
22964  *  0 will disable ofload scan and a very low value will perform a continuous
22965  *  scan.
22966  */
22967 typedef struct {
22968     /** offload scan period value, used for scans used when not connected */
22969     A_UINT32 ofl_scan_period;
22970 } wmi_ofl_scan_period;
22971 
22972 /* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
22973 #define ROAM_OFFLOAD_PMK_BYTES       (32)
22974 #define ROAM_OFFLOAD_PSK_MSK_BYTES   (32)
22975 #define ROAM_OFFLOAD_KRK_BYTES       (16)
22976 #define ROAM_OFFLOAD_BTK_BYTES       (32)
22977 #define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
22978 #define ROAM_OFFLOAD_NUM_MCS_SET     (16)
22979 
22980 /* This TLV will be filled only in case roam offload for wpa2-psk/okc/ese/11r is enabled */
22981 typedef struct {
22982     A_UINT32 tlv_header;     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
22983     A_UINT32 rssi_cat_gap;   /* gap for every category bucket */
22984     A_UINT32 prefer_5g;      /* prefer select 5G candidate */
22985     A_UINT32 select_5g_margin;
22986     A_UINT32 reassoc_failure_timeout;     /* reassoc failure timeout */
22987     A_UINT32 capability;
22988     A_UINT32 ht_caps_info;
22989     A_UINT32 ampdu_param;
22990     A_UINT32 ht_ext_cap;
22991     A_UINT32 ht_txbf;
22992     A_UINT32 asel_cap;
22993     A_UINT32 qos_enabled;
22994     A_UINT32 qos_caps;
22995     A_UINT32 wmm_caps;
22996     A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET>>2]; /* since this 4 byte aligned, we don't declare it as tlv array */
22997     A_UINT32 handoff_delay_for_rx; /* In msec. Delay Hand-Off by this duration to receive pending Rx frames from current BSS */
22998     A_UINT32 max_mlme_sw_retries; /* maximum number of software retries for preauth and reassoc req */
22999     A_UINT32 no_ack_timeout; /* In msec. duration to wait before another SW retry made if no ack seen for previous frame */
23000     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. */
23001     A_UINT32 roam_to_current_bss_disable; /* Disable roaming to current bss */
23002 } wmi_roam_offload_tlv_param;
23003 
23004 
23005 /* flags for 11i offload */
23006 #define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED       0   /* okc is enabled */
23007 #define WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED 1  /* pmk caching is disabled */
23008 #define WMI_ROAM_OFFLOAD_FLAG_SAE_SAME_PMKID 2      /* Use same PMKID for WPA3 SAE roaming */
23009 /* from bit 3 to bit 31 are reserved */
23010 
23011 #define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
23012         (flag) |=  (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED);      \
23013      } while (0)
23014 
23015 #define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
23016         (flag) &=  ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED);      \
23017      } while (0)
23018 
23019 #define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag)   \
23020         ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
23021 
23022 
23023 #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_ENABLED(flag) \
23024     do { \
23025         (flag) &=  ~(1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
23026     } while (0)
23027 
23028 #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
23029     do { \
23030         (flag) |=  (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
23031     } while (0)
23032 
23033 #define WMI_GET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
23034     ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED))
23035 
23036 
23037 /* This TLV will be filled only in case of wpa-psk/wpa2-psk/wpa3 */
23038 typedef struct {
23039     A_UINT32 tlv_header;     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
23040     A_UINT32 flags;          /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
23041     A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES>>2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
23042     A_UINT32 pmk_len; /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
23043     A_UINT32 pmk_ext_len; /** the length of extended pmk. in normal case it should be 0, but for suiteB, it should be 16*/
23044     A_UINT32 pmk_ext[ROAM_OFFLOAD_PMK_BYTES>>2]; /* pmk ext offload. 16 bytes for suiteB */
23045 } wmi_roam_11i_offload_tlv_param;
23046 
23047 /* This TLV will be  filled only in case of 11R*/
23048 typedef struct {
23049     A_UINT32 tlv_header;     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
23050     A_UINT32 mdie_present;
23051     A_UINT32 mdid;
23052     A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN>>2];
23053     A_UINT32 r0kh_id_len;
23054     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 */
23055     A_UINT32 psk_msk_len; /**length of psk_msk*/
23056     A_UINT32 psk_msk_ext_len; /**length of psk_msk_ext*/
23057     A_UINT32 psk_msk_ext[ROAM_OFFLOAD_PSK_MSK_BYTES>>2];
23058     A_UINT32 adaptive_11r; /* FW needs to perform adaptive 11r roaming */
23059     /*
23060      * FW needs to perform FT initial moiblity association instead of
23061      * FT roaming for deauth roam trigger
23062      *     0 - To disable FT-IM
23063      *     1 - To enable FT-IM
23064      */
23065     A_UINT32 ft_im_for_deauth;
23066     /*
23067      * FW can prefer doing over-the-ds fast BSS transition instead of
23068      * over-the-air if associated and target AP are both capable of FT over DS.
23069      *     0 - To disable FT-over-DS
23070      *     1 - To enable FT-over-DS
23071      */
23072     A_UINT32 ft_over_ds_enable;
23073 } wmi_roam_11r_offload_tlv_param;
23074 
23075 /* This TLV will be filled only in case of ESE */
23076 typedef struct {
23077     A_UINT32 tlv_header;     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
23078     A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES>>2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
23079     A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES>>2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
23080 } wmi_roam_ese_offload_tlv_param;
23081 
23082 typedef struct {
23083     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_sae_offload_tlv_param */
23084     /* SAE SPMK timeout value in seconds after which FW need to perform SAE full authentication to derive new SPMK */
23085     A_UINT32 spmk_timeout;
23086 } wmi_roam_sae_offload_tlv_param;
23087 
23088 typedef enum {
23089     WMI_BL_REASON_NUD_FAILURE = 1,
23090     WMI_BL_REASON_STA_KICKOUT,
23091     WMI_BL_REASON_ROAM_HO_FAILURE,
23092     /* Assoc resp with status code 71 - POOR RSSI CONDITIONS */
23093     WMI_BL_REASON_ASSOC_REJECT_POOR_RSSI,
23094     /* Assoc resp with status code 34 - DENIED_POOR_CHANNEL_CONDITIONS */
23095     WMI_BL_REASON_ASSOC_REJECT_OCE,
23096     WMI_BL_REASON_USERSPACE_BL,
23097     WMI_BL_REASON_USERSPACE_AVOID_LIST,
23098     WMI_BL_REASON_BTM_DIASSOC_IMMINENT,
23099     WMI_BL_REASON_BTM_BSS_TERMINATION,
23100     WMI_BL_REASON_BTM_MBO_RETRY,
23101     /* Reassoc resp with status code 34 - DENIED_POOR_CHANNEL_CONDITIONS */
23102     WMI_BL_REASON_REASSOC_RSSI_REJECT,
23103     /* Reassoc resp with status code 17 - DENIED_NO_MORE_STAS */
23104     WMI_BL_REASON_REASSOC_NO_MORE_STAS,
23105     WMI_BL_REASON_BASIC_RATES_MIS_MATCH, /* Status code 18 */
23106     WMI_BL_REASON_EHT_NOT_SUPPORTED, /* Status code 135 */
23107     WMI_BL_REASON_EXISTING_MLD_ASSOCIATION, /* Status code 130 */
23108     WMI_BL_REASON_LINK_TRANSMITTED_NOT_ACCEPTED, /* Status code 139 */
23109     WMI_BL_REASON_DENIED_OTHER_REASON,
23110     WMI_BL_REASON_BTM_LOAD_BALANCE,
23111 } WMI_BLACKLIST_REASON_ID;
23112 
23113 typedef enum {
23114     WMI_BL_SOURCE_HOST = 1,
23115     WMI_BL_SOURCE_FW,
23116 } WMI_BLACKLIST_SOURCE_ID;
23117 
23118 #define WMI_MAX_FAILED_LINK_COMBO_COUNT 10
23119 
23120 typedef struct {
23121     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_blacklist_with_timeout_tlv_param */
23122     A_UINT32 tlv_header;
23123     /** Blaclisted AP mac address */
23124     wmi_mac_addr bssid;
23125     /** How much time in milliseconds to keep AP in blacklist */
23126     A_UINT32 timeout;
23127     /** RSSI (dBm units) when put in blacklist */
23128     A_INT32 rssi;
23129     /* Blacklist reason from WMI_BLACKLIST_REASON_ID */
23130     A_UINT32 reason;
23131     /* Source of adding AP to BL from WMI_BLACKLIST_SOURCE_ID */
23132     A_UINT32 source;
23133     /*
23134      * timestamp is the absolute time w.r.t host timer which is synchronized
23135      * between the host and target.
23136      * This timestamp indicates the time when AP added to blacklist.
23137      */
23138     A_UINT32 timestamp;
23139     /* Original timeout value in milli seconds when AP added to BL */
23140     A_UINT32 original_timeout;
23141     /*
23142      * The disallow link ID bitmap indicates links which should not be allowed
23143      * for any assoc or partner link combination.
23144      * If all links for MLD AP are disallowed, then the value shall be
23145      * 0xffffffff.
23146      */
23147     A_UINT32 disallow_linkid_bitmap;
23148     /* MLD address of AP */
23149     wmi_mac_addr mld;
23150     /* List of link combinations for which association is failed */
23151     A_UINT32 ml_failed_links_combo_bitmap[WMI_MAX_FAILED_LINK_COMBO_COUNT];
23152     /* Failed link combo count filled in ml_failed_links_combo_bitmap[] */
23153     A_UINT32 ml_failed_link_combo_count;
23154 } wmi_roam_blacklist_with_timeout_tlv_param;
23155 
23156 /** WMI_ROAM_BLACKLIST_EVENT: generated whenever STA needs to move AP to blacklist for a particluar time
23157  *  Ex: AP which sends BTM request with disassoc imminent is set should be
23158  *  moved to blacklist until disassociation timer expires
23159  */
23160 typedef struct {
23161     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_blacklist_event_fixed_param */
23162     A_UINT32 vdev_id;
23163     /* This TLV is followed by further TLVs:
23164      *     wmi_roam_blacklist_with_timeout_tlv_param blacklist_with_timeout[]
23165      */
23166 } wmi_roam_blacklist_event_fixed_param;
23167 
23168 typedef struct {
23169     A_UINT32 tlv_header;
23170     /** candidate AP mac address */
23171     wmi_mac_addr bssid;
23172 } wmi_roam_pmkid_request_tlv_param;
23173 
23174 /** WMI_ROAM_PMKID_REQUEST_EVENT: generated whenever FW needs the PMKID while roaming **/
23175 typedef struct {
23176     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_pmkid_request_event_fixed_param */
23177     A_UINT32 vdev_id;
23178     /* This TLV is followed by further TLVs:
23179      *     wmi_roam_pmkid_request_tlv_param pmkid_request[]
23180      */
23181 } wmi_roam_pmkid_request_event_fixed_param;
23182 
23183 /** WMI_ROAM_EVENT: roam event triggering the host roam logic.
23184  * generated when ever a better AP is found in the recent roam scan (or)
23185  * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
23186  * from the current AP.
23187  */
23188 typedef struct {
23189     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param  */
23190     /** unique id identifying the VDEV, generated by the caller */
23191     A_UINT32 vdev_id;
23192     /** reason for roam event */
23193     A_UINT32 reason;
23194     /** associated AP's RSSI calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI */
23195     A_UINT32 rssi;
23196     /** roam notification */
23197     A_UINT32 notif;
23198     /** roam notification param
23199      *  Refer to WMI_ROAM_NOTIF_ defs to interpret the notif_params value.
23200      *  notif_params contains roam invoke fail reason from
23201      *  wmi_roam_invoke_error_t if reason is WMI_ROAM_REASON_INVOKE_ROAM_FAIL.
23202      */
23203     A_UINT32 notif_params;
23204     /** roam notification param1
23205      *  Refer to WMI_ROAM_NOTIF_ defs to interpret the notif_params1 value.
23206      *  notif_params1 is exact frame length of deauth or disassoc if reason
23207      *  is WMI_ROAM_REASON_DEAUTH.
23208      */
23209     A_UINT32 notif_params1;
23210 } wmi_roam_event_fixed_param;
23211 
23212 #define WMI_ROAM_BSS_INFO_FLAG_IS_MLD 0
23213 
23214 typedef struct {
23215     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bss_info_param */
23216     /*
23217      * bit0: WMI_ROAM_BSS_INFO_FLAG_IS_MLD
23218      */
23219     A_UINT32 flags;
23220     /*
23221      * mld score if WMI_ROAM_BSS_INFO_FLAG_IS_MLD set, otherwise link score
23222      */
23223     A_UINT32 score;
23224     /*
23225      *  mld address if WMI_ROAM_BSS_INFO_FLAG_IS_MLD set, otherwise link address
23226      */
23227     wmi_mac_addr mac_addr;
23228 } wmi_roam_bss_info_param;
23229 
23230 /* roam_reason: bits 0-3 */
23231 #define WMI_ROAM_REASON_INVALID   0x0 /** invalid reason. Do not interpret reason field */
23232 #define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
23233 #define WMI_ROAM_REASON_BMISS     0x2 /** beacon miss detected */
23234 #define WMI_ROAM_REASON_LOW_RSSI  0x3 /** connected AP's low RSSI condition detected */
23235 #define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
23236                                           SSID and Security profile in
23237                                           WMI_ROAM_AP_PROFILE, found during scan
23238                                           triggered upon FINAL_BMISS **/
23239 #define WMI_ROAM_REASON_HO_FAILED  0x5  /** LFR3.0 roaming failed, indicate the disconnection to host */
23240 /** WMI_ROAM_REASON_INVOKE_ROAM_FAIL:
23241  * Result code of WMI_ROAM_INVOKE_CMDID.
23242  * Any roaming failure before reassociation will be indicated to host
23243  * with this reason.
23244  * Any roaming failure after reassociation will be indicated to host with
23245  * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not.
23246  */
23247 #define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6
23248 #define WMI_ROAM_REASON_RSO_STATUS       0x7
23249 #define WMI_ROAM_REASON_BTM              0x8 /** Roaming because of BTM request received */
23250 #define WMI_ROAM_REASON_DEAUTH           0x9 /** deauth/disassoc received */
23251 /* reserved up through 0xF */
23252 
23253 /* subnet status: bits 4-5 */
23254 typedef enum
23255 {
23256     WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
23257     WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
23258     WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
23259 } wmi_roam_subnet_change_status;
23260 
23261 #define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK      0x30
23262 #define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT     4
23263 
23264 #define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
23265     do { \
23266         (roam_reason) |= \
23267             (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
23268              WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
23269     } while (0)
23270 
23271 #define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
23272     (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
23273      WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
23274 
23275 #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK     0x40
23276 #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT    6
23277 
23278 #define WMI_SET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason, status) \
23279     do { \
23280         (roam_reason) |= \
23281             (((status) << WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT) & \
23282              WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK); \
23283     } while (0)
23284 
23285 #define WMI_GET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason) \
23286     (((roam_reason) & WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK) >> \
23287      WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT)
23288 
23289 /* Bits  0-3: stores 4 LSbs of trigger reason.
23290  *            Old host will get trigger reasons <= 15 from this bitfield.
23291  * Bit 7 will be 1 always to indicate that bits 8-15 are valid.
23292  * Bits 8-15: full trigger_reason, including values > 15.
23293  *            New host will gett full trigger_reason from this bitfield.
23294  *            Bits 8-11 and bits 0-3 store matching values.
23295  */
23296 #define WMI_SET_ROAM_EXT_TRIGGER_REASON(roam_reason, trigger_reason) \
23297     do { \
23298         (roam_reason) |= (trigger_reason & 0xf); \
23299         (roam_reason) |= 0x80; \
23300         (roam_reason) |= ((trigger_reason & 0xff) << 8); \
23301     } while (0)
23302 
23303 /* roaming notification */
23304 #define WMI_ROAM_NOTIF_INVALID           0x0 /** invalid notification. Do not interpret notif field  */
23305 #define WMI_ROAM_NOTIF_ROAM_START        0x1 /** indicate that roaming is started. sent only in non WOW state */
23306 #define WMI_ROAM_NOTIF_ROAM_ABORT        0x2 /** indicate that roaming is aborted. sent only in non WOW state */
23307 #define WMI_ROAM_NOTIF_ROAM_REASSOC      0x3 /** indicate that reassociation is done. sent only in non WOW state */
23308 #define WMI_ROAM_NOTIF_SCAN_MODE_SUCCESS 0x4 /** indicate that roaming scan mode is successful */
23309 #define WMI_ROAM_NOTIF_SCAN_MODE_FAIL    0x5 /** indicate that roaming scan mode is failed due to internal roaming state */
23310 #define WMI_ROAM_NOTIF_DISCONNECT        0x6 /** indicate that roaming not allowed due BTM req */
23311 #define WMI_ROAM_NOTIF_SUBNET_CHANGED    0x7 /** indicate that subnet has changed */
23312 #define WMI_ROAM_NOTIF_SCAN_START        0x8 /** indicate roam scan start, notif_params to be sent as WMI_ROAM_TRIGGER_REASON_ID */
23313 #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 */
23314 #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 */
23315 #define WMI_ROAM_NOTIF_SCAN_MODE_SUCCESS_WITH_HO_FAIL 0xb /** indicate that roaming scan mode is successful but cause disconnection and subsequent
23316                                                            ** WMI_ROAM_REASON_HO_FAILED is event expected */
23317 #define WMI_ROAM_NOTIF_SCAN_END          0xc /** indicate roam scan end, notif_params to be sent as WMI_ROAM_TRIGGER_REASON_ID */
23318 
23319 /**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
23320 * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on this information
23321 */
23322 typedef struct
23323 {
23324     A_UINT32 tlv_header;      /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
23325     A_UINT32 vdev_id;         /**unique id identifying the VDEV, generated by the caller*/
23326     A_UINT32 num_ric_request; /**number of ric request ie send to firmware.(max value is 2 now)*/
23327     A_UINT32 is_add_ric;      /**support add ric or delete ric*/
23328 } wmi_ric_request_fixed_param;
23329 
23330 /** tspec element: refer to 8.4.2.32 of 802.11 2012 spec
23331 * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
23332 */
23333 typedef struct {
23334     A_UINT32                         tlv_header;
23335     A_UINT32                         ts_info; /** bits value of TS Info field.*/
23336     A_UINT32                         nominal_msdu_size; /**Nominal MSDU Size field*/
23337     A_UINT32                         maximum_msdu_size; /**The Maximum MSDU Size field*/
23338     A_UINT32                         min_service_interval; /**The Minimum Service Interval field*/
23339     A_UINT32                         max_service_interval; /**The Maximum Service Interval field*/
23340     A_UINT32                         inactivity_interval; /**The Inactivity Interval field*/
23341     A_UINT32                         suspension_interval; /**The Suspension Interval field*/
23342     A_UINT32                         svc_start_time; /**The Service Start Time field*/
23343     A_UINT32                         min_data_rate; /**The Minimum Data Rate field*/
23344     A_UINT32                         mean_data_rate; /**The Mean Data Rate field*/
23345     A_UINT32                         peak_data_rate; /**The Peak Data Rate field*/
23346     A_UINT32                         max_burst_size; /**The Burst Size field*/
23347     A_UINT32                         delay_bound; /**The Delay Bound field*/
23348     A_UINT32                         min_phy_rate; /**The Minimum PHY Rate field*/
23349     A_UINT32                         surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
23350     A_UINT32                         medium_time; /**The Medium Time field,in units of 32 us/s.*/
23351 } wmi_ric_tspec;
23352 
23353 /* flags for roam_invoke_cmd */
23354 /* add this channel into roam cache channel list after this command is finished */
23355 #define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE           0
23356 /* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */
23357 #define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE            1
23358 /* during host-invoked roaming, don't send null data frame to AP */
23359 #define WMI_ROAM_INVOKE_FLAG_NO_NULL_FRAME_TO_AP       2
23360 /* start extra full scan if no candidate found in previous scan */
23361 #define WMI_ROAM_INVOKE_FLAG_FULL_SCAN_IF_NO_CANDIDATE 3
23362 /* when bit is set:
23363  *     Candidate selection algo will based on fw score algo.
23364  *     Which means configurations like wmi_roam_score_delta_param,
23365  *     wmi_configure_roam_trigger_parameters is also configurable for
23366  *     host_invoke roam, as well as consider current BSS score as
23367  *     score algo input.
23368  * when bit is not set:
23369  *     Candidate selection algo will ignore score and above configurations
23370  *     and ignore current BSS score.
23371  */
23372 #define WMI_ROAM_INVOKE_FLAG_SELECT_CANDIDATE_CONSIDER_SCORE 4
23373 /* from bit 5 to bit 31 are reserved */
23374 
23375 #define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
23376         (flag) |=  (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE);      \
23377      } while (0)
23378 
23379 #define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
23380         (flag) &=  ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE);      \
23381      } while (0)
23382 
23383 #define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag)   \
23384         ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
23385 
23386 
23387 #define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH      0   /* scan given channel only */
23388 #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST    1   /* scan cached channel list */
23389 #define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH       2   /* scan full channel */
23390 #define WMI_ROAM_INVOKE_SCAN_MODE_SKIP          3   /* no scan is performed. use beacon/probe resp given by the host */
23391 #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_MAP     4   /* scan cached channel map */
23392 
23393 #define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID      0   /* roam to given BSSID only */
23394 #define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID        1   /* roam to any BSSID */
23395 
23396 enum wlan_roam_invoke_reason {
23397     ROAM_INVOKE_REASON_UNDEFINED = 0,
23398     /* FW will use default parameters to do roam scan, ignore other parameters like WLM, etc. */
23399     ROAM_INVOKE_REASON_NUD_FAILURE, /* Neighbor Unreachable Detection */
23400     ROAM_INVOKE_REASON_USER_SPACE,
23401 };
23402 
23403 /** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
23404 *
23405 if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
23406 if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
23407 
23408 This command can be used to add specific channel into roam cached channel list by following
23409 <roam_scan_ch_mode> = 0
23410 <roam_ap_sel_mode> = 0
23411 <roam_delay> = 0
23412 <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
23413 <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
23414 <channel_no> = channel list to be added
23415 */
23416 typedef struct {
23417     A_UINT32 tlv_header;     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
23418     A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
23419     A_UINT32 flags;   /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
23420     A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
23421     A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
23422     A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
23423     A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
23424     A_UINT32 num_bssid;  /** number of bssids. In the TLV bssid_list[] */
23425     A_UINT32 num_buf; /** number of buffers In the TLV bcn_prb_buf_list[] */
23426     A_UINT32 reason; /** reason of invoke roam, see enum wlan_roam_invoke_reason */
23427     /**
23428      * TLV (tag length value) parameters follows roam_invoke_req
23429      * The TLV's are:
23430      *     A_UINT32 channel_list[]; // in MHz
23431      *     wmi_mac_addr bssid_list[];
23432      *     wmi_tlv_buf_len_param bcn_prb_buf_list[];
23433      *     A_UINT8 bcn_prb_frm[];
23434      */
23435 } wmi_roam_invoke_cmd_fixed_param;
23436 
23437 /* Definition for op_bitmap */
23438 enum {
23439     ROAM_FILTER_OP_BITMAP_BLACK_LIST =   0x1,
23440     ROAM_FILTER_OP_BITMAP_WHITE_LIST =   0x2,
23441     ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
23442     ROAM_FILTER_OP_BITMAP_LCA_DISALLOW = 0x8,
23443     ROAM_FILTER_OP_BITMAP_RSSI_REJECTION_OCE = 0x10,
23444 };
23445 
23446 /** lca_enable_source_bitmap */
23447 #define WMI_ROAM_LCA_DISALLOW_SOURCE_PER        0x1
23448 #define WMI_ROAM_LCA_DISALLOW_SOURCE_BMISS      0x2
23449 #define WMI_ROAM_LCA_DISALLOW_SOURCE_LOW_RSSI   0x4
23450 #define WMI_ROAM_LCA_DISALLOW_SOURCE_HIGH_RSSI  0x8
23451 #define WMI_ROAM_LCA_DISALLOW_SOURCE_PERIODIC   0x10
23452 #define WMI_ROAM_LCA_DISALLOW_SOURCE_MAWC       0x20 /* MAWC = Motion Aided Wifi connectivity */
23453 #define WMI_ROAM_LCA_DISALLOW_SOURCE_DENSE      0x40
23454 #define WMI_ROAM_LCA_DISALLOW_SOURCE_BACKGROUND 0x80
23455 #define WMI_ROAM_LCA_DISALLOW_SOURCE_FORCED     0x100
23456 
23457 typedef struct {
23458     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_rejection_list_config_param */
23459     A_UINT32 tlv_header;
23460      /** BSSID of AP, who reject (re-)assoc due to low RSSI */
23461     wmi_mac_addr bssid;
23462     /** Disallowed AP for certain duration, in units of milliseconds */
23463     A_UINT32 remaining_disallow_duration;
23464    /** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */
23465     A_INT32 requested_rssi;
23466 } wmi_roam_rejection_list_config_param;
23467 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 */
23468 
23469 typedef struct {
23470     A_UINT32 tlv_header;     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
23471     A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming filter is adopted */
23472     A_UINT32 flags; /** flags for filter */
23473     A_UINT32 op_bitmap; /** 32 bit bitmap to be set on. bit0 = first param, bit 1 = second param...etc. Can be or'ed */
23474     A_UINT32 num_bssid_black_list; /* number of blacklist in the TLV variable bssid_black_list */
23475     A_UINT32 num_ssid_white_list; /* number of whitelist in the TLV variable ssid_white_list */
23476     A_UINT32 num_bssid_preferred_list; /* only for lfr 3.0. number of preferred list & factor in the TLV */
23477     A_UINT32 num_rssi_rejection_ap; /** number of list of AP who rejected STA due to low RSSI */
23478     A_UINT32 delta_rssi; /** (dB units) when AB in RSSI blacklist improved by at least delta_rssi, it will be removed from blacklist */
23479     /**
23480      * TLV (tag length value) parameters follows roam_filter_list_cmd
23481      * The TLV's are:
23482      *     wmi_mac_addr bssid_black_list[];
23483      *     wmi_ssid ssid_white_list[];
23484      *     wmi_mac_addr bssid_preferred_list[];
23485      *     A_UINT32 bssid_preferred_factor[];
23486      *     wmi_roam_lca_disallow_config_tlv_param lca_disallow_param[0/1] (opt)
23487      *     wmi_roam_rejection_list_config_param rssi_rejection_list[]
23488      */
23489 } wmi_roam_filter_fixed_param;
23490 
23491 typedef struct {
23492     A_UINT32 tlv_header;        /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_lca_disallow_config_tlv_param */
23493     A_UINT32 disallow_duration; /** How long LCA AP will be disallowed before it can be a roaming candidate again, in units of seconds */
23494     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 */
23495     A_UINT32 num_disallowed_aps; /** How many APs the target should maintain in its LCA (Last Connected AP) list */
23496     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) */
23497 } wmi_roam_lca_disallow_config_tlv_param;
23498 
23499 typedef struct {
23500     A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
23501 } WMI_IPV4_ADDR;
23502 
23503 typedef struct _WMI_IPV6_ADDR {
23504     A_UINT8 address[16]; /* IPV6 in Network Byte Order */
23505 } WMI_IPV6_ADDR;
23506 
23507 /* flags for subnet change detection */
23508 #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
23509 #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
23510 /* bit 2 to bit 31 are reserved */
23511 
23512 /* set IPv4 enabled/disabled flag and get the flag */
23513 #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
23514     (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
23515 } while (0)
23516 
23517 #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
23518     (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
23519 } while (0)
23520 
23521 #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
23522     ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
23523 
23524 /* set IPv6 enabled flag, disabled and get the flag */
23525 #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
23526     (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
23527 } while (0)
23528 
23529 #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
23530     (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
23531 } while (0)
23532 
23533 #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
23534     ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
23535 
23536 /**
23537  * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
23538  *  to FW. FW uses these parameters for subnet change detection.
23539  */
23540 typedef struct {
23541     A_UINT32      tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param */
23542     /** unique id identifying the VDEV, generated by the caller */
23543     A_UINT32      vdev_id;
23544     /** IPv4/IPv6 enabled/disabled */
23545     /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/DISABLED */
23546     A_UINT32      flag;
23547     /** Gateway MAC address */
23548     wmi_mac_addr  inet_gw_mac_addr;
23549     /** IP addresses */
23550     WMI_IPV4_ADDR inet_gw_ip_v4_addr;
23551     WMI_IPV6_ADDR inet_gw_ip_v6_addr;
23552     /** Number of software retries for ARP/Neighbor solicitation request */
23553     A_UINT32      max_retries;
23554     /** timeout in milliseconds for each ARP request*/
23555     A_UINT32      timeout;
23556     /** number of skipped aps **/
23557     A_UINT32      num_skip_subnet_change_detection_bssid_list;
23558 /**
23559  * TLV (tag length value) parameters follows roam_subnet_change_config_cmd
23560  * structure. The TLV's are:
23561  *     wmi_mac_addr skip_subnet_change_detection_bssid_list [];
23562  **/
23563 } wmi_roam_subnet_change_config_fixed_param;
23564 
23565 typedef enum {
23566     /** No change in scan mode, use legacy modes */
23567     ROAM_TRIGGER_SCAN_MODE_NONE = 0,
23568     /** Trigger only partial roam scan */
23569     ROAM_TRIGGER_SCAN_MODE_PARTIAL,
23570     /** Trigger only FULL roam scan */
23571     ROAM_TRIGGER_SCAN_MODE_FULL,
23572     /** Don't trigger any roam scan and disconnect from AP */
23573     ROAM_TRIGGER_SCAN_MODE_NO_SCAN_DISCONNECTION,
23574 } WMI_ROAM_TRIGGER_SCAN_MODE;
23575 
23576 typedef struct {
23577     A_UINT32 tlv_header;     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_configure_roam_trigger_parameters */
23578     A_UINT32 trigger_reason; /** Roam trigger reason from WMI_ROAM_TRIGGER_REASON_ID */
23579     A_UINT32 enable;         /** 0 - Disable, non-zero - enable */
23580     A_UINT32 scan_mode;      /** Scan mode from WMI_ROAM_TRIGGER_SCAN_MODE */
23581     /** consider roam trigger if connected AP RSSI is worse than trigger_rssi_threshold */
23582     A_INT32 trigger_rssi_threshold;      /* Units in dBm */
23583     /*
23584      * Consider 2.4GHz AP as roam candidate only if AP RSSI is better than
23585      * cand_ap_min_rssi_threshold
23586      * If valid (non-zero) cand_ap_min_rssi_threshold_5g and
23587      * cand_ap_min_rssi_threshold_6g values are provided,
23588      * then cand_ap_min_rssi_threshold should only be applied to 2.4 GHz APs.
23589      * But if cand_ap_min_rssi_threshold_5g and cand_ap_min_rssi_threshold_6g
23590      * are zeros, then cand_ap_min_rssi_threshold should be applied to all APs.
23591      */
23592     A_INT32 cand_ap_min_rssi_threshold; /* Units in dBm */
23593     /* Roam score delta in %.
23594      * Consider AP as roam candidate only if AP score is at least
23595      * roam_score_delta % better than connected AP score.
23596      * Ex: roam_score_delta = 20, and connected AP score is 4000,
23597      * then consider candidate AP only if its score is at least
23598      * 4800 (= 4000 * 120%)
23599      */
23600     A_UINT32 roam_score_delta_percentage;
23601     /* Reason code to be filled in the response frame from STA.
23602        Ex: Reason code in the BTM response frame
23603        Valid values are 0 - 255 */
23604     A_UINT32 reason_code;
23605     /*
23606      * Consider 5GHz AP as roam candidate only if AP RSSI is better than
23607      * cand_ap_min_rssi_threshold_5g
23608      */
23609     A_INT32 cand_ap_min_rssi_threshold_5g; /* Units in dBm */
23610     /*
23611      * Consider 6 GHz AP as roam candidate only if AP RSSI is better than
23612      * cand_ap_min_rssi_threshold_6g
23613      */
23614     A_INT32 cand_ap_min_rssi_threshold_6g; /* Units in dBm */
23615 } wmi_configure_roam_trigger_parameters;
23616 
23617 /**
23618  * WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON:
23619  * Enable or disable roaming triggers in FW.
23620  */
23621 typedef struct {
23622     A_UINT32      tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_enable_disable_trigger_reason_fixed_param */
23623     /** unique id identifying the VDEV, generated by the caller */
23624     A_UINT32      vdev_id;
23625     /**
23626      * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
23627      * positions) showing for which roam_trigger_reasons are enabled by
23628      * bit value equal 0x1, and which roam_trigger_reasons are disabled by
23629      * bit value equal 0x0.
23630      */
23631     A_UINT32      trigger_reason_bitmask;
23632 
23633 /**
23634  * The following TLVs will follow this fixed_param TLV:
23635  *
23636  * wmi_configure_roam_trigger_parameters config_roam_trigger_param[]
23637  *     Roam trigger configuration per roam trigger.
23638  *     The number of elements in this TLV array is limited to
23639  *     WMI_ROAM_TRIGGER_EXT_REASON_MAX
23640  */
23641 } wmi_roam_enable_disable_trigger_reason_fixed_param;
23642 
23643 /** WMI_PROFILE_MATCH_EVENT: offload scan
23644  * generated when ever atleast one of the matching profiles is found
23645  * in recent NLO scan. no data is carried with the event.
23646  */
23647 
23648 /** P2P specific commands */
23649 
23650 /**
23651  * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
23652  * FW to generate P2P IE tobe carried in probe response frames.
23653  * FW will respond to probe requests while in listen state.
23654  */
23655 typedef struct {
23656     /* number of secondary device types,supported */
23657     A_UINT32 num_secondary_dev_types;
23658 /**
23659  * followed by 8 bytes of primary device id and
23660  * num_secondary_dev_types * 8 bytes of secondary device
23661  * id.
23662  */
23663 } wmi_p2p_dev_set_device_info;
23664 
23665 /** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
23666  *  state. if enabled, an active STA/AP will respond to P2P probe requests on
23667  *  the operating channel of the VDEV.
23668  */
23669 
23670 typedef struct {
23671     /* 1:enable disoverability, 0:disable discoverability */
23672     A_UINT32 enable_discoverability;
23673 } wmi_p2p_set_discoverability;
23674 
23675 /** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
23676  *  beacons generated by FW. used in FW beacon mode.
23677  *  the FW will add this IE to beacon in addition to the beacon
23678  *  template set by WMI_BCN_TMPL_CMDID command.
23679  */
23680 typedef struct {
23681     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param  */
23682     /** unique id identifying the VDEV, generated by the caller */
23683     A_UINT32 vdev_id;
23684     /* ie length */
23685     A_UINT32 ie_buf_len;
23686 /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
23687  *     A_UINT8 ie_data[]; <-- length in byte given by field num_data.
23688  */
23689 
23690 } wmi_p2p_go_set_beacon_ie_fixed_param;
23691 
23692 /** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
23693  *  probe response generated by FW. used in FW beacon mode.
23694  *  the FW will add this IE to probe response in addition to the probe response
23695  *  template set by WMI_PRB_TMPL_CMDID command.
23696  */
23697 typedef struct {
23698     /** unique id identifying the VDEV, generated by the caller */
23699     A_UINT32 vdev_id;
23700     /* ie length */
23701     A_UINT32 ie_buf_len;
23702 /*followed by  byte stream of ie data of length ie_buf_len */
23703 } wmi_p2p_go_set_probe_resp_ie;
23704 
23705 /** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
23706  *  be used by the FW to parse the P2P NoA attribute in beacons, probe responses
23707  *  and action frames received by the P2P Client.
23708  *  Note: This command is currently used only for Apple P2P implementation.
23709  */
23710 typedef struct {
23711     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
23712     /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte)  */
23713     A_UINT32 p2p_ie_oui_type;
23714     /** OS specific NoA Attribute ID */
23715     A_UINT32 p2p_noa_attribute;
23716 } wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
23717 
23718 /*----P2P disc offload definition  ----*/
23719 
23720 typedef struct {
23721     A_UINT32 pattern_type;
23722 /**
23723  * TLV (tag length value) parameters follow the pattern structure.
23724  * TLV can contain bssid list, ssid list and
23725  * ie. the TLV tags are defined above;
23726  */
23727 } wmi_p2p_disc_offload_pattern_cmd;
23728 
23729 typedef struct {
23730     /* unique id identifying the VDEV, generated by the caller */
23731     A_UINT32 vdev_id;
23732     /* mgmt type of the ie*/
23733     A_UINT32 mgmt_type;
23734     /* ie length */
23735     A_UINT32 ie_buf_len;
23736 /*followed by  byte stream of ie data of length ie_buf_len */
23737 } wmi_p2p_disc_offload_appie_cmd;
23738 
23739 typedef struct {
23740     /* enable/disable p2p find offload*/
23741     A_UINT32 enable;
23742     /* unique id identifying the VDEV, generated by the caller */
23743     A_UINT32 vdev_id;
23744     /* p2p find type */
23745     A_UINT32 disc_type;
23746     /* p2p find perodic */
23747     A_UINT32 perodic;
23748     /* p2p find listen channel in MHz */
23749     A_UINT32 listen_channel;
23750     /* p2p find full channel number */
23751     A_UINT32 num_scan_chans;
23752 /**
23753  * TLV (tag length value) parameters follow the pattern structure.
23754  * TLV  contain channel list in MHz
23755  */
23756 } wmi_p2p_disc_offload_config_cmd;
23757 
23758 /*----P2P OppPS definition  ----*/
23759 typedef struct {
23760     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param  */
23761     A_UINT32 tlv_header;
23762     /* unique id identifying the VDEV, generated by the caller */
23763     A_UINT32 vdev_id;
23764     /* OppPS attributes */
23765     /** Bit  0:     Indicate enable/disable of OppPS
23766      *  Bits 7-1:   Ctwindow in TUs
23767      *  Bits 31-8:  Reserved
23768      */
23769     A_UINT32    oppps_attr;
23770 } wmi_p2p_set_oppps_cmd_fixed_param;
23771 
23772 #define WMI_UNIFIED_OPPPS_ATTR_ENALBED      0x1
23773 #define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S    0
23774 
23775 #define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr)                      \
23776             WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
23777 
23778 #define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr)                 \
23779             WMI_F_RMW((hdr)->oppps_attr, 0x1,                   \
23780                 WMI_UNIFIED_OPPPS_ATTR_ENALBED);
23781 
23782 #define WMI_UNIFIED_OPPPS_ATTR_CTWIN        0xfe
23783 #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S      1
23784 
23785 #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr)                           \
23786             WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
23787 
23788 #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v)                \
23789             WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f,            \
23790                 WMI_UNIFIED_OPPPS_ATTR_CTWIN);
23791 
23792 typedef enum p2p_lo_start_ctrl_flags_e {
23793     P2P_LO_START_CTRL_FLAG_FLUSH_LISTEN_RESULT = 1 << 0,  /* flush prob. req when host is awake */
23794 } p2p_lo_start_ctrl_flags;
23795 
23796 #define P2P_LO_PER_DEV_TYPE_LEN     8
23797 #define P2P_LO_DEV_TYPES_COUNT_MAX  10
23798 #define P2P_LO_DEV_TYPES_LEN_MAX    (P2P_LO_PER_DEV_TYPE_LEN * P2P_LO_DEV_TYPES_COUNT_MAX)
23799 #define P2P_LO_PROB_RESP_MAX_LEN    512
23800 
23801 typedef struct {
23802     A_UINT32 tlv_header;
23803     A_UINT32 vdev_id;
23804     A_UINT32 ctl_flags; /* refer to enum_p2p_lo_start_ctrl_flags_e */
23805     A_UINT32 channel;   /* MHz */
23806     A_UINT32 period;    /* ms */
23807     A_UINT32 interval;  /* ms, interval should be larger than period */
23808     A_UINT32 count;     /* 0 means forever */
23809     /*
23810      * device_types_len specifies the number of bytes in the
23811      * device_types_data[] byte-array TLV that follows this TLV.
23812      * The data in device_types_data[] is in 8-byte elements, so
23813      * device_types_len will be a multiple of 8.
23814      * Refer to P2P_LO_DEV_TYPES_LEN_MAX
23815      */
23816     A_UINT32 device_types_len;
23817     /*
23818      * prob_resp_len specifies the number of bytes in the
23819      * prob_resp_data[] byte-array TLV that follows this TLV.
23820      * Refer to P2P_LO_PROB_RESP_MAX_LEN
23821      */
23822     A_UINT32 prob_resp_len;
23823     /* MAC address to be used for P2P discovery */
23824     wmi_mac_addr p2p_disc_mac_addr;
23825     /*
23826      * Two other TLVs follow this TLV:
23827      * A_UINT8 device_types_data[device_types_len];
23828      * A_UINT8 prob_resp_data[prob_resp_len];
23829      *     The information in device_types_data[] and prob_resp_data[]
23830      *     needs to be provided to the target in over-the-air byte order.
23831      *     On a big-endian host, if device_types_data and prob_resp_data
23832      *     are initially in the correct over-the-air byte order,
23833      *     the automatic byteswap for endianness-correction during WMI
23834      *     message download will mess up the byte order.
23835      *     Thus, a big-endian host needs to explicitly byte-swap the bytes
23836      *     within each quad-byte segment of device_types_data[] and
23837      *     prob_resp_data[], so that the automatic byte-swap applied during
23838      *     WMI download from a big-endian host to the little-endian target
23839      *     will restore device_types_data and prob_resp_data into the
23840      *     correct byte ordering.
23841      */
23842 } wmi_p2p_lo_start_cmd_fixed_param;
23843 
23844 typedef struct {
23845     A_UINT32 tlv_header;
23846     A_UINT32 vdev_id;
23847 } wmi_p2p_lo_stop_cmd_fixed_param;
23848 
23849 typedef enum p2p_lo_stopped_reason_e {
23850     P2P_LO_STOPPED_REASON_COMPLETE = 0,   /* finished as scheduled */
23851     P2P_LO_STOPPED_REASON_RECV_STOP_CMD,  /* host stops it */
23852     P2P_LO_STOPPED_REASON_INVALID_LO_PAR, /* invalid listen offload par */
23853     P2P_LO_STOPPED_REASON_FW_NOT_SUPPORT, /* vdev cannot support it right now */
23854 } p2p_lo_stopped_reason;
23855 
23856 typedef struct {
23857     A_UINT32 tlv_header;
23858     A_UINT32 vdev_id;
23859     A_UINT32 reason;/* refer to p2p_lo_stopped_reason_e */
23860 } wmi_p2p_lo_stopped_event_fixed_param;
23861 
23862 typedef enum {
23863     WMI_MNT_FILTER_CONFIG_MANAGER,
23864     WMI_MNT_FILTER_CONFIG_CONTROL,
23865     WMI_MNT_FILTER_CONFIG_DATA,
23866     WMI_MNT_FILTER_CONFIG_ALL,
23867     WMI_MNT_FILTER_CONFIG_UNKNOWN,
23868 } WMI_MNT_FILTER_CONFIG_TYPE;
23869 
23870 typedef struct {
23871     A_UINT32 tlv_header;
23872     A_UINT32 vdev_id;
23873     A_UINT32 clear_or_set;
23874     A_UINT32 configure_type; /* see WMI_MNT_FILTER_CONFIG_TYPE */
23875 } wmi_mnt_filter_cmd_fixed_param;
23876 
23877 typedef struct {
23878     A_UINT32 time32; /* upper 32 bits of time stamp */
23879     A_UINT32 time0;  /* lower 32 bits of time stamp */
23880 } A_TIME64;
23881 
23882 typedef enum wmi_peer_sta_kickout_reason {
23883     WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0,        /* default value to preserve legacy behavior */
23884     WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
23885     WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
23886     WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
23887     WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4,    /* TDLS peer has disappeared. All tx is failing */
23888     WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
23889     WMI_PEER_STA_KICKOUT_REASON_ROAMING_EVENT = 6,      /* Directly connected peer has roamed to a repeater */
23890     WMI_PEER_STA_KICKOUT_REASON_PMF_ERROR = 7,          /* PMF error threshold is hit */
23891 } PEER_KICKOUT_REASON;
23892 
23893 typedef struct {
23894     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param  */
23895     /** peer mac address */
23896     wmi_mac_addr peer_macaddr;
23897     /** Reason code, defined as above */
23898     A_UINT32 reason;
23899     /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
23900     A_UINT32 rssi;
23901 } wmi_peer_sta_kickout_event_fixed_param;
23902 
23903 #define WMI_WLAN_PROFILE_MAX_HIST     3
23904 #define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
23905 
23906 typedef struct _wmi_wlan_profile_t {
23907     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
23908     A_UINT32 id;
23909     A_UINT32 cnt;
23910     A_UINT32 tot;
23911     A_UINT32 min;
23912     A_UINT32 max;
23913     A_UINT32 hist_intvl;
23914     A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
23915 } wmi_wlan_profile_t;
23916 
23917 typedef struct _wmi_wlan_profile_ctx_t {
23918     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
23919     A_UINT32 tot; /* time in us */
23920     A_UINT32 tx_msdu_cnt;
23921     A_UINT32 tx_mpdu_cnt;
23922     A_UINT32 tx_ppdu_cnt;
23923     A_UINT32 rx_msdu_cnt;
23924     A_UINT32 rx_mpdu_cnt;
23925     A_UINT32 bin_count;
23926 } wmi_wlan_profile_ctx_t;
23927 
23928 
23929 typedef struct {
23930     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
23931     A_UINT32 enable;
23932 } wmi_wlan_profile_trigger_cmd_fixed_param;
23933 
23934 typedef struct {
23935     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
23936     A_UINT32 value;
23937 } wmi_wlan_profile_get_prof_data_cmd_fixed_param;
23938 
23939 typedef struct {
23940     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
23941     A_UINT32 profile_id;
23942     A_UINT32 value;
23943 } wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
23944 
23945 typedef struct {
23946     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
23947     A_UINT32 profile_id;
23948     A_UINT32 enable;
23949 } wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
23950 
23951 /*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
23952  146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
23953  when comparing wifi header.*/
23954 /* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
23955 #define WOW_DEFAULT_BITMAP_PATTERN_SIZE      146
23956 #define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
23957 #define WOW_DEFAULT_BITMASK_SIZE             146
23958 #define WOW_DEFAULT_BITMASK_SIZE_DWORD        37
23959 #define WOW_MAX_BITMAP_FILTERS               32
23960 #define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT  16
23961 #define WOW_EXTEND_PATTERN_MATCH_CNT    16
23962 #define WOW_SHORT_PATTERN_MATCH_CNT     8
23963 #define WOW_DEFAULT_EVT_BUF_SIZE             148  /* Maximum 148 bytes of the data is copied starting from header incase if the match is found.
23964                                                                                     The 148 comes from (128 - 14)  payload size  + 8bytes LLC + 26bytes MAC header*/
23965 #define WOW_DEFAULT_IOAC_PATTERN_SIZE  6
23966 #define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
23967 #define WOW_DEFAULT_IOAC_RANDOM_SIZE  6
23968 #define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
23969 #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE   120
23970 #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
23971 #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE  32
23972 #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
23973 #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE       32
23974 #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
23975 #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE  128
23976 #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
23977 
23978 typedef enum pattern_type_e {
23979     WOW_PATTERN_MIN = 0,
23980     WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
23981     WOW_IPV4_SYNC_PATTERN,
23982     WOW_IPV6_SYNC_PATTERN,
23983     WOW_WILD_CARD_PATTERN,
23984     WOW_TIMER_PATTERN,
23985     WOW_MAGIC_PATTERN,
23986     WOW_IPV6_RA_PATTERN,
23987     WOW_IOAC_PKT_PATTERN,
23988     WOW_IOAC_TMR_PATTERN,
23989     WOW_IOAC_SOCK_PATTERN,
23990     WOW_PATTERN_MAX
23991 } WOW_PATTERN_TYPE;
23992 
23993 typedef enum event_type_e {
23994     WOW_BMISS_EVENT = 0,          /*  0 */
23995     WOW_BETTER_AP_EVENT,          /*  1 */
23996     WOW_DEAUTH_RECVD_EVENT,       /*  2 */
23997     WOW_MAGIC_PKT_RECVD_EVENT,    /*  3 */
23998     WOW_GTK_ERR_EVENT,            /*  4 */
23999     WOW_FOURWAY_HSHAKE_EVENT,     /*  5 */
24000     WOW_EAPOL_RECVD_EVENT,        /*  6 */
24001     WOW_NLO_DETECTED_EVENT,       /*  7 */
24002     WOW_DISASSOC_RECVD_EVENT,     /*  8 */
24003     WOW_PATTERN_MATCH_EVENT,      /*  9 */
24004     WOW_CSA_IE_EVENT,             /* 10 */
24005     WOW_PROBE_REQ_WPS_IE_EVENT,   /* 11 */
24006     WOW_AUTH_REQ_EVENT,           /* 12 */
24007     WOW_ASSOC_REQ_EVENT,          /* 13 */
24008     WOW_HTT_EVENT,                /* 14 */
24009     WOW_RA_MATCH_EVENT,           /* 15 */
24010     WOW_HOST_AUTO_SHUTDOWN_EVENT, /* 16 */
24011     WOW_IOAC_MAGIC_EVENT,         /* 17 */
24012     WOW_IOAC_SHORT_EVENT,         /* 18 */
24013     WOW_IOAC_EXTEND_EVENT,        /* 19 */
24014     WOW_IOAC_TIMER_EVENT,         /* 20 */
24015     WOW_DFS_PHYERR_RADAR_EVENT,   /* 21 */
24016     WOW_BEACON_EVENT,             /* 22 */
24017     WOW_CLIENT_KICKOUT_EVENT,     /* 23 */
24018     WOW_NAN_EVENT,                /* 24 */
24019     WOW_EXTSCAN_EVENT,            /* 25 */
24020     WOW_IOAC_REV_KA_FAIL_EVENT,   /* 26 */
24021     WOW_IOAC_SOCK_EVENT,          /* 27 */
24022     WOW_NLO_SCAN_COMPLETE_EVENT,  /* 28 */
24023     WOW_NAN_DATA_EVENT,           /* 29 */
24024     WOW_NAN_RTT_EVENT, /* DEPRECATED, UNUSED; 30 */
24025     WOW_OEM_RESPONSE_EVENT = WOW_NAN_RTT_EVENT, /* reuse deprecated event value; 30 */
24026     WOW_TDLS_CONN_TRACKER_EVENT,  /* 31 */
24027     WOW_CRITICAL_LOG_EVENT,               /* 32 +  0 */
24028     WOW_CHIP_POWER_FAILURE_DETECT_EVENT,  /* 32 +  1 */
24029     WOW_11D_SCAN_EVENT,                   /* 32 +  2 */
24030     WOW_SAP_OBSS_DETECTION_EVENT,         /* 32 +  3 */
24031     WOW_BSS_COLOR_COLLISION_DETECT_EVENT, /* 32 +  4 */
24032     WOW_TKIP_MIC_ERR_FRAME_RECVD_EVENT,   /* 32 +  5 */
24033     WOW_ROAM_PREAUTH_START_EVENT,         /* 32 +  6 */
24034     WOW_ROAM_PMKID_REQUEST_EVENT,         /* 32 +  7 */
24035     WOW_DFS_CAC_COMPLETE_EVENT,           /* 32 +  8 */
24036     WOW_VDEV_DISCONNECT_EVENT,            /* 32 +  9 */
24037     WOW_TWT_EVENT,                        /* 32 + 10 */
24038     WOW_DCS_INTERFERENCE_DET,             /* 32 + 11 */
24039     WOW_ROAM_STATS_EVENT,                 /* 32 + 12 */
24040     WOW_RTT_11AZ_EVENT,                   /* 32 + 13 */
24041     WOW_P2P_NOA_EVENT,                    /* 32 + 14 */
24042     WOW_XGAP_EVENT,                       /* 32 + 15 */
24043 } WOW_WAKE_EVENT_TYPE;
24044 
24045 typedef enum wake_reason_e {
24046     WOW_REASON_UNSPECIFIED = -1,
24047     WOW_REASON_NLOD = 0,
24048     WOW_REASON_AP_ASSOC_LOST,
24049     WOW_REASON_LOW_RSSI,
24050     WOW_REASON_DEAUTH_RECVD,
24051     WOW_REASON_DISASSOC_RECVD,
24052     WOW_REASON_GTK_HS_ERR,
24053     WOW_REASON_EAP_REQ,
24054     WOW_REASON_FOURWAY_HS_RECV,
24055     WOW_REASON_TIMER_INTR_RECV,
24056     WOW_REASON_PATTERN_MATCH_FOUND,
24057     WOW_REASON_RECV_MAGIC_PATTERN,
24058     WOW_REASON_P2P_DISC,
24059     WOW_REASON_WLAN_HB,
24060     WOW_REASON_CSA_EVENT,
24061     WOW_REASON_PROBE_REQ_WPS_IE_RECV,
24062     WOW_REASON_AUTH_REQ_RECV,
24063     WOW_REASON_ASSOC_REQ_RECV,
24064     WOW_REASON_HTT_EVENT,
24065     WOW_REASON_RA_MATCH,
24066     WOW_REASON_HOST_AUTO_SHUTDOWN,
24067     WOW_REASON_IOAC_MAGIC_EVENT,
24068     WOW_REASON_IOAC_SHORT_EVENT,
24069     WOW_REASON_IOAC_EXTEND_EVENT,
24070     WOW_REASON_IOAC_TIMER_EVENT,
24071     WOW_REASON_ROAM_HO,
24072     WOW_REASON_DFS_PHYERR_RADADR_EVENT,
24073     WOW_REASON_BEACON_RECV,
24074     WOW_REASON_CLIENT_KICKOUT_EVENT,
24075     WOW_REASON_NAN_EVENT,
24076     WOW_REASON_EXTSCAN,
24077     WOW_REASON_RSSI_BREACH_EVENT,
24078     WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
24079     WOW_REASON_IOAC_SOCK_EVENT,
24080     WOW_REASON_NLO_SCAN_COMPLETE,
24081     WOW_REASON_PACKET_FILTER_MATCH,
24082     WOW_REASON_ASSOC_RES_RECV,
24083     WOW_REASON_REASSOC_REQ_RECV,
24084     WOW_REASON_REASSOC_RES_RECV,
24085     WOW_REASON_ACTION_FRAME_RECV,
24086     WOW_REASON_BPF_ALLOW,
24087     WOW_REASON_NAN_DATA,
24088     WOW_REASON_NAN_RTT, /* DEPRECATED, UNUSED */
24089     WOW_REASON_OEM_RESPONSE_EVENT = WOW_REASON_NAN_RTT, /* reuse deprecated reason value */
24090     WOW_REASON_TDLS_CONN_TRACKER_EVENT,
24091     WOW_REASON_CRITICAL_LOG,
24092     WOW_REASON_P2P_LISTEN_OFFLOAD,
24093     WOW_REASON_NAN_EVENT_WAKE_HOST,
24094     WOW_REASON_CHIP_POWER_FAILURE_DETECT,
24095     WOW_REASON_11D_SCAN,
24096     WOW_REASON_THERMAL_CHANGE,
24097     WOW_REASON_OIC_PING_OFFLOAD,
24098     WOW_REASON_WLAN_DHCP_RENEW,
24099     WOW_REASON_SAP_OBSS_DETECTION,
24100     WOW_REASON_BSS_COLOR_COLLISION_DETECT,
24101     WOW_REASON_TKIP_MIC_ERR_FRAME_RECVD_DETECT,
24102     WOW_REASON_WLAN_MD, /* motion detected */
24103     WOW_REASON_WLAN_BL, /* baselining done */
24104     WOW_REASON_NTH_BCN_OFLD, /* nth beacon forward to host */
24105     WOW_REASON_PKT_CAPTURE_MODE_WAKE,
24106     WOW_REASON_PAGE_FAULT, /* Host wake up due to page fault */
24107     WOW_REASON_ROAM_PREAUTH_START,
24108     WOW_REASON_ROAM_PMKID_REQUEST,
24109     WOW_REASON_RFKILL,
24110     WOW_REASON_DFS_CAC,
24111     WOW_REASON_VDEV_DISCONNECT,
24112     WOW_REASON_LOCAL_DATA_UC_DROP,
24113     WOW_REASON_GENERIC_WAKE, /* A generic reason that host should be woken up */
24114     WOW_REASON_ERR_PKT_TRIGGERED_WAKEUP,
24115     WOW_REASON_TWT,
24116     WOW_REASON_FATAL_EVENT_WAKE,
24117     WOW_REASON_DCS_INT_DET,
24118     WOW_REASON_ROAM_STATS,
24119     WOW_REASON_MDNS_WAKEUP,
24120     WOW_REASON_RTT_11AZ,
24121     WOW_REASON_P2P_NOA_UPDATE,
24122     /* When Host configured timer elapsed for delayed wakeup */
24123     WOW_REASON_DELAYED_WAKEUP_HOST_CFG_TIMER_ELAPSED,
24124     /* Data store list is full, so Host wakeup should be triggered */
24125     WOW_REASON_DELAYED_WAKEUP_DATA_STORE_LIST_FULL,
24126     /* Sched PM FW initiated termination event */
24127     WOW_REASON_SCHED_PM_TERMINATED,
24128     /* XGAP entry/exit response */
24129     WOW_REASON_XGAP,
24130     /* COEX channel avoid event */
24131     WOW_REASON_COEX_CHAVD,
24132     /* vdev repurpose request event */
24133     WOW_REASON_VDEV_REPURPOSE,
24134     /* STX High duty cycle event */
24135     WOW_REASON_STX_WOW_HIGH_DUTY_CYCLE,
24136     /* WoW exit reason MCC lite */
24137     WOW_REASON_MCC_LITE,
24138 
24139     /* add new WOW_REASON_ defs before this line */
24140     WOW_REASON_MAX,
24141     WOW_REASON_DEBUG_TEST = 0xFF,
24142 } WOW_WAKE_REASON_TYPE;
24143 
24144 
24145 typedef enum {
24146     WOW_IFACE_PAUSE_ENABLED,
24147     WOW_IFACE_PAUSE_DISABLED
24148 } WOW_IFACE_STATUS;
24149 
24150 enum {
24151     WMI_WOW_FLAG_IGNORE_PCIE_RESET          = 0x00000001, /* some win10 platform will not assert pcie_reset for wow.*/
24152     /* WMI_WOW_FLAG_SEND_PM_PME
24153      * Some platforms have issues if the PM_PME message is sent after WoW,
24154      * so don't send PM_PME after WoW unless the host uses this flag
24155      * to request it.
24156      */
24157     WMI_WOW_FLAG_SEND_PM_PME                = 0x00000002,
24158     /* Flag to indicate unit test */
24159     WMI_WOW_FLAG_UNIT_TEST_ENABLE           = 0x00000004,
24160     /* Force HTC wakeup */
24161     WMI_WOW_FLAG_DO_HTC_WAKEUP              = 0x00000008,
24162     /* Enable L1SS sleep for PCIE DRV case */
24163     WMI_WOW_FLAG_ENABLE_DRV_PCIE_L1SS_SLEEP = 0x00000010,
24164     /*
24165      * To differentiate system suspend Vs RTPM BIT set -
24166      * System Suspend WOW, BIT Reset- RTPM (DRV)
24167      */
24168     WMI_WOW_FLAG_SYSTEM_SUSPEND_WOW         = 0x00000020,
24169     /*
24170      * Feature flag for INI enable_mod_dtim_on_system_suspend
24171      * This flag/bit will be set if INI settings enable mod_dtim_on_sys_suspend.
24172      */
24173     WMI_WOW_FLAG_MOD_DTIM_ON_SYS_SUSPEND    = 0x00000040,
24174     /*
24175      * Forced dtim in suspend mode enable Flag.
24176      * setDtimInSuspendMode
24177      */
24178     WMI_WOW_FLAG_FORCED_DTIM_ON_SYS_SUSPEND = 0x00000080,
24179     /* Flag to force DPD lock. */
24180     WMI_WOW_FLAG_FORCED_DPD_LOCK            = 0x00000100,
24181     /*
24182      * Feature flag for INI 'enable_teles_dtim_on_system_suspend'
24183      * This flag/bit will be set if INI 'enable_teles_dtim_on_system_suspend'
24184      * is enabled.
24185      */
24186     WMI_WOW_FLAG_TELES_DTIM_ON_SYS_SUSPEND  = 0x00000200,
24187 };
24188 
24189 typedef struct {
24190     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param  */
24191     A_UINT32 enable;
24192     A_UINT32 pause_iface_config;
24193     A_UINT32 flags;  /* WMI_WOW_FLAG enums */
24194 } wmi_wow_enable_cmd_fixed_param;
24195 
24196 typedef enum {
24197     WMI_WOW_RESUME_FLAG_TX_DATA          = 0x00000001, /* TX data pending to be sent in resume */
24198 } WMI_WOW_RESUME_FLAG_ENUM;
24199 
24200 /* wow nack reason codes */
24201 typedef enum {
24202     /* WoW error due to unnkown reason */
24203     WMI_WOW_NON_ACK_REASON_UNKNOWN = 0,
24204 
24205     /* WoW error due to TX failure */
24206     WMI_WOW_NON_ACK_REASON_TX = 1,
24207 
24208     /* WoW error due to some data blocked */
24209     WMI_WOW_NON_ACK_REASON_IS_BLOCK = 2,
24210 
24211     /* WoW error in WFA mode */
24212     WMI_WOW_NON_ACK_REASON_NOT_ALLOW = 3,
24213 
24214     /* WoW error mac operation fail */
24215     WMI_WOW_NON_ACK_REASON_HW_FAIL = 4,
24216 
24217     /* WoW error due to timeout */
24218     WMI_WOW_NON_ACK_REASON_TIMEOUT = 5,
24219 
24220     /* WoW error due to RTT or CFR capture active */
24221     WMI_WOW_NON_ACK_REASON_RTT_DMA = 6,
24222 
24223     /* WoW error due to roam module holding lock */
24224     WMI_WOW_NON_ACK_REASON_ROAM = 7,
24225 
24226     /* WoW error remote peer not sleeping */
24227     WMI_WOW_NON_ACK_REASON_PEER_ACTIVE = 8,
24228 
24229     /* WoW error due to WoW entry defer failed */
24230     WMI_WOW_NON_ACK_REASON_DEFER_FAILURE = 9,
24231 
24232     /* WoW error due to WoW entry defer timeout */
24233     WMI_WOW_NON_ACK_REASON_DEFER_TIMEOUT = 10,
24234 
24235     /* WoW error due to FATAL event */
24236     WMI_WOW_NON_ACK_REASON_FATAL_EVENT = 11,
24237 
24238     /* WoW error if close to TBTT */
24239     WMI_WOW_NON_ACK_REASON_CLOSE_TO_TBTT = 12,
24240 } WMI_WOW_NACK_STATUS;
24241 
24242 typedef struct {
24243     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param  */
24244     /* reserved0:
24245      * This "reserved" field is not actually reserved any more.
24246      * It is being used in certain FW branches to hold flags, whose values
24247      * are defined by WMI_WOW_RESUME_FLAG_ENUM.
24248      */
24249     union {
24250         A_UINT32 reserved0;
24251         A_UINT32 flags;
24252     };
24253 } wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
24254 
24255 #define WOW_ICMPV6_NA_FILTER_DISABLE 0
24256 #define WOW_ICMPV6_NA_FILTER_ENABLE 1
24257 
24258 typedef struct {
24259     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param  */
24260     A_UINT32 vdev_id;
24261     A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
24262 } wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
24263 
24264 typedef struct bitmap_pattern_s {
24265     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
24266     A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
24267     A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
24268     A_UINT32 pattern_offset;
24269     A_UINT32 pattern_len;
24270     A_UINT32 bitmask_len;
24271     A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
24272 } WOW_BITMAP_PATTERN_T;
24273 
24274 typedef struct ipv4_sync_s {
24275     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
24276     A_UINT32 ipv4_src_addr;
24277     A_UINT32 ipv4_dst_addr;
24278     A_UINT32 tcp_src_prt;
24279     A_UINT32 tcp_dst_prt;
24280 } WOW_IPV4_SYNC_PATTERN_T;
24281 
24282 typedef struct ipv6_sync_s {
24283     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
24284     A_UINT32 ipv6_src_addr[4];
24285     A_UINT32 ipv6_dst_addr[4];
24286     A_UINT32 tcp_src_prt;
24287     A_UINT32 tcp_dst_prt;
24288 } WOW_IPV6_SYNC_PATTERN_T;
24289 
24290 typedef struct WOW_MAGIC_PATTERN_CMD
24291 {
24292     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
24293     wmi_mac_addr macaddr;
24294 } WOW_MAGIC_PATTERN_CMD;
24295 
24296 typedef enum wow_ioac_pattern_type {
24297     WOW_IOAC_MAGIC_PATTERN = 1,
24298     WOW_IOAC_SHORT_PATTERN,
24299     WOW_IOAC_EXTEND_PATTERN,
24300 } WOW_IOAC_PATTERN_TYPE;
24301 
24302 typedef struct ioac_sock_pattern_s {
24303     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T */
24304     A_UINT32 id;
24305     A_UINT32 local_ipv4;
24306     A_UINT32 remote_ipv4;
24307     A_UINT32 local_port;
24308     A_UINT32 remote_port;
24309     A_UINT32 pattern_len; /* units = bytes */
24310     A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
24311     WMI_IPV6_ADDR local_ipv6;
24312     WMI_IPV6_ADDR remote_ipv6;
24313     A_UINT32 ack_nak_len;
24314     A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
24315     A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
24316 } WOW_IOAC_SOCK_PATTERN_T;
24317 
24318 typedef struct ioac_pkt_pattern_s {
24319     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
24320     A_UINT32 pattern_type;
24321     A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
24322     A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
24323     A_UINT32 pattern_len;
24324     A_UINT32 random_len;
24325 } WOW_IOAC_PKT_PATTERN_T;
24326 
24327 typedef struct ioac_tmr_pattern_s {
24328     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
24329     A_UINT32 wake_in_s;
24330     A_UINT32 vdev_id;
24331 } WOW_IOAC_TMR_PATTERN_T;
24332 
24333 typedef struct {
24334     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
24335     A_UINT32 nID;
24336 } WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
24337 
24338 typedef struct {
24339     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
24340     A_UINT32 nID;
24341 } WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
24342 
24343 typedef struct ioac_keepalive_s {
24344     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
24345     A_UINT32 keepalive_pkt_buf[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
24346     A_UINT32 keepalive_pkt_len;
24347     A_UINT32 period_in_ms;
24348     A_UINT32 vdev_id;
24349     A_UINT32 max_loss_cnt;
24350     A_UINT32 local_ipv4;
24351     A_UINT32 remote_ipv4;
24352     A_UINT32 local_port;
24353     A_UINT32 remote_port;
24354     A_UINT32 recv_period_in_ms;
24355     A_UINT32 rev_ka_size;
24356     A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
24357     WMI_IPV6_ADDR local_ipv6;
24358     WMI_IPV6_ADDR remote_ipv6;
24359 } WMI_WOW_IOAC_KEEPALIVE_T;
24360 
24361 typedef struct {
24362     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
24363     A_UINT32 vdev_id;
24364     A_UINT32 pattern_type;
24365 /*
24366  * Following this struct are these TLVs. Note that they are all array of structures
24367  * but can have at most one element. Which TLV is empty or has one element depends
24368  * on the field pattern_type. This is to emulate an union.
24369  *     WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
24370  *     WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
24371  */
24372 } WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
24373 
24374 typedef struct {
24375     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
24376     A_UINT32 vdev_id;
24377     A_UINT32 pattern_type;
24378     A_UINT32 pattern_id;
24379 } WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
24380 
24381 typedef struct {
24382     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
24383     A_UINT32 vdev_id;
24384     A_UINT32 pattern_id;
24385     A_UINT32 pattern_type;
24386 /*
24387  * Following this struct are these TLVs. Note that they are all array of structures
24388  * but can have at most one element. Which TLV is empty or has one element depends
24389  * on the field pattern_type. This is to emulate an union.
24390  *     WOW_BITMAP_PATTERN_T       pattern_info_bitmap[];
24391  *     WOW_IPV4_SYNC_PATTERN_T    pattern_info_ipv4[];
24392  *     WOW_IPV6_SYNC_PATTERN_T    pattern_info_ipv6[];
24393  *     WOW_MAGIC_PATTERN_CMD      pattern_info_magic_pattern[];
24394  *     A_UINT32                   pattern_info_timeout[];
24395  *     A_UINT32                   ra_ratelimit_interval;
24396  */
24397 } WMI_WOW_ADD_PATTERN_CMD_fixed_param;
24398 
24399 typedef struct {
24400     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
24401     A_UINT32 vdev_id;
24402     A_UINT32 pattern_id;
24403     A_UINT32 pattern_type;
24404 } WMI_WOW_DEL_PATTERN_CMD_fixed_param;
24405 
24406 #define WMI_WOW_MAX_EVENT_BM_LEN 4
24407 
24408 typedef struct {
24409     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param  */
24410     A_UINT32 vdev_id;
24411     A_UINT32 is_add;
24412     union {
24413         A_UINT32 event_bitmap;
24414         A_UINT32 event_bitmaps[WMI_WOW_MAX_EVENT_BM_LEN];
24415     };
24416 } WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
24417 
24418 /*
24419  * This structure is used to set the pattern to check UDP packet in WOW mode.
24420  * If match, construct a tx frame in a local buffer to send through the peer
24421  * AP to the entity in the IP network that sent the UDP packet to this STA.
24422  */
24423 typedef struct {
24424     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param  */
24425     A_UINT32 vdev_id;
24426     A_UINT32 enable; /* 1: enable, 0: disable*/
24427     /* dest_port -
24428      * bits 7:0  contain the LSB of the UDP dest port,
24429      * bits 15:8 contain the MSB of the UDP dest port
24430      */
24431     A_UINT32 dest_port;
24432     A_UINT32 pattern_len; /* length in byte of pattern[] */
24433     A_UINT32 response_len; /* length in byte of response[] */
24434 /* Following this struct are the TLV's:
24435  *  A_UINT8 pattern[];  <-- payload of UDP packet to be checked, network byte order
24436  *  A_UINT8 response[]; <-- payload of UDP packet to be response, network byte order
24437  */
24438 } WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
24439 
24440 /*
24441  * This structure is used to set the pattern for WOW host wakeup pin pulse pattern confirguration.
24442  */
24443 typedef struct {
24444     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param  */
24445     A_UINT32 enable; /* 1: enable, 0: disable */
24446     A_UINT32 pin; /* pin for host wakeup */
24447     A_UINT32 interval_low; /* interval for keeping low voltage, unit: ms */
24448     A_UINT32 interval_high; /* interval for keeping high voltage, unit: ms */
24449     A_UINT32 repeat_cnt; /* repeat times for pulse (0xffffffff means forever) */
24450     A_UINT32 init_state; /* Sense of the GPIO pin used for host wakeups.
24451                           * If init_state is 0, a low --> high transition
24452                           * causes a host wakeup interrupt.
24453                           * If init_state is 1, a high --> low transition
24454                           * causes a host wakeup interrupt.
24455                           */
24456 } WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
24457 
24458 #define MAX_SUPPORTED_ACTION_CATEGORY           256
24459 #define MAX_SUPPORTED_ACTION_SUBCATEGORY        32
24460 #define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST  (MAX_SUPPORTED_ACTION_CATEGORY/32)
24461 
24462 typedef enum {
24463     WOW_ACTION_WAKEUP_OPERATION_RESET = 0,
24464     WOW_ACTION_WAKEUP_OPERATION_SET,
24465     WOW_ACTION_WAKEUP_OPERATION_ADD_SET,
24466     WOW_ACTION_WAKEUP_OPERATION_DELETE_SET,
24467 } WOW_ACTION_WAKEUP_OPERATION;
24468 
24469 typedef struct {
24470     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param */
24471     A_UINT32 vdev_id;
24472     A_UINT32 operation; /* 0 reset to fw default, 1 set the bits, 2 add the setting bits, 3 delete the setting bits */
24473     A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST];
24474     /* This fixed_param TLV is followed by these additional TLV's
24475      * action_bitmaps_per_category -
24476      * Each element is a 32-bit bitmap indicating which subcategories
24477      * for that particular action category are considered for WoW wakeup
24478      * (if the subcategory's bit is 0) or ignored for WoW wakeup (if the
24479      * subcategory's bit is 1).
24480      *
24481      * A_UINT32 action_bitmaps_per_category[]; <-- variable length array
24482      */
24483 } WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param;
24484 
24485 typedef union {
24486     /* the bytes within these IP addresses are arranged in network byte order */
24487     A_UINT8 ipv4_addr[4];
24488     A_UINT8 ipv6_addr[16];
24489 } WMI_IP_ADDR;
24490 
24491 #define WMI_COAP_IPTV6_BIT_POS                    0
24492 #define WMI_COAP_ADDR_TYPE_BIT_POS                1
24493 
24494 #define WMI_COAP_IPV6_SET(param, value) \
24495     WMI_SET_BITS(param, WMI_COAP_IPTV6_BIT_POS, 1, value)
24496 
24497 #define WMI_COAP_IPV6_GET(param)     \
24498     WMI_GET_BITS(param, WMI_COAP_IPTV6_BIT_POS, 1)
24499 
24500 #define WMI_COAP_ADDR_TYPE_SET(param, value) \
24501     WMI_SET_BITS(param, WMI_COAP_ADDR_TYPE_BIT_POS, 1, value)
24502 
24503 #define WMI_COAP_ADDR_TYPE_GET(param)     \
24504     WMI_GET_BITS(param, WMI_COAP_ADDR_TYPE_BIT_POS, 1)
24505 
24506 typedef struct {
24507     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_ADD_PATTERN_CMD_fixed_param */
24508     A_UINT32 vdev_id;
24509     A_UINT32 pattern_id;
24510 
24511     /* pattern_type:
24512      * Indicates the type of pattern to be enabled
24513      * Bit 0:    Indicate pattern IP ADDR is IPV6 or IPV4
24514      * Bit 1:    Indicate pattern ADDR TYPE is BC or UC/MC
24515      * Bits 31:2 Reserved for future use
24516      *
24517      * Refer to WMI_COAP_IPV6_SET,GET and WMI_COAP_ADDR_TYPE_SET,GET macros
24518      */
24519     A_UINT32 pattern_type;
24520 
24521     A_UINT32 timeout; /* the cached packet expire timeout in ms */
24522 
24523     /* the dst ip address(uc/mc/bc), dst port to match CoAP message */
24524     WMI_IP_ADDR match_udp_ip; /* network byte order */
24525     A_UINT32 match_udp_port;
24526 
24527     /* DUT ip address and port for CoAP replay message */
24528     WMI_IP_ADDR udp_local_ip; /* network byte order */
24529     A_UINT32 udp_local_port;
24530 
24531     A_UINT32 verify_offset; /* UDP payload offset to verify */
24532     A_UINT32 verify_len;    /* UDP payload length to verofy*/
24533     A_UINT32 coapmsg_len;   /* CoAP reply message length */
24534 /* The below TLV (tag length value) parameters follow this fixed_param TLV:
24535  *     A_UINT8 verify_string[];  verify content,
24536  *         length identified by verify_len;
24537  *     A_UINT8 coapmsg[];        CoAP reply message,
24538  *         length identified by coapmsg_len;
24539  */
24540 } WMI_WOW_COAP_ADD_PATTERN_CMD_fixed_param;
24541 
24542 typedef struct {
24543     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_DEL_PATTERN_CMD_fixed_param */
24544     A_UINT32 vdev_id;
24545     A_UINT32 pattern_id;
24546 } WMI_WOW_COAP_DEL_PATTERN_CMD_fixed_param;
24547 
24548 typedef struct {
24549     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMD_fixed_param */
24550     A_UINT32 vdev_id;
24551     A_UINT32 pattern_id;
24552 
24553     /* pattern_type:
24554      * Indicates the type of pattern to be enabled
24555      * Bit 0:    Indicate pattern IP ADDR is IPV6 or IPV4
24556      * Bit 1:    Indicate pattern ADDR TYPE is BC or UC/MC
24557      * Bits 31:2 Reserved for future use
24558      *
24559      * Refer to WMI_COAP_IPV6_SET,GET and WMI_COAP_ADDR_TYPE_SET,GET macros
24560      */
24561     A_UINT32 pattern_type;
24562 
24563     /* ip address and port for CoAP send keepalive message */
24564     WMI_IP_ADDR udp_local_ip; /* network byte order */
24565     A_UINT32 udp_local_port;
24566     WMI_IP_ADDR udp_remote_ip; /* network byte order */
24567     A_UINT32 udp_remote_port;
24568 
24569     A_UINT32 timeout;         /* the periorid to send keepalive message in ms */
24570     A_UINT32 coapmsg_len;     /* keeplive CoAP message length */
24571 /* The below TLV (tag length value) parameters follow this fixed_param TLV:
24572  *     A_UINT8 coapmsg[];  CoAP keepalive message,
24573  *          length specified by coapmsg_len field
24574  */
24575 } WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMD_fixed_param;
24576 
24577 typedef struct {
24578     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMD_fixed_param */
24579     A_UINT32 vdev_id;
24580     A_UINT32 pattern_id;
24581 } WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMD_fixed_param;
24582 
24583 typedef struct {
24584     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_GET_BUF_INFO_CMD_fixed_param */
24585     A_UINT32 vdev_id;
24586     A_UINT32 pattern_id;
24587 } WMI_WOW_COAP_GET_BUF_INFO_CMD_fixed_param;
24588 
24589 typedef struct {
24590     A_UINT32 tlv_hdr; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_coap_tuple */
24591     A_UINT64 tsf;     /* host and firmware sync tsf */
24592     /* flag:
24593      * Indicates the type of ip address
24594      * Bit 0:    Indicate ip address is IPV6 or IPV4
24595      * Bits 31:1 Reserved for future use
24596      *
24597      * Refer to WMI_COAP_IPV6_SET,GET macros
24598      */
24599     A_UINT32 flag;
24600     WMI_IP_ADDR src_ip; /* network byte order */
24601     A_UINT32 payload_len;
24602 } wmi_coap_tuple;
24603 
24604 typedef struct {
24605     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_COAP_BUF_INFO_fixed_param */
24606     A_UINT32 vdev_id;
24607     A_UINT32 pattern_id;
24608     /** more_data will be set depending on the number of tuples need transmit */
24609     A_UINT32 more_tuples;
24610 
24611 /* The below TLV (tag length value) parameters follow this fixed_param TLV:
24612  *     wmi_coap_tuple coap_tuple[]; <-- Array of coap_tuple.
24613  *     A_UINT32 payloads[] <-- the cached received CoAP messages.
24614  *         The number of message payloads combined into the payloads[]
24615  *         array matches the number of coap tuples.
24616  *         The length of each message payload is specified by the
24617  *         "payload_len" field in the corresponding coap_tuple.
24618  *         The subsequent message payload starts at the next 4-byte aligned
24619  *         position within payloads[].
24620  *         For example, if there are 3 coap_tuples, with
24621  *             coap_tuples[0].payload_len = 12
24622  *             coap_tuples[1].payload_len = 23
24623  *             coap_tuples[2].payload_len = 34
24624  *         then msg 0 payload will be stored in payloads[0] - payloads[11]
24625  *         message  1 payload will be stored in payloads[12] - payloads[34]
24626  *         message  2 payload will be stored in payloads[36] - payloads[69]
24627  */
24628 } WMI_WOW_COAP_BUF_INFO_EVENT_fixed_param;
24629 
24630 typedef struct wow_event_info_s {
24631     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param  */
24632     A_UINT32 vdev_id;
24633     A_UINT32 flag; /*This is current reserved.*/
24634     A_INT32 wake_reason;
24635     A_UINT32 data_len;
24636     A_UINT32 delayed_pkt_count;
24637 } WOW_EVENT_INFO_fixed_param;
24638 
24639 typedef struct wow_initial_wakeup_event_s {
24640     A_UINT32 tlv_header; /* TLV tag and len; tag equals WOW_INITIAL_WAKEUP_EVENT_fixed_param  */
24641     A_UINT32 vdev_id;
24642 } WOW_INITIAL_WAKEUP_EVENT_fixed_param;
24643 
24644 typedef enum {
24645     WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
24646     WOW_EVENT_INFO_TYPE_BITMAP,
24647     WOW_EVENT_INFO_TYPE_GTKIGTK,
24648 } WOW_EVENT_INFO_TYPE;
24649 
24650 typedef struct wow_event_info_section_s {
24651     A_UINT32 data_type;
24652     A_UINT32 data_len;
24653 } WOW_EVENT_INFO_SECTION;
24654 
24655 typedef struct wow_event_info_section_packet_s {
24656     A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
24657 } WOW_EVENT_INFO_SECTION_PACKET;
24658 
24659 typedef struct wow_event_info_section_bitmap_s {
24660     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP  */
24661     A_UINT32 flag; /*This is current reserved.*/
24662     A_UINT32 value; /*This could be the pattern id for bitmap pattern.*/
24663     A_UINT32 org_len; /*The length of the original packet.*/
24664 } WOW_EVENT_INFO_SECTION_BITMAP;
24665 
24666 /**
24667  * This command is sent from WLAN host driver to firmware to
24668  * enable or disable D0-WOW. D0-WOW means APSS suspend with
24669  * PCIe link and DDR being active.
24670  *
24671  *
24672  * Entering D0-WOW Mode (based on kernel suspend request):
24673  *    host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
24674  *    target: Take action (e.g. dbglog suspend)
24675  *    target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
24676  *
24677  * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
24678  *    host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
24679  *    target: Take action (e.g. dbglog resume)
24680  *    target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
24681  *
24682  * This command is applicable only on the PCIE LL systems
24683  * Host can enter either D0-WOW or WOW mode, but NOT both at same time
24684  * Decision to enter D0-WOW or WOW is based on active interfaces
24685  *
24686  */
24687 typedef struct {
24688     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param  */
24689     A_UINT32 enable;     /* 1 = enable, 0 = disable */
24690 } wmi_d0_wow_enable_disable_cmd_fixed_param;
24691 
24692 
24693 typedef enum extend_wow_type_e {
24694     EXTWOW_TYPE_APP_TYPE1,   /* extend wow type: only enable wakeup for app type1 */
24695     EXTWOW_TYPE_APP_TYPE2,   /* extend wow type: only enable wakeup for app type2 */
24696     EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
24697     EXTWOW_TYPE_APP_PULSETEST,
24698     EXTWOW_DISABLED = 255,
24699 } EXTWOW_TYPE;
24700 
24701 typedef struct {
24702     A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param  */
24703     A_UINT32 vdev_id;
24704     A_UINT32 type;
24705     A_UINT32 wakeup_pin_num;
24706     A_UINT32 swol_pulsetest_type;
24707     A_UINT32 swol_pulsetest_application;
24708 } wmi_extwow_enable_cmd_fixed_param;
24709 
24710 #define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
24711 #define SWOL_INDOOR_KEY_LEN 16
24712 
24713 typedef struct {
24714     A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param  */
24715     A_UINT32 vdev_id;
24716     wmi_mac_addr  wakee_mac;
24717     A_UINT8  ident[8];
24718     A_UINT8  passwd[16];
24719     A_UINT32 ident_len;
24720     A_UINT32 passwd_len;
24721 
24722     /* indoor check parameters */
24723     /* key for mac addresses specified in swol_indoor_key_mac
24724      * Big-endian hosts need to byte-swap the bytes within each 4-byte
24725      * segment of this array, so the bytes will return to their original
24726      * order when the entire WMI message contents are byte-swapped to
24727      * convert from big-endian to little-endian format.
24728      */
24729     A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
24730     /* key length for specified mac address index
24731      * Big-endian hosts need to byte-swap the bytes within each 4-byte
24732      * segment of this array, so the bytes will return to their original
24733      * order when the entire WMI message contents are byte-swapped to
24734      * convert from big-endian to little-endian format.
24735      */
24736     A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
24737     /* mac address array allowed to wakeup host*/
24738     wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
24739     /* app mask for the mac addresses specified in swol_indoor_key_mac */
24740     A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
24741     A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
24742     A_UINT32 swol_indoor_pw_check;    /* whether to check password */
24743     A_UINT32 swol_indoor_pattern;     /* wakeup pattern */
24744     A_UINT32 swol_indoor_exception;   /* wakeup when exception happens */
24745     A_UINT32 swol_indoor_exception_app;
24746     A_UINT32 swol_assist_enable;      /* whether to enable IoT mode */
24747 } wmi_extwow_set_app_type1_params_cmd_fixed_param;
24748 
24749 typedef struct {
24750     A_UINT32 tlv_header;  /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param  */
24751     A_UINT32 vdev_id;
24752 
24753     A_UINT8  rc4_key[16];
24754     A_UINT32 rc4_key_len;
24755 
24756     /** ip header parameter */
24757     A_UINT32 ip_id;         /* NC id */
24758     A_UINT32 ip_device_ip;  /* NC IP address */
24759     A_UINT32 ip_server_ip;  /* Push server IP address */
24760 
24761     /** tcp header parameter */
24762     A_UINT16 tcp_src_port;  /* NC TCP port */
24763     A_UINT16 tcp_dst_port;  /* Push server TCP port */
24764     A_UINT32 tcp_seq;
24765     A_UINT32 tcp_ack_seq;
24766 
24767     A_UINT32 keepalive_init;  /* Initial ping interval */
24768     A_UINT32 keepalive_min;   /* Minimum ping interval */
24769     A_UINT32 keepalive_max;   /* Maximum ping interval */
24770     A_UINT32 keepalive_inc;   /* Increment of ping interval */
24771 
24772     wmi_mac_addr gateway_mac;
24773     A_UINT32 tcp_tx_timeout_val;
24774     A_UINT32 tcp_rx_timeout_val;
24775 
24776     /** add extra parameter for backward-compatible */
24777     /*
24778      * For all byte arrays, natural order is used.  E.g.
24779      * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
24780      * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
24781      */
24782 
24783     /* used to encrypt transmit packet such as keep-alive */
24784     A_UINT8  rc4_write_sandbox[256];
24785     A_UINT32 rc4_write_x;
24786     A_UINT32 rc4_write_y;
24787 
24788     /* used to decrypt received packet such as wow data */
24789     A_UINT8  rc4_read_sandbox[256];
24790     A_UINT32 rc4_read_x;
24791     A_UINT32 rc4_read_y;
24792 
24793     /* used to calculate HMAC hash for transmit packet such as keep-alive */
24794     A_UINT8  ssl_write_seq[8];
24795     A_UINT8  ssl_sha1_write_key[64];
24796     A_UINT32 ssl_sha1_write_key_len;
24797 
24798     /* used to calculate HAMC hash for receive packet such as wow data */
24799     A_UINT8  ssl_read_seq[8];
24800     A_UINT8  ssl_sha1_read_key[64];
24801     A_UINT32 ssl_sha1_read_key_len;
24802 
24803     /* optional element for specifying TCP options data to include in
24804      * transmit packets such as keep-alive
24805      */
24806     A_UINT32 tcp_options_len;
24807     A_UINT8  tcp_options[40];
24808 
24809     A_UINT32 async_id; /* keep-alive request id */
24810 } wmi_extwow_set_app_type2_params_cmd_fixed_param;
24811 
24812 
24813 #define WMI_RXERR_CRC               0x01    /* CRC error on frame */
24814 #define WMI_RXERR_DECRYPT           0x08    /* non-Michael decrypt error */
24815 #define WMI_RXERR_MIC               0x10    /* Michael MIC decrypt error */
24816 #define WMI_RXERR_KEY_CACHE_MISS    0x20    /* No/incorrect key matter in h/w */
24817 #define WMI_RX_OFFLOAD_MON_MODE     0x40    /* Offload dropped mgmt pkt's for only in capture mode*/
24818 #define WMI_RXERR_PN                0x80    /* Invalid PN number on frame */
24819 
24820 typedef enum {
24821     PKT_PWR_SAVE_PAID_MATCH =           0x00000001,
24822     PKT_PWR_SAVE_GID_MATCH =            0x00000002,
24823     PKT_PWR_SAVE_EARLY_TIM_CLEAR =      0x00000004,
24824     PKT_PWR_SAVE_EARLY_DTIM_CLEAR =     0x00000008,
24825     PKT_PWR_SAVE_EOF_PAD_DELIM =        0x00000010,
24826     PKT_PWR_SAVE_MACADDR_MISMATCH =     0x00000020,
24827     PKT_PWR_SAVE_DELIM_CRC_FAIL =       0x00000040,
24828     PKT_PWR_SAVE_GID_NSTS_ZERO =        0x00000080,
24829     PKT_PWR_SAVE_RSSI_CHECK =           0x00000100,
24830     PKT_PWR_SAVE_5G_EBT =               0x00000200,
24831     PKT_PWR_SAVE_2G_EBT =               0x00000400,
24832     PKT_PWR_SAVE_BSS_COLOR_MISMATCH =   0x00000800,
24833     PKT_PWR_SAVE_UL_FLAG =              0x00001000,
24834     PKT_PWR_SAVE_STA_ID_MISMATCH =      0x00002000,
24835     PKT_PWR_SAVE_MACADDR_MISMATCH_FCS = 0x00004000,
24836 
24837     PKT_PWR_SAVE_ENABLE =               0x80000000,
24838 } WMI_PKT_PWR_SAVE_TYPE;
24839 
24840 typedef struct {
24841     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
24842     A_UINT32 num_data; /** length in byte of data[]. */
24843     /** pdev_id for identifying the MAC
24844      * See macros starting with WMI_PDEV_ID_ for values.
24845      */
24846     A_UINT32 pdev_id;
24847 /* This structure is used to send Factory Test Mode [FTM] command
24848  * from host to firmware for integrated chips which are binary blobs.
24849  * Following this structure is the TLV:
24850  *     A_UINT8 data[]; <-- length in byte given by field num_data.
24851  */
24852 } wmi_ftm_intg_cmd_fixed_param;
24853 
24854 typedef struct {
24855     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
24856     A_UINT32 num_data; /** length in byte of data[]. */
24857 /* This structure is used to receive Factory Test Mode [FTM] event
24858  * from firmware to host for integrated chips which are binary blobs.
24859  * Following this structure is the TLV:
24860  *     A_UINT8 data[]; <-- length in byte given by field num_data.
24861  */
24862 } wmi_ftm_intg_event_fixed_param;
24863 
24864 #define WMI_MAX_NS_OFFLOADS           2
24865 #define WMI_MAX_ARP_OFFLOADS          2
24866 
24867 #define WMI_ARPOFF_FLAGS_VALID              (1 << 0)    /* the tuple entry is valid */
24868 #define WMI_ARPOFF_FLAGS_MAC_VALID          (1 << 1)    /* the target mac address is valid */
24869 #define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID    (1 << 2)    /* remote IP field is valid */
24870 
24871 typedef struct {
24872     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
24873     A_UINT32 flags; /* flags */
24874     A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node*/
24875     A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
24876     wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
24877 } WMI_ARP_OFFLOAD_TUPLE;
24878 
24879 #define WMI_NSOFF_FLAGS_VALID           (1 << 0)    /* the tuple entry is valid */
24880 #define WMI_NSOFF_FLAGS_MAC_VALID       (1 << 1)    /* the target mac address is valid */
24881 #define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2)    /* remote IP field is valid */
24882 #define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3)    /* whether the configured IPv6 address is anycast */
24883 
24884 #define WMI_NSOFF_MAX_TARGET_IPS    2
24885 
24886 typedef struct {
24887     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
24888     A_UINT32 flags; /* flags */
24889     /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
24890     WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node  */
24891     WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
24892     WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
24893     wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
24894 } WMI_NS_OFFLOAD_TUPLE;
24895 
24896 typedef struct {
24897     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
24898     A_UINT32 flags;
24899     A_UINT32 vdev_id;
24900     A_UINT32 num_ns_ext_tuples;
24901 /* Following this structure are the TLVs:
24902  *     WMI_NS_OFFLOAD_TUPLE  ns_tuples[WMI_MAX_NS_OFFLOADS];
24903  *     WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
24904  *     WMI_NS_OFFLOAD_TUPLE  ns_ext_tuples[]; <-- size based on num_ns_ext_tuples
24905  */
24906 } WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
24907 
24908 
24909 typedef struct {
24910     A_UINT32 tlv_header;
24911     A_UINT32 vdev_id;
24912     A_UINT32 pattern_id;
24913     A_UINT32 timeout;
24914     A_UINT32 length;
24915     /*Following this would be the pattern
24916        A_UINT8 pattern[] of length specified by length
24917        field in the structure.*/
24918 } WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
24919 
24920 
24921 typedef struct {
24922     A_UINT32 tlv_header;
24923     A_UINT32 vdev_id;
24924     A_UINT32 pattern_id;
24925 } WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
24926 
24927 typedef struct {
24928     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
24929     /** unique id identifying the VDEV, generated by the caller */
24930     A_UINT32 vdev_id;
24931     /** peer MAC address */
24932     wmi_mac_addr peer_macaddr;
24933     /** Tid number */
24934     A_UINT32 tid;
24935     /** Initiator (1) or Responder (0) for this aggregation */
24936     A_UINT32 initiator;
24937     /** size of the negotiated window */
24938     A_UINT32 window_size;
24939     /** starting sequence number (only valid for initiator) */
24940     A_UINT32 ssn;
24941     /** timeout field represents the time to wait for Block Ack in
24942      *   initiator case and the time to wait for BAR in responder
24943      *   case. 0 represents no timeout. */
24944     A_UINT32 timeout;
24945     /* BA policy: immediate ACK (0) or delayed ACK (1) */
24946     A_UINT32 policy;
24947 } wmi_peer_tid_addba_cmd_fixed_param;
24948 
24949 typedef struct {
24950     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
24951     /** unique id identifying the VDEV, generated by the caller */
24952     A_UINT32 vdev_id;
24953     /** peer MAC address */
24954     wmi_mac_addr peer_macaddr;
24955     /** Tid number */
24956     A_UINT32 tid;
24957     /** Initiator (1) or Responder (0) for this aggregation */
24958     A_UINT32 initiator;
24959 } wmi_peer_tid_delba_cmd_fixed_param;
24960 
24961 typedef struct {
24962     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
24963     /** unique id identifying the VDEV, generated by the caller */
24964     A_UINT32 vdev_id;
24965     /** peer MAC address */
24966     wmi_mac_addr peer_macaddr;
24967     /** Tid number */
24968     A_UINT32 tid;
24969     /** Event status */
24970     A_UINT32 status;
24971 } wmi_tx_addba_complete_event_fixed_param;
24972 
24973 typedef struct {
24974     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
24975     /** unique id identifying the VDEV, generated by the caller */
24976     A_UINT32 vdev_id;
24977     /** peer MAC address */
24978     wmi_mac_addr peer_macaddr;
24979     /** Tid number */
24980     A_UINT32 tid;
24981     /** Event status */
24982     A_UINT32 status;
24983 } wmi_tx_delba_complete_event_fixed_param;
24984 
24985 
24986 
24987 /*
24988  * Structure to request sequence numbers for a given
24989  * peer station on different TIDs. The TIDs are
24990  * indicated in the tidBitMap, tid 0 would
24991  * be represented by LSB bit 0. tid 1 would be
24992  * represented by LSB bit 1 etc.
24993  * The target will retrieve the current sequence
24994  * numbers for the peer on all the TIDs requested
24995  * and send back a response in a WMI event.
24996  */
24997 typedef struct
24998 {
24999     A_UINT32    tlv_header;  /* TLV tag and len; tag equals
25000                                 WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
25001     wmi_mac_addr peer_macaddr;
25002     A_UINT32 tidBitmap;
25003 } wmi_ba_req_ssn;
25004 
25005 typedef struct {
25006     A_UINT32 tlv_header; /* TLV tag and len; tag equals
25007      WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
25008     /** unique id identifying the VDEV, generated by the caller */
25009     A_UINT32 vdev_id;
25010     /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
25011     A_UINT32 num_ba_req_ssn;
25012 /* Following this struct are the TLV's:
25013  *     wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
25014  */
25015 } wmi_ba_req_ssn_cmd_fixed_param;
25016 
25017 /*
25018  * Max transmit categories
25019  *
25020  * Note: In future if we need to increase WMI_MAX_TC definition
25021  * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
25022  */
25023 #define WMI_MAX_TC  8
25024 
25025 /*
25026  * Structure to send response sequence numbers
25027  * for a give peer and tidmap.
25028  */
25029 typedef struct
25030 {
25031     A_UINT32    tlv_header;  /* TLV tag and len; tag equals
25032                                 WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
25033     wmi_mac_addr peer_macaddr;
25034     /* A boolean to indicate if ssn is present */
25035     A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
25036     /* The ssn from target, valid only if
25037      * ssn_present_for_tid[tidn] equals 1
25038      */
25039     A_UINT32 ssn_for_tid[WMI_MAX_TC];
25040 } wmi_ba_event_ssn;
25041 
25042 typedef struct {
25043     A_UINT32 tlv_header; /* TLV tag and len; tag equals
25044      WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
25045     /** unique id identifying the VDEV, generated by the caller */
25046     A_UINT32 vdev_id;
25047     /** Event status, success or failure of the overall operation */
25048     A_UINT32 status;
25049     /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
25050     A_UINT32 num_ba_event_ssn;
25051 /* Following this struct are the TLV's:
25052  *     wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
25053  */
25054 } wmi_ba_rsp_ssn_event_fixed_param;
25055 
25056 
25057 enum wmi_aggr_state_req_type {
25058 
25059     WMI_DISABLE_AGGREGATION,
25060     WMI_ENABLE_AGGREGATION
25061 };
25062 
25063 /*
25064  * This event is generated by the COEX module
25065  * when esco call is begins the coex module in fw generated this event to host to
25066  * disable the RX aggregation and after completion of the esco call fw will indicate to
25067  * enable back the Rx aggregation .
25068 */
25069 
25070 typedef struct {
25071     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
25072     /** unique id identifying the VDEV, generated by the caller */
25073     A_UINT32 vdev_id;
25074    /** req_type  contains values from enum
25075      *  wmi_aggr_state_req_type; 0 (disable) 1(enable) */
25076     A_UINT32  req_type;
25077 } wmi_aggr_state_trig_event_fixed_param;
25078 
25079 typedef struct {
25080     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
25081     /** unique id identifying the VDEV, generated by the caller */
25082     A_UINT32 vdev_id;
25083     /** MAC address used for installing   */
25084     wmi_mac_addr peer_macaddr;
25085     /** key index */
25086     A_UINT32 key_ix;
25087     /** key flags */
25088     A_UINT32 key_flags;
25089     /** Event status */
25090     A_UINT32 status;
25091 } wmi_vdev_install_key_complete_event_fixed_param;
25092 
25093 typedef enum {
25094     /* CSA_SA_QUERY_TIMEOUT:
25095      * Disconnect due to SA query timeout after moving to new channel
25096      * due to CSA in OCV enabled case.
25097      */
25098     WLAN_DISCONNECT_REASON_CSA_SA_QUERY_TIMEOUT = 1,
25099     /* MOVE_TO_CELLULAR:
25100      * Disconnect from WiFi to move to cellular
25101      */
25102     WLAN_DISCONNECT_REASON_MOVE_TO_CELLULAR,
25103 } WMI_VDEV_DISCONNECT_REASON_ID;
25104 
25105 typedef struct {
25106     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_disconnect_event_fixed_param */
25107     /** unique id identifying the VDEV, generated by the caller */
25108     A_UINT32 vdev_id;
25109     /* Disconnect reason from WMI_VDEV_DISCONNECT_REASON_ID */
25110     A_UINT32 reason;
25111 } wmi_vdev_disconnect_event_fixed_param;
25112 
25113 typedef enum _WMI_NLO_AUTH_ALGORITHM {
25114     WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
25115     WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
25116     WMI_NLO_AUTH_ALGO_WPA = 3,
25117     WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
25118     WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
25119     WMI_NLO_AUTH_ALGO_RSNA = 6,
25120     WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
25121 } WMI_NLO_AUTH_ALGORITHM;
25122 
25123 typedef enum _WMI_NLO_CIPHER_ALGORITHM {
25124     WMI_NLO_CIPHER_ALGO_NONE = 0x00,
25125     WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
25126     WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
25127     WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
25128     WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
25129     WMI_NLO_CIPHER_ALGO_BIP = 0x06,
25130     WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
25131     WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
25132     WMI_NLO_CIPHER_ALGO_WEP = 0x101,
25133 } WMI_NLO_CIPHER_ALGORITHM;
25134 
25135 /* SSID broadcast  type passed in NLO params */
25136 typedef enum _WMI_NLO_SSID_BcastNwType
25137 {
25138   WMI_NLO_BCAST_UNKNOWN      = 0,
25139   WMI_NLO_BCAST_NORMAL       = 1,
25140   WMI_NLO_BCAST_HIDDEN       = 2,
25141 } WMI_NLO_SSID_BcastNwType;
25142 
25143 #define WMI_NLO_MAX_SSIDS    16
25144 #define WMI_NLO_MAX_CHAN     48
25145 
25146 #define WMI_NLO_CONFIG_STOP                             (0x1 << 0)
25147 #define WMI_NLO_CONFIG_START                            (0x1 << 1)
25148 #define WMI_NLO_CONFIG_RESET                            (0x1 << 2)
25149 #define WMI_NLO_CONFIG_SLOW_SCAN                        (0x1 << 4)
25150 #define WMI_NLO_CONFIG_FAST_SCAN                        (0x1 << 5)
25151 #define WMI_NLO_CONFIG_SSID_HIDE_EN                     (0x1 << 6)
25152 
25153 /* This bit is used to indicate if EPNO Profile is enabled */
25154 #define WMI_NLO_CONFIG_ENLO                             (0x1 << 7)
25155 #define WMI_NLO_CONFIG_SCAN_PASSIVE                     (0x1 << 8)
25156 #define WMI_NLO_CONFIG_ENLO_RESET                       (0x1 << 9)
25157 #define WMI_NLO_CONFIG_SPOOFED_MAC_IN_PROBE_REQ         (0x1 << 10)
25158 #define WMI_NLO_CONFIG_RANDOM_SEQ_NO_IN_PROBE_REQ       (0x1 << 11)
25159 #define WMI_NLO_CONFIG_ENABLE_IE_WHITELIST_IN_PROBE_REQ (0x1 << 12)
25160 #define WMI_NLO_CONFIG_ENABLE_CNLO_RSSI_CONFIG          (0x1 << 13)
25161 
25162 /*
25163  * This bit is used to indicate if MRSNO IE parsing for WiFi6 standard
25164  * is enabled.
25165  */
25166 #define WMI_NLO_CONFIG_ENABLE_MRSNO_WIFI6               (0x1 << 14)
25167 /*
25168  * This bit is used to indicate if MRSNO IE parsing for WiFi7 standard
25169  * is enabled.
25170  */
25171 #define WMI_NLO_CONFIG_ENABLE_MRSNO_WIFI7               (0x1 << 15)
25172 
25173 /* Whether directed scan needs to be performed (for hidden SSIDs) */
25174 #define WMI_ENLO_FLAG_DIRECTED_SCAN      1
25175 /* Whether PNO event shall be triggered if the network is found on A band */
25176 #define WMI_ENLO_FLAG_A_BAND             2
25177 /* Whether PNO event shall be triggered if the network is found on G band */
25178 #define WMI_ENLO_FLAG_G_BAND             4
25179 /* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
25180 #define WMI_ENLO_FLAG_STRICT_MATCH       8
25181 
25182 /* Code for matching the beacon AUTH IE - additional codes TBD */
25183 /* open */
25184 #define WMI_ENLO_AUTH_CODE_OPEN  1
25185 /* WPA_PSK or WPA2PSK */
25186 #define WMI_ENLO_AUTH_CODE_PSK   2
25187 /* any EAPOL */
25188 #define WMI_ENLO_AUTH_CODE_EAPOL 4
25189 
25190 /* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
25191 typedef struct wmi_nlo_ssid_param
25192 {
25193     A_UINT32 valid;
25194     wmi_ssid ssid;
25195 } wmi_nlo_ssid_param;
25196 
25197 /* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
25198 typedef struct wmi_nlo_enc_param
25199 {
25200     A_UINT32 valid;
25201     A_UINT32 enc_type;
25202 } wmi_nlo_enc_param;
25203 
25204 /* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
25205 typedef struct wmi_nlo_auth_param
25206 {
25207     A_UINT32 valid;
25208     A_UINT32 auth_type;
25209 } wmi_nlo_auth_param;
25210 
25211 /* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
25212 typedef struct wmi_nlo_bcast_nw_param
25213 {
25214     A_UINT32 valid;
25215 /* If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value should be true/false
25216 Otherwise EPNO is enabled. bcast_nw_type would be used as a bit flag contains WMI_ENLO_FLAG_XXX */
25217     A_UINT32 bcast_nw_type;
25218 } wmi_nlo_bcast_nw_param;
25219 
25220 /* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
25221 typedef struct wmi_nlo_rssi_param
25222 {
25223     A_UINT32 valid;
25224     A_INT32 rssi;
25225 } wmi_nlo_rssi_param;
25226 
25227 typedef struct nlo_configured_parameters {
25228     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
25229     wmi_nlo_ssid_param ssid;
25230     wmi_nlo_enc_param enc_type;
25231     wmi_nlo_auth_param auth_type;
25232     wmi_nlo_rssi_param rssi_cond;
25233     wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
25234 } nlo_configured_parameters;
25235 
25236 
25237 /* Support channel prediction for PNO scan after scanning top_k_num channels
25238  * if stationary_threshold is met.
25239  */
25240 typedef struct nlo_channel_prediction_cfg {
25241     A_UINT32 tlv_header;
25242     /* Enable or disable this feature. */
25243     A_UINT32 enable;
25244     /* Top K channels will be scanned before deciding whether to further scan
25245      * or stop. Minimum value is 3 and maximum is 5. */
25246     A_UINT32 top_k_num;
25247     /* Preconfigured stationary threshold.
25248      * Lesser value means more conservative. Bigger value means more aggressive.
25249      * Maximum is 100 and minimum is 0. */
25250     A_UINT32 stationary_threshold;
25251     /* Periodic full channel scan in milliseconds unit.
25252      * After full_scan_period_ms since last full scan, channel prediction
25253      * scan is suppressed and will do full scan.
25254      * This is to help detecting sudden AP power-on or -off. Value 0 means no
25255      * full scan at all (not recommended).
25256      */
25257     A_UINT32 full_scan_period_ms;
25258 } nlo_channel_prediction_cfg;
25259 
25260 typedef struct enlo_candidate_score_params_t {
25261     A_UINT32 tlv_header;   /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param */
25262     A_INT32 min5GHz_rssi;  /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
25263     A_INT32 min24GHz_rssi; /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
25264     A_UINT32 initial_score_max; /* the maximum score that a network can have before bonuses */
25265     /* current_connection_bonus:
25266      * only report when there is a network's score this much higher
25267      * than the current connection
25268      */
25269     A_UINT32 current_connection_bonus;
25270     A_UINT32 same_network_bonus; /* score bonus for all networks with the same network flag */
25271     A_UINT32 secure_bonus; /* score bonus for networks that are not open */
25272     A_UINT32 band5GHz_bonus; /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
25273 } enlo_candidate_score_params;
25274 
25275 typedef struct connected_nlo_bss_band_rssi_pref_t {
25276     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_bss_band_rssi_pref */
25277     /** band which needs to get preference over other band - see wmi_set_vdev_ie_band enum */
25278     A_UINT32 band;
25279     /* Amount of RSSI preference (in dB) that can be given to band (mentioned above) over other band */
25280     A_INT32  rssi_pref;
25281 } connected_nlo_bss_band_rssi_pref;
25282 
25283 typedef struct connected_nlo_rssi_params_t {
25284     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_rssi_params */
25285     /* Relative RSSI threshold (in dB) by which new BSS should have better RSSI than
25286      * the current connected BSS.
25287      */
25288     A_INT32  relative_rssi;
25289     /* The amount of RSSI preference (in dB) that can be given to a 5G BSS over 2.4G BSS. */
25290     A_INT32  relative_rssi_5g_pref;
25291 } connected_nlo_rssi_params;
25292 
25293 typedef struct wmi_nlo_config {
25294     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
25295     A_UINT32 flags;
25296     A_UINT32 vdev_id;
25297     A_UINT32 fast_scan_max_cycles;
25298     A_UINT32 active_dwell_time;
25299     A_UINT32 passive_dwell_time; /* PDT in msecs */
25300     A_UINT32 probe_bundle_size;
25301     A_UINT32 rest_time; /* ART = IRT */
25302     A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
25303     A_UINT32 scan_backoff_multiplier; /* SBM */
25304     A_UINT32 fast_scan_period; /* SCBM */
25305     A_UINT32 slow_scan_period; /* specific to windows */
25306     A_UINT32 no_of_ssids;
25307     A_UINT32 num_of_channels;
25308     A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
25309     /** MAC Address to use in Probe Req as SA **/
25310     wmi_mac_addr mac_addr;
25311     /** Mask on which MAC has to be randomized **/
25312     wmi_mac_addr mac_mask;
25313     /** IE bitmap to use in Probe Req **/
25314     A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
25315     /** Number of vendor OUIs. In the TLV vendor_oui[] **/
25316     A_UINT32 num_vendor_oui;
25317     /** Number of connected NLO band preferences **/
25318     A_UINT32 num_cnlo_band_pref;
25319     /** dwell time in msec on active 2GHz channels */
25320     A_UINT32 active_dwell_time_2ghz;
25321     /** dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked as an active channel */
25322     A_UINT32 active_dwell_time_6ghz;
25323     /** dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked as a passive channel */
25324     A_UINT32 passive_dwell_time_6ghz;
25325 /* The TLVs will follow.
25326  * nlo_configured_parameters nlo_list[];
25327  * A_UINT32 channel_list[num_of_channels]; // in MHz
25328  *     channel_list:
25329  *     If FW supports WMI_SERVICE_PNO_SCAN_CONFIG_PER_CHANNEL,
25330  *         then channel_list may fill the upper 12 bits with channel flags,
25331  *         while using only the lower 20 bits for channel frequency.
25332  *         Check WMI_SCAN_CHANNEL_FLAG macros for the channel flags
25333  *     If FW doesn't support WMI_SERVICE_PNO_SCAN_CONFIG_PER_CHANNEL,
25334  *         then channel_list only holds the frequency value
25335  * nlo_channel_prediction_cfg ch_prediction_cfg;
25336  * enlo_candidate_score_params candidate_score_params;
25337  * wmi_vendor_oui vendor_oui[num_vendor_oui];
25338  * connected_nlo_rssi_params cnlo_rssi_params;
25339  * connected_nlo_bss_band_rssi_pref cnlo_bss_band_rssi_pref[num_cnlo_band_pref];
25340  * A_UINT32 preferred_chan_list[]; // in MHz
25341  */
25342 } wmi_nlo_config_cmd_fixed_param;
25343 
25344 typedef struct wmi_nlo_event
25345 {
25346     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
25347     A_UINT32 vdev_id;
25348 } wmi_nlo_event;
25349 
25350 
25351 /* WMI_PASSPOINT_CONFIG_SET
25352  * Sets a list for passpoint networks for PNO purposes;
25353  * it should be matched against any passpoint networks found
25354  * during regular PNO scan.
25355  */
25356 #define WMI_PASSPOINT_CONFIG_SET       (0x1 << 0)
25357 /* WMI_PASSPOINT_CONFIG_RESET
25358  * Reset passpoint network list -
25359  * no Passpoint networks should be matched after this.
25360  */
25361 #define WMI_PASSPOINT_CONFIG_RESET     (0x1 << 1)
25362 
25363 #define PASSPOINT_REALM_LEN                  256
25364 #define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN  5
25365 #define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM  16
25366 #define PASSPOINT_PLMN_ID_LEN                3
25367 #define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
25368     (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
25369 
25370 /*
25371  * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
25372  *     A_UINT8 realm[PASSPOINT_REALM_LEN]
25373  * array will end on a 4-byte boundary.
25374  * (This 4-byte alignment simplifies endianness-correction byte swapping.)
25375  */
25376 A_COMPILE_TIME_ASSERT(
25377     check_passpoint_realm_size,
25378     (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
25379 
25380 /*
25381  * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
25382  * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
25383  * roaming_consortium_ids array below will end on a 4-byte boundary.
25384  * (This 4-byte alignment simplifies endianness-correction byte swapping.)
25385  */
25386 A_COMPILE_TIME_ASSERT(
25387     check_passpoint_roaming_consortium_ids_size,
25388     ((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
25389 
25390 /* wildcard ID to allow an action (reset) to apply to all networks */
25391 #define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
25392 typedef struct wmi_passpoint_config {
25393     A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
25394     /* (network) id
25395      * identifier of the matched network, report this in event
25396      * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
25397      * that indicates the action should be applied to all networks.
25398      * Currently, the only action that is applied to all networks is "reset".
25399      * If a non-wildcard ID is specified, that particular network is configured.
25400      * If a wildcard ID is specified, all networks are reset.
25401      */
25402     A_UINT32 id;
25403     A_UINT32 req_id;
25404     A_UINT8  realm[PASSPOINT_REALM_LEN]; /*null terminated UTF8 encoded realm, 0 if unspecified*/
25405     A_UINT8  roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN]; /*roaming consortium ids to match, 0s if unspecified*/
25406                                                                                                               /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
25407     A_UINT8  plmn[PASSPOINT_PLMN_ID_ALLOC_LEN]; /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
25408 } wmi_passpoint_config_cmd_fixed_param;
25409 
25410 typedef struct {
25411     A_UINT32 tlv_header;    /* TLV tag and len; tag equals wmi_passpoint_event_hdr */
25412     A_UINT32 id;            /* identifier of the matched network */
25413     A_UINT32 vdev_id;
25414     A_UINT32 timestamp;     /* time since boot (in microsecond) when the result was retrieved*/
25415     wmi_ssid ssid;
25416     wmi_mac_addr    bssid;  /* bssid of the network */
25417     A_UINT32 channel_mhz;   /* channel frequency in MHz */
25418     A_UINT32 rssi;          /* RSSI value */
25419     A_UINT32 rtt;           /* timestamp in nanoseconds*/
25420     A_UINT32 rtt_sd;        /* standard deviation in rtt */
25421     A_UINT32 beacon_period; /* beacon advertised in the beacon */
25422     A_UINT32 capability;    /* capabilities advertised in the beacon */
25423     A_UINT32 ie_length;     /* size of the ie_data blob */
25424     A_UINT32 anqp_length;   /* length of ANQP blob */
25425 /* Following this structure is the byte stream of ie data of length ie_buf_len:
25426  *  A_UINT8 ie_data[]; <-- length in byte given by field ie_length, blob of ie data in beacon
25427  *  A_UINT8 anqp_ie[]; <-- length in byte given by field anqp_len, blob of anqp data of IE
25428  *  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.
25429  */
25430 } wmi_passpoint_event_hdr;
25431 
25432 
25433 #define GTK_OFFLOAD_OPCODE_MASK             0xFF000000
25434 /** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
25435 #define GTK_OFFLOAD_ENABLE_OPCODE           0x01000000
25436 /** Disable GTK offload */
25437 #define GTK_OFFLOAD_DISABLE_OPCODE          0x02000000
25438 /** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
25439 #define GTK_OFFLOAD_REQUEST_STATUS_OPCODE   0x04000000
25440 enum wmi_chatter_mode {
25441     /* Chatter enter/exit happens
25442      * automatically based on preset
25443      * params
25444      */
25445     WMI_CHATTER_MODE_AUTO,
25446     /* Chatter enter is triggered
25447      * manually by the user
25448      */
25449     WMI_CHATTER_MODE_MANUAL_ENTER,
25450     /* Chatter exit is triggered
25451      * manually by the user
25452      */
25453     WMI_CHATTER_MODE_MANUAL_EXIT,
25454     /* Placeholder max value, always last*/
25455     WMI_CHATTER_MODE_MAX
25456 };
25457 
25458 enum wmi_chatter_query_type {
25459     /*query coalescing filter match counter*/
25460     WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
25461     WMI_CHATTER_QUERY_MAX
25462 };
25463 
25464 typedef struct {
25465     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param  */
25466     A_UINT32 chatter_mode;
25467 } wmi_chatter_set_mode_cmd_fixed_param;
25468 
25469 /** maximum number of filter supported*/
25470 #define CHATTER_MAX_COALESCING_RULES     11
25471 /** maximum number of field tests per filter*/
25472 #define CHATTER_MAX_FIELD_TEST           5
25473 /** maximum field length in number of DWORDS*/
25474 #define CHATTER_MAX_TEST_FIELD_LEN32     2
25475 
25476 /** field test kinds*/
25477 #define CHATTER_COALESCING_TEST_EQUAL            1
25478 #define CHATTER_COALESCING_TEST_MASKED_EQUAL     2
25479 #define CHATTER_COALESCING_TEST_NOT_EQUAL        3
25480 
25481 /** packet type*/
25482 #define CHATTER_COALESCING_PKT_TYPE_UNICAST      (1 << 0)
25483 #define CHATTER_COALESCING_PKT_TYPE_MULTICAST    (1 << 1)
25484 #define CHATTER_COALESCING_PKT_TYPE_BROADCAST    (1 << 2)
25485 
25486 /** coalescing field test*/
25487 typedef struct _chatter_pkt_coalescing_hdr_test {
25488     /** offset from start of mac header, for windows native wifi host driver
25489      * should assume standard 802.11 frame format without QoS info and address4
25490      * FW would account for any non-stand fields for final offset value.
25491      */
25492     A_UINT32 offset;
25493     A_UINT32 length; /* length of test field*/
25494     A_UINT32 test; /*equal, not equal or masked equal*/
25495     A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream*/
25496     A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream*/
25497 } chatter_pkt_coalescing_hdr_test;
25498 
25499 /** packet coalescing filter*/
25500 typedef struct _chatter_pkt_coalescing_filter {
25501     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
25502     A_UINT32 filter_id; /* unique id assigned by OS */
25503     A_UINT32 max_coalescing_delay; /* max milliseconds 1st pkt can be held */
25504     A_UINT32 pkt_type; /* unicast/multicast/broadcast */
25505     A_UINT32 num_of_test_field; /* number of field test in table */
25506     chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /* field test tbl */
25507 } chatter_pkt_coalescing_filter;
25508 
25509 /** packet coalescing filter add command*/
25510 typedef struct {
25511     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
25512     A_UINT32 num_of_filters;
25513 /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
25514  chatter_pkt_coalescing_filter rx_filter[1];*/
25515 } wmi_chatter_coalescing_add_filter_cmd_fixed_param;
25516 /** packet coalescing filter delete command*/
25517 typedef struct {
25518     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
25519     A_UINT32 filter_id; /*filter id which will be deleted*/
25520 } wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
25521 /** packet coalescing query command*/
25522 typedef struct {
25523     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
25524     A_UINT32 type; /*type of query*/
25525 } wmi_chatter_coalescing_query_cmd_fixed_param;
25526 /** chatter query reply event*/
25527 typedef struct {
25528     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param  */
25529     A_UINT32 type; /*query type*/
25530     A_UINT32 filter_match_cnt; /*coalescing filter match counter*/
25531 } wmi_chatter_query_reply_event_fixed_param;
25532 
25533 /* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
25534  * cannot be changed without breaking WMI compatibility. */
25535 #define GTK_OFFLOAD_KEK_BYTES       16
25536 #define GTK_OFFLOAD_KCK_BYTES       16
25537 /* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
25538 #define GTK_REPLAY_COUNTER_BYTES    8
25539 #define WMI_MAX_KEY_LEN             32
25540 #define IGTK_PN_SIZE                6
25541 
25542 typedef struct {
25543     /**
25544      * WMITLV_TAG_STRUC_wmi_roam_ml_key_material_param will exist when link is not created by fw.
25545      */
25546 
25547     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ml_link_key_material_param */
25548     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 */
25549     /** key index */
25550     A_UINT32 key_ix;
25551     /** key cipher, defined as WMI_CIPHER_ */
25552     A_UINT32 key_cipher;
25553     A_UINT8  pn[WMI_MAX_PN_LEN];
25554     A_UINT8  key_buff[WMI_MAX_KEY_LEN];
25555     /*
25556      * When link_id is 0xf, this field will be MLD address.
25557      * Otherwise, it will be bssid which specified with link_id.
25558      */
25559     wmi_mac_addr mac_addr;
25560     A_UINT32 key_len; /* number of valid bytes within key_buff */
25561     A_UINT32 key_flags;
25562 } wmi_roam_ml_key_material_param;
25563 
25564 typedef struct {
25565     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
25566     A_UINT32 vdev_id; /** unique id identifying the VDEV */
25567     A_UINT32 flags; /* status flags */
25568     A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
25569     /*
25570      * As with all WMI messages, this message uses little-endian byte
25571      * ordering within each A_UINT32 field.
25572      * If a big-endian host is using automatic swapping of the bytes within
25573      * each 4-byte A_UINT32 to automatically correct the endianness of the
25574      * A_UINT32 fields as the message is uploaded from target --> host, the
25575      * big-endian host will have to undo the automatic byte swapping for the
25576      * below A_UINT8 fields, to restore them to their original order.
25577      */
25578     A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
25579     A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
25580     A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
25581     A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
25582     A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
25583     A_UINT8 gtk_keyIndex; /* GTK key index */
25584     A_UINT8 gtk_keyLength; /* GTK key length */
25585     A_UINT8 gtk_keyRSC[GTK_REPLAY_COUNTER_BYTES]; /* GTK key replay sequence counter */
25586     A_UINT8 gtk_key[WMI_MAX_KEY_LEN]; /* GTK key data */
25587     A_UINT8 bigtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
25588     A_UINT8 bigtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
25589     A_UINT8 bigtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
25590     A_UINT8 bigtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
25591 } WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
25592 
25593 typedef struct {
25594     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
25595     A_UINT32 vdev_id; /** unique id identifying the VDEV */
25596     A_UINT32 flags; /* control flags, GTK offload command use high byte  */
25597     /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
25598     A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
25599     A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
25600     A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
25601 
25602     /*
25603      * Following structure will be appended when fils:
25604      *     wmi_gtk_offload_fils_tlv_param wmi_fils_gtk_info;
25605      * Following structure will be appended to the above KEK[] when kek length
25606      * is larger than GTK_OFFLOAD_KEK_BYTES:
25607      *     A_UINT8 kek_ext[];
25608      * Following structure will be appended to the above KCK[] when kck length
25609      * is larger than GTK_OFFLOAD_KCK_BYTES:
25610      *     A_UINT8 kck_ext[];
25611      */
25612 } WMI_GTK_OFFLOAD_CMD_fixed_param;
25613 
25614 typedef struct {
25615     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_offload_extended_tlv_param */
25616     A_UINT32 vdev_id; /** unique id identifying the VDEV */
25617     A_UINT32 flags; /* control flags, GTK offload command use high byte  */
25618     A_UINT32 kek_len;
25619     A_UINT8  KEK[GTK_OFFLOAD_KEK_EXTENDED_BYTES]; /* key encryption key */
25620     A_UINT8  KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
25621     A_UINT8  replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
25622 } wmi_gtk_offload_fils_tlv_param;
25623 
25624 typedef struct {
25625     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param */
25626     A_UINT32 vdev_id;
25627     A_UINT32 sa_query_retry_interval;  /* in msec */
25628     A_UINT32 sa_query_max_retry_count;
25629 } WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
25630 
25631 typedef enum {
25632     WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
25633     WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
25634     WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK*/
25635     WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4, /* gratuitous ARP req*/
25636     WMI_STA_KEEPALIVE_METHOD_MGMT_VENDOR_ACTION = 5, /* vendor action frame */
25637 } WMI_STA_KEEPALIVE_METHOD;
25638 
25639 typedef struct {
25640     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
25641     WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
25642     WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
25643     wmi_mac_addr dest_mac_addr; /* destination MAC address */
25644 } WMI_STA_KEEPALVE_ARP_RESPONSE;
25645 
25646 typedef struct {
25647     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
25648     A_UINT32 vdev_id;
25649     A_UINT32 enable; /* 1 - Enable, 0 - disable */
25650     A_UINT32 method; /* keep alive method */
25651     A_UINT32 interval; /* time interval in seconds  */
25652 /*
25653  * NOTE: following this structure is the TLV for ARP Response:
25654  *     WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; <-- ARP response
25655  */
25656 } WMI_STA_KEEPALIVE_CMD_fixed_param;
25657 
25658 typedef struct {
25659     A_UINT32 tlv_header;
25660     A_UINT32 vdev_id;
25661     A_UINT32 action;
25662 } WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
25663 typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
25664 
25665 typedef struct {
25666     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
25667     A_UINT32 vdev_id;
25668     A_UINT32 keepaliveInterval; /* seconds */
25669     A_UINT32 keepaliveMethod;
25670 } wmi_vdev_set_keepalive_cmd_fixed_param;
25671 
25672 typedef struct {
25673     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
25674     A_UINT32 vdev_id;
25675 } wmi_vdev_get_keepalive_cmd_fixed_param;
25676 
25677 typedef struct {
25678     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
25679     A_UINT32 vdev_id;
25680     A_UINT32 keepaliveInterval; /* seconds */
25681     A_UINT32 keepaliveMethod; /* seconds */
25682 } wmi_vdev_get_keepalive_event_fixed_param;
25683 
25684 typedef enum {
25685     WMI_CLEAR_ARP_STATS_COLLECTED = 0x0,
25686     WMI_START_ARP_STATS_COLLECTION,
25687 } WMI_ARP_STATS_ACTION;
25688 
25689 typedef enum {
25690     WMI_ARP_STATS_RX_PKT_TYPE_ARP = 0x1,
25691 } WMI_ARP_STATS_RX_PKT_TYPE;
25692 
25693 typedef enum {
25694     WMI_BA_SESSION_ESTABLISHMENT_STATUS_SUCCESS = 0x0,
25695     WMI_BA_SESSION_ESTABLISHMENT_STATUS_FAILURE,
25696 } WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS;
25697 
25698 typedef enum {
25699     WMI_CONNECTION_STATUS_FAILURE = 0x0,
25700     WMI_CONNECTION_STATUS_SUCCESS,
25701 } WMI_ARP_STATS_CONNECTION_STATUS;
25702 
25703 /* ARP stats set (configure) req */
25704 typedef struct {
25705     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_arp_stats_cmd_fixed_param */
25706     A_UINT32 vdev_id;
25707     A_UINT32 set_clr;  /* WMI_ARP_STATS_ACTION */
25708     A_UINT32 pkt_type; /* WMI_ARP_STATS_RX_PKT_TYPE */
25709     A_UINT32 ipv4;     /* target will maintain ARP stats (only) for frames containing this IP address */
25710 } wmi_vdev_set_arp_stats_cmd_fixed_param;
25711 
25712 /* ARP stats get req */
25713 typedef struct {
25714     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_cmd_fixed_param */
25715     A_UINT32 vdev_id;
25716 } wmi_vdev_get_arp_stats_cmd_fixed_param;
25717 
25718 /* per vdev based ARP stats */
25719 typedef struct {
25720     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_event_fixed_param */
25721     A_UINT32 vdev_id;
25722     A_UINT32 arp_req_enqueue;
25723     A_UINT32 arp_req_tx_success;
25724     A_UINT32 arp_req_tx_failure; /* number of times a tx MPDU containing a unicast ARP request went unacked */
25725     A_UINT32 arp_rsp_recvd;
25726     A_UINT32 out_of_order_arp_rsp_drop_cnt;
25727     A_UINT32 dad_detected; /* duplicate address detection */
25728     A_UINT32 connect_status; /* WMI_ARP_STATS_CONNECTION_STATUS */
25729     A_UINT32 ba_session_establishment_status; /* WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS */
25730 } wmi_vdev_get_arp_stats_event_fixed_param;
25731 
25732 typedef struct {
25733     A_UINT32 tlv_header; /*  TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_connectivity_check_stats */
25734     A_UINT32 pkt_type_bitmap;  /* WMI_IP_CONNECTIVITY_STATS_RX_PKT_TYPE_BITMAP - only for DNS, TCP and ICMP */
25735     A_UINT32 tcp_src_port;  /* target will maintain TCP stats (only) for frames with this src port */
25736     A_UINT32 tcp_dst_port; /* target will maintain TCP stats (only) for frames with this dst port */
25737     A_UINT32 icmp_ipv4; /* target will maintain ICMPv4 stats (only) for frames containing this IP address */
25738 } wmi_vdev_set_connectivity_check_stats;
25739 
25740 /*  per vdev dns/icmp/tcp based stats*/
25741 typedef struct {
25742     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_connectivity_check_stats */
25743     A_UINT32 tcp_ack_recvd; /* number of tcp syn ack's received by FW */
25744     A_UINT32 icmpv4_rsp_recvd; /* number of icmpv4 responses received by FW */
25745 } wmi_vdev_get_connectivity_check_stats;
25746 
25747 typedef struct {
25748     A_UINT32 tlv_header;
25749     A_UINT32 vdev_id;
25750 #define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
25751 #define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
25752     A_UINT32 action;
25753 } WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
25754 typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
25755 
25756 typedef struct {
25757     A_UINT32 tlv_header;
25758     A_UINT32 vdev_id;
25759     A_UINT32 mcc_tbttmode;
25760     wmi_mac_addr mcc_bssid;
25761 } wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
25762 
25763 #define WMI_MAX_VENDOR_OUI_ACTION_SUPPORTED_PER_ACTION 10
25764 #define WMI_MAX_VENDOR_OUI_DATA_LENGTH                 20
25765 
25766 typedef enum
25767 {
25768     WMI_VENDOR_OUI_ACTION_CONNECTION_1X1 = 0, /* Connect in 1X1 only */
25769     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 */
25770     WMI_VENDOR_OUI_ACTION_CCKM_1X1 = 2,       /* TX (only) CCKM rates with 1 chain only */
25771     WMI_VENDOR_OUI_ACTION_ALT_ITO = 3, /* inactivity time-out */
25772     WMI_VENDOR_OUI_ACTION_SWITCH_TO_11N_MODE = 4, /* Switch from 11ac to 11n mode to avoid IOT issues with ONM frame */
25773     /* WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1
25774      * Connect in 1x1 only and Use only one chain for both Tx and Rx
25775      * to avoid IOT issues due to change in number of Tx and Rx chains
25776      */
25777     WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1 = 5,
25778 
25779     /* Disable burst and assist, and restrict A-MPDU size to 32 */
25780     WMI_VENDOR_OUI_ACTION_DISABLE_AGGRESSIVE_TX = 6,
25781 
25782     /* Disable FW triggered TWT if vendor OUI is received in beacon */
25783     WMI_VENDOR_OUI_ACTION_DISABLE_FW_TRIGGERED_TWT = 7,
25784 
25785     /* Extend ITO under WOW mode if vendor OUI is received in beacon */
25786     WMI_VENDOR_OUI_ACTION_EXTEND_WOW_ITO = 8,
25787 
25788     /*
25789      * Turn on station 80211BE feature if AP's vendor OUI is in the list
25790      * for specific customer
25791      */
25792     WMI_VENDOR_OUI_ACTION_ALLOW_11BE = 9,
25793 
25794     /*
25795      * Turn off FW's dynamic qos null tx rate if specific vendor OUI
25796      * received in beacon.
25797      */
25798     WMI_VENDOR_OUI_ACTION_DISABLE_DYNAMIC_QOS_NULL_TX_RATE = 10,
25799 
25800     /*
25801      * Enable CTS2SELF with QoS null frame if specific vendor OUI
25802      * received in beacon.
25803      */
25804     WMI_VENDOR_OUI_ACTION_ENABLE_CTS2SELF_WITH_QOS_NULL = 11,
25805 
25806     /*
25807      * Send SMPS frame following OMN frame on VHT conncection if specific
25808      * vendor OUI received in beacon.
25809      */
25810     WMI_VENDOR_OUI_ACTION_SEND_SMPS_FRAME_WITH_OMN = 12,
25811 
25812     /* Restrict SLO if specific vendor OUI received in beacon. */
25813     WMI_VENDOR_OUI_ACTION_RESTRICT_SLO = 13,
25814 
25815     /*
25816      * Force MLSR mode if specific vendor OUI received in beacon
25817      * when connect with MLO.
25818      */
25819     WMI_VENDOR_OUI_ACTION_FORCE_MLSR = 14,
25820 
25821 
25822     /* Add any action before this line */
25823     WMI_VENDOR_OUI_ACTION_MAX_ACTION_ID
25824 } wmi_vendor_oui_action_id;
25825 
25826 typedef struct {
25827     A_UINT32 tlv_header;
25828     /** vendor OUI actions */
25829     A_UINT32 action_id;  /* enum wmi_vendor_oui_action_id */
25830     A_UINT32 total_num_vendor_oui; /* total number of OUI present in ini for all actions.
25831                                    ** For first command, this value will be used for allocating memory in FW accordingly */
25832     A_UINT32 num_vendor_oui_ext; /* the number of wmi_vendor_oui_ext for action_id */
25833     /* followed by TLVs, an array of structure of type wmi_vendor_oui_ext
25834     ** wmi_vendor_oui_ext vendor_oui_ext[num_vendor_oui_ext];
25835     */
25836     /* followed by A_UINT8 data[] of concatenated data for each vendor_oui_ext[] element
25837     ** first byte contains the index i of structure vendor_oui_ext[]
25838     ** for which data is coming and length of the data is extracted as
25839     ** wmi_vendor_oui_ext[i].buf_data_length. No padding between data of
25840     ** N th OUI and (N+1) th OUI.
25841     ** For example, if vendor_oui_ext[0].buf_data_length is 18, then
25842     ** data[0] will hold the index value 0, data[1] through data[17]
25843     ** will hold the OUI data for this first OUI, data[18] will hold
25844     ** the index value 1, and the OUI data for the second OUI will
25845     ** begin at data[19].
25846     */
25847 } wmi_pdev_config_vendor_oui_action_fixed_param;
25848 
25849 typedef struct {
25850     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param */
25851     /** pdev_id for identifying the MAC
25852      * See macros starting with WMI_PDEV_ID_ for values.
25853      */
25854     A_UINT32 pdev_id;
25855     /** AC number */
25856     A_UINT32 ac; /* refer to wmi_traffic_ac */
25857     /**
25858      * Enable/disable tx queue optimizations (such as dropping stale tx frms)
25859      * for the specified AC.
25860      */
25861     A_UINT32 ac_tx_queue_optimize_enable;
25862 } wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param;
25863 
25864 typedef struct {
25865     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param */
25866     /** pdev_id for identifying the MAC
25867      * See macros starting with WMI_PDEV_ID_ for values.
25868      */
25869     A_UINT32 pdev_id;
25870     /** Enable/disable rx filter promiscuous */
25871     A_UINT32 rx_filter_promiscuous_enable;
25872 } wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param;
25873 
25874 typedef enum {
25875     WMI_BEACON_INFO_PRESENCE_OUI_EXT            = 1 <<  0,
25876     WMI_BEACON_INFO_PRESENCE_MAC_ADDRESS        = 1 <<  1,
25877     WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_NSS  = 1 <<  2,
25878     WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_HT   = 1 <<  3,
25879     WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_VHT  = 1 <<  4,
25880     WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_BAND = 1 <<  5,
25881 } wmi_beacon_info_presence_items;
25882 
25883 typedef struct _wmi_vendor_oui_ext {
25884     A_UINT32 tlv_header;
25885     A_UINT32 buf_data_length;        /* length of data in bytes for this OUI including index byte */
25886     A_UINT32 info_presence_bit_mask; /* see enum wmi_beacon_info_presence_items */
25887     A_UINT32 oui_header_length;      /* either 3 or 5 bytes */
25888     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 */
25889     A_UINT32 mac_address_length;     /* MAC address length in bytes
25890                                      ** (This value will always be 6,
25891                                      ** but is explicitly specified for sake
25892                                      ** of uniformity and completeness).
25893                                      */
25894     A_UINT32 capability_data_length; /* length of capability in bytes */
25895 } wmi_vendor_oui_ext;
25896 
25897 #define WMI_INFO_CAPABILITY_NSS_MASK                       0x0f
25898 #define WMI_INFO_CAPABILITY_NSS_OFFSET                     0
25899 #define WMI_INFO_CAPABILITY_HT_ENABLE_MASK                 0x10
25900 #define WMI_INFO_CAPABILITY_HT_ENABLE_OFFSET               4
25901 #define WMI_INFO_CAPABILITY_VHT_ENABLE_MASK                0x20
25902 #define WMI_INFO_CAPABILITY_VHT_ENABLE_OFFSET              5
25903 #define WMI_INFO_CAPABILITY_BAND_MASK                      0xc0
25904 #define WMI_INFO_CAPABILITY_BAND_OFFSET                    6
25905 
25906 /* definition of WMI_INFO_CAPABILITY_NSS_MASK */
25907 #define WMI_INFO_CAPABILITY_NSS_1X1                        1
25908 #define WMI_INFO_CAPABILITY_NSS_2X2                        2
25909 #define WMI_INFO_CAPABILITY_NSS_3X3                        3
25910 #define WMI_INFO_CAPABILITY_NSS_4X4                        4
25911 
25912 /* definition of WMI_INFO_CAPABILITY_BAND_MASK */
25913 #define WMI_INFO_CAPABILITY_2G_BAND_MASK                   (1 << 0)
25914 #define WMI_INFO_CAPABILITY_5G_BAND_MASK                   (1 << 1)
25915 
25916 typedef struct {
25917     A_UINT32 tlv_header;
25918     A_UINT32 vdev_id;        /* home vdev id */
25919     A_UINT32 meas_token;     /* from measure request frame */
25920     A_UINT32 dialog_token;
25921     A_UINT32 number_bursts;  /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
25922     A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst*/
25923     A_UINT32 burst_cycle;   /* times cycle through within one burst */
25924     A_UINT32 tx_power;      /* for path frame */
25925     A_UINT32 off_duration;  /* uint in mill seconds, channel off duraiton for path loss frame sending */
25926     wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
25927     A_UINT32 num_chans;
25928 /*
25929  * This fixed_param TLV is followed by other TLVs:
25930  *     A_UINT32 channel_list[num_chans]; // in MHz
25931  */
25932 } wmi_vdev_plmreq_start_cmd_fixed_param;
25933 
25934 typedef struct {
25935     A_UINT32 tlv_header;
25936     A_UINT32 vdev_id;
25937     A_UINT32 meas_token; /* same value from req*/
25938 } wmi_vdev_plmreq_stop_cmd_fixed_param;
25939 
25940 typedef struct {
25941     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param  */
25942     A_UINT32 tlv_header;
25943     /* unique id identifying the VDEV, generated by the caller */
25944     A_UINT32 vdev_id;
25945     /* enable/disable NoA */
25946     A_UINT32 enable;
25947     /** number of NoA desc. In the TLV noa_descriptor[] */
25948     A_UINT32 num_noa;
25949     /**
25950      * TLV (tag length value) parameters follow the pattern structure.
25951      * TLV  contain NoA desc with num of num_noa
25952      */
25953 } wmi_p2p_set_noa_cmd_fixed_param;
25954 
25955 typedef struct {
25956     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param  */
25957     A_UINT32 tlv_header;
25958     /* unique id identifying the VDEV, generated by the caller */
25959     A_UINT32 vdev_id;
25960     /* Identify the wlan module */
25961     A_UINT32 module_id;
25962     /* Num of test arguments passed */
25963     A_UINT32 num_args;
25964     /* unique id identifying the unit test cmd, generated by the caller */
25965     A_UINT32 diag_token;
25966 /**
25967  * TLV (tag length value) parameters follow the wmi_unit_test_cmd_fixed_param
25968  * structure. The TLV's are:
25969  *     A_UINT32 args[];
25970  **/
25971 } wmi_unit_test_cmd_fixed_param;
25972 
25973 /** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
25974  * after it received WMI_ROAM_SYNCH_EVENTID.
25975  */
25976 typedef struct {
25977     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
25978     /** unique id identifying the VDEV, generated by the caller */
25979     A_UINT32 vdev_id;
25980 } wmi_roam_synch_complete_fixed_param;
25981 
25982 
25983 typedef enum {
25984     RECOVERY_SIM_ASSERT = 0x01,
25985     RECOVERY_SIM_NO_DETECT = 0x02,
25986     RECOVERY_SIM_CTR_EP_FULL = 0x03,
25987     RECOVERY_SIM_EMPTY_POINT = 0x04,
25988     RECOVERY_SIM_STACK_OV = 0x05,
25989     RECOVERY_SIM_INFINITE_LOOP = 0x06,
25990     RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
25991     RECOVERY_SIM_SELF_RECOVERY = 0x08,
25992     RECOVERY_SIM_BT_RECOVERY = 0x09,
25993 } RECOVERY_SIM_TYPE;
25994 
25995 /* WMI_FORCE_FW_HANG_CMDID */
25996 typedef struct {
25997     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
25998     A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3:  simulate ep-full(),4:...*/
25999     A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)*/
26000 } WMI_FORCE_FW_HANG_CMD_fixed_param;
26001 
26002 typedef enum {
26003     WMI_MCAST_FILTER_SET = 1,
26004     WMI_MCAST_FILTER_DELETE
26005 } WMI_SET_SINGLE_MCAST_FILTER_OP;
26006 
26007 typedef struct {
26008     A_UINT32 tlv_header;
26009     A_UINT32 vdev_id;
26010     A_UINT32 index;
26011     A_UINT32 action;
26012     wmi_mac_addr mcastbdcastaddr;
26013 } WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
26014 
26015 typedef enum {
26016     WMI_MULTIPLE_MCAST_FILTER_CLEAR = 1, /* clear all previous mc list */
26017     WMI_MULTIPLE_MCAST_FILTER_SET,       /* clear all previous mc list, and set new list */
26018     WMI_MULTIPLE_MCAST_FILTER_DELETE,    /* delete one/multiple mc list */
26019     WMI_MULTIPLE_MCAST_FILTER_ADD        /* add one/multiple mc list */
26020 } WMI_MULTIPLE_MCAST_FILTER_OP;
26021 
26022 typedef struct {
26023     A_UINT32 tlv_header;
26024     A_UINT32 vdev_id;
26025     A_UINT32 operation;  /* refer WMI_MULTIPLE_MCAST_FILTER_OP */
26026     A_UINT32 num_mcastaddrs; /* number of elements in the subsequent mcast addr list */
26027 /**
26028  * TLV (tag length value) parameters follow the
26029  * structure. The TLV's are:
26030  * wmi_mac_addr mcastaddr_list[num_mcastaddrs];
26031  */
26032 } WMI_SET_MULTIPLE_MCAST_FILTER_CMD_fixed_param;
26033 
26034 
26035 /* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */
26036 typedef enum {
26037     WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */
26038     WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */
26039 } WMI_TIME_STAMP_SYNC_MODE;
26040 
26041 typedef struct {
26042     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param */
26043     A_UINT32 mode; /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */
26044     A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */
26045     A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */
26046 } WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param;
26047 
26048 /* GPIO Command and Event data structures */
26049 
26050 /* WMI_GPIO_CONFIG_CMDID */
26051 enum {
26052     WMI_GPIO_PULL_NONE,   /** Do not specify a pull. */
26053     WMI_GPIO_PULL_UP,     /** Pull the GPIO up. */
26054     WMI_GPIO_PULL_DOWN,   /** Pull the GPIO down. */
26055     WMI_GPIO_PULL_KEEPER, /** Designate as a keeper. */
26056 };
26057 
26058 enum wmi_gpio_drive_strength {
26059     WMI_GPIO_2MA,  /** Specify a 2 mA drive. */
26060     WMI_GPIO_4MA,  /** Specify a 4 mA drive. */
26061     WMI_GPIO_6MA,  /** Specify a 6 mA drive. */
26062     WMI_GPIO_8MA,  /** Specify an 8 mA drive. */
26063     WMI_GPIO_10MA, /** Specify a 10 mA drive. */
26064     WMI_GPIO_12MA, /** Specify a 12 mA drive. */
26065     WMI_GPIO_14MA, /** Specify a 14 mA drive. */
26066     WMI_GPIO_16MA, /** Specify a 16 mA drive. */
26067 };
26068 
26069 enum wmi_tlmm_gpio_config {
26070   WMI_TLMM_GPIO_DISABLE, /** Use the internal inactive configuration. */
26071   WMI_TLMM_GPIO_ENABLE,  /** Use the configuration passed as parameter. */
26072 };
26073 
26074 enum {
26075     WMI_GPIO_INTTYPE_DISABLE,
26076     WMI_GPIO_INTTYPE_RISING_EDGE,
26077     WMI_GPIO_INTTYPE_FALLING_EDGE,
26078     WMI_GPIO_INTTYPE_BOTH_EDGE,
26079     WMI_GPIO_INTTYPE_LEVEL_LOW,
26080     WMI_GPIO_INTTYPE_LEVEL_HIGH
26081 };
26082 
26083 typedef struct {
26084     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
26085     A_UINT32 gpio_num; /* GPIO number to be setup */
26086     A_UINT32 input; /* 0 - Output/ 1 - Input */
26087     A_UINT32 pull_type; /* Pull type defined above */
26088     A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
26089     /* mux_config_val - configure pin MUX
26090      * A value of 0x0 for this field means to use the default MUX configuration.
26091      * Valid non-zero values are as follows:
26092      * Rome:
26093      *     0x4 - use the pin as GPIO (rather than UART)
26094      */
26095     A_UINT32 mux_config_val;
26096     /*
26097      * The drive strength to use in the configuration of a GPIO.
26098      * Refer to the wmi_gpio_drive_strength enum.
26099      */
26100     A_UINT32 drive;
26101     /*
26102      * Use the internal inactive configuration or configuration passed
26103      * as parameter.
26104      * Refer to the wmi_tlmm_gpio_config enum.
26105      */
26106     A_UINT32 init_enable;
26107 } wmi_gpio_config_cmd_fixed_param;
26108 
26109 /* WMI_GPIO_OUTPUT_CMDID */
26110 typedef struct {
26111     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
26112     A_UINT32 gpio_num; /* GPIO number to be setup */
26113     A_UINT32 set; /* Set the GPIO pin*/
26114 } wmi_gpio_output_cmd_fixed_param;
26115 
26116 /* WMI_GPIO_STATE_REQ_CMDID */
26117 typedef struct {
26118     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_state_req_cmd_fixed_param */
26119     A_UINT32 gpio_num;   /* GPIO number to get state */
26120 } wmi_gpio_state_req_cmd_fixed_param;
26121 
26122 /* WMI_GPIO_INPUT_EVENTID */
26123 typedef struct {
26124     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
26125     A_UINT32 gpio_num; /* GPIO number which changed state */
26126 } wmi_gpio_input_event_fixed_param;
26127 
26128 typedef enum {
26129     /**
26130      * The following wmi_gpio_state_type is mutually exclusive.
26131      * 0:  gpio_invalid_state
26132      * 1:  gpio_state is LO
26133      * 2:  gpio_state is HIGH
26134      */
26135     WMI_GPIO_STATE_INVALID, /* GPIO state is invalid. */
26136     WMI_GPIO_STATE_LOW,     /* GPIO state is low. */
26137     WMI_GPIO_STATE_HIGH,    /* GPIO state is high. */
26138 } WMI_GPIO_STATE_TYPE;
26139 
26140 /* WMI_GPIO_STATE_RES_EVENTID */
26141 typedef struct {
26142     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_state_res_event_fixed_param */
26143     A_UINT32 gpio_num;   /* GPIO number */
26144     A_UINT32 gpio_state; /* state of GPIO pin defined in WMI_GPIO_STATE_TYPE 0 invalid 1 - LO, 2 -HI*/
26145 } wmi_gpio_state_res_event_fixed_param;
26146 
26147 /* WMI_ANT_CONTROLLER_CMDID */
26148 typedef struct {
26149     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ant_controller_cmd_fixed_param */
26150     A_UINT32 ant_controller_enable;
26151 } wmi_ant_controller_cmd_fixed_param;
26152 
26153 /* WMI_P2P_DISC_EVENTID */
26154 enum {
26155     P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
26156     P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
26157 };
26158 
26159 enum {
26160     P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload*/
26161     P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload*/
26162     P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload*/
26163 };
26164 
26165 enum {
26166     P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
26167     P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
26168 };
26169 
26170 typedef struct {
26171     A_UINT32 vdev_id;
26172     A_UINT32 reason; /* P2P DISC wake up reason*/
26173 } wmi_p2p_disc_event;
26174 
26175 typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param WOW_EVENT_INFO_SECTION_GTKIGTK;
26176 
26177 typedef enum {
26178     WMI_FAKE_TXBFER_SEND_NDPA,
26179     WMI_FAKE_TXBFER_SEND_MU,
26180     WMI_FAKE_TXBFER_NDPA_FBTYPE,
26181     WMI_FAKE_TXBFER_NDPA_NCIDX,
26182     WMI_FAKE_TXBFER_NDPA_POLL,
26183     WMI_FAKE_TXBFER_NDPA_BW,
26184     WMI_FAKE_TXBFER_NDPA_PREAMBLE,
26185     WMI_FAKE_TXBFER_NDPA_RATE,
26186     WMI_FAKE_TXBFER_NDP_BW,
26187     WMI_FAKE_TXBFER_NDP_NSS,
26188     WMI_TXBFEE_ENABLE_UPLOAD_H,
26189     WMI_TXBFEE_ENABLE_CAPTURE_H,
26190     WMI_TXBFEE_SET_CBF_TBL,
26191     WMI_TXBFEE_CBF_TBL_LSIG,
26192     WMI_TXBFEE_CBF_TBL_SIGA1,
26193     WMI_TXBFEE_CBF_TBL_SIGA2,
26194     WMI_TXBFEE_CBF_TBL_SIGB,
26195     WMI_TXBFEE_CBF_TBL_PAD,
26196     WMI_TXBFEE_CBF_TBL_DUR,
26197     WMI_TXBFEE_SU_NCIDX,
26198     WMI_TXBFEE_CBIDX,
26199     WMI_TXBFEE_NGIDX,
26200 } WMI_TXBF_PARAM_ID;
26201 
26202 typedef struct {
26203     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
26204     /** parameter id   */
26205     A_UINT32 param_id;
26206     /** parameter value */
26207     A_UINT32 param_value;
26208 } wmi_txbf_cmd_fixed_param;
26209 
26210 typedef struct {
26211     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
26212     A_UINT32 h_length;
26213     A_UINT32 cv_length;
26214 /* This TLV is followed by array of bytes:
26215  *   A_UINT8 bufp[]; <-- h_cv info buffer
26216  */
26217 } wmi_upload_h_hdr;
26218 
26219 typedef struct {
26220     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
26221     A_UINT32 svd_num;
26222     A_UINT32 tone_num;
26223     A_UINT32 reserved;
26224 } wmi_capture_h_event_hdr;
26225 
26226 typedef struct {
26227     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
26228     A_UINT32 start_freq; /* start frequency, not channel center freq */
26229     A_UINT32 end_freq; /* end frequency */
26230 } wmi_avoid_freq_range_desc;
26231 
26232 typedef struct {
26233     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
26234     /* bad channel range count, multi range is allowed, 0 means all channel clear */
26235     A_UINT32 num_freq_ranges;
26236 
26237 /* The TLVs will follow.
26238  * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
26239  *     wmi_avoid_freq_range_desc avd_freq_range[]; <-- message buffer, NULL terminated
26240  */
26241 } wmi_avoid_freq_ranges_event_fixed_param;
26242 
26243 enum {
26244     WMI_SAR2_SUCCESS                = 0,
26245     WMI_SAR2_INVALID_ANTENNA_INDEX  = 1,
26246     WMI_SAR2_INVALID_TABLE_INDEX    = 2,
26247     WMI_SAR2_STATE_ERROR            = 4,
26248     WMI_SAR2_BDF_NO_TABLE           = 8,
26249 };
26250 
26251 typedef struct {
26252     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar2_result_event_fixed_param  */
26253     A_UINT32 result; /* refer to the above WMI_SAR2_ result definitions */
26254 } wmi_sar2_result_event_fixed_param;
26255 
26256 typedef struct {
26257     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param  */
26258     /** Reserved for future use */
26259     A_UINT32 reserved0;
26260     A_UINT32 vdev_id;
26261 } wmi_gtk_rekey_fail_event_fixed_param;
26262 
26263 
26264 typedef enum WLAN_COEX_EVENT {
26265     WLAN_COEX_EVENT_BT_NONE                     = 0,
26266     WLAN_COEX_EVENT_BT_A2DP_PROFILE_ADD         = 1,
26267     WLAN_COEX_EVENT_BT_A2DP_PROFILE_REMOVE      = 2,
26268     WLAN_COEX_EVENT_BT_VOICE_PROFILE_ADD        = 3,
26269     WLAN_COEX_EVENT_BT_VOICE_PROFILE_REMOVE     = 4,
26270     WLAN_COEX_EVENT_BT_SCAN_START               = 5,
26271     WLAN_COEX_EVENT_BT_SCAN_STOP                = 6,
26272     WLAN_COEX_EVENT_BT_PROFILE_CONNECTED        = 7,
26273     WLAN_COEX_EVENT_BT_PROFILE_DISCONNECTED     = 8,
26274 } WLAN_COEX_EVENT;
26275 
26276 typedef struct {
26277     A_UINT32 tlv_header;
26278     A_UINT32 coex_profile_evt; //uses the enum values from WLAN_COEX_EVENT
26279 } wmi_coex_bt_activity_event_fixed_param;
26280 
26281 enum wmm_ac_downgrade_policy {
26282     WMM_AC_DOWNGRADE_DEPRIO,
26283     WMM_AC_DOWNGRADE_DROP,
26284     WMM_AC_DOWNGRADE_INVALID,
26285 };
26286 
26287 /* WMM EDCA Params type */
26288 #define WMM_PARAM_TYPE_LEGACY        0
26289 /* Relaxed EDCA parameters for 11ax to be used in case of triggered access */
26290 #define WMM_PARAM_TYPE_11AX_EDCA     1
26291 
26292 typedef struct {
26293     A_UINT32 tlv_header;
26294     A_UINT32 cwmin;
26295     A_UINT32 cwmax;
26296     A_UINT32 aifs;
26297     union {
26298         A_UINT32 txoplimit;
26299         A_UINT32 mu_edca_timer;
26300     };
26301     A_UINT32 acm;
26302     A_UINT32 no_ack;
26303 } wmi_wmm_vparams;
26304 
26305 typedef struct {
26306     A_UINT32 tlv_header;
26307     A_UINT32 vdev_id;
26308     wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
26309     A_UINT32 wmm_param_type; /* see WMM_PARAM_TYPE_xxx defs */
26310 } wmi_vdev_set_wmm_params_cmd_fixed_param;
26311 
26312 typedef struct {
26313     A_UINT32 tlv_header;
26314     A_UINT32 vdev_id;
26315     A_UINT32              gtxRTMask[2]; /* for HT and VHT rate masks */
26316     A_UINT32              userGtxMask; /* host request for GTX mask */
26317     A_UINT32              gtxPERThreshold; /* default: 10% */
26318     A_UINT32              gtxPERMargin; /* default: 2% */
26319     A_UINT32              gtxTPCstep; /* default: 1 */
26320     A_UINT32              gtxTPCMin; /* default: 5 */
26321     A_UINT32              gtxBWMask; /* 20/40/80/160 Mhz */
26322 } wmi_vdev_set_gtx_params_cmd_fixed_param;
26323 
26324 typedef struct
26325 {
26326     A_UINT32 tlv_header;
26327     A_UINT32 vdev_id;
26328     A_UINT32 ac;
26329     A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
26330     A_UINT32 downgrade_type;
26331 } wmi_vdev_wmm_addts_cmd_fixed_param;
26332 
26333 typedef struct
26334 {
26335     A_UINT32 tlv_header;
26336     A_UINT32 vdev_id;
26337     A_UINT32 ac;
26338 } wmi_vdev_wmm_delts_cmd_fixed_param;
26339 
26340 /* DEPRECATED */
26341 typedef struct {
26342     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param  */
26343     /** Reserved for future use */
26344     A_UINT32 reserved0;
26345 } wmi_pdev_dfs_enable_cmd_fixed_param;
26346 
26347 /* DEPRECATED */
26348 typedef struct {
26349     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_disable_cmd_fixed_param  */
26350     /** pdev_id for identifying the MAC
26351      * See macros starting with WMI_PDEV_ID_ for values.
26352      */
26353     A_UINT32 pdev_id;
26354 } wmi_pdev_dfs_disable_cmd_fixed_param;
26355 
26356 typedef struct {
26357     /** TLV tag and len; tag equals
26358      *  WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
26359      */
26360     A_UINT32 tlv_header;
26361 
26362     /** pdev_id for identifying the MAC
26363      * See macros starting with WMI_PDEV_ID_ for values.
26364      */
26365     A_UINT32 pdev_id;
26366 } wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
26367 
26368 typedef struct {
26369     /** TLV tag and len; tag equals
26370      *  WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
26371      */
26372     A_UINT32 tlv_header;
26373     /** pdev_id for identifying the MAC
26374      * See macros starting with WMI_PDEV_ID_ for values.
26375      */
26376     A_UINT32 pdev_id;
26377 } wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
26378 
26379 typedef struct {
26380     A_UINT32 tlv_header;
26381     A_UINT32 pdev_id;
26382 } wmi_pdev_dfs_phyerr_offload_enable_cmd_fixed_param;
26383 
26384 typedef struct {
26385     A_UINT32 tlv_header;
26386     A_UINT32 pdev_id;
26387 } wmi_pdev_dfs_phyerr_offload_disable_cmd_fixed_param;
26388 
26389 typedef enum {
26390     QUICK_OCAC = 0,
26391     EXTENSIVE_OCAC,
26392     QUICK_RCAC,
26393 } WMI_ADFS_OCAC_MODE;
26394 
26395 typedef struct {
26396     A_UINT32  tlv_header;
26397     A_UINT32  vdev_id;
26398     A_UINT32  ocac_mode;  /* WMI_ADFS_OCAC_MODE */
26399     A_UINT32  min_duration_ms; /* in milliseconds */
26400     A_UINT32  max_duration_ms; /* in milliseconds */
26401     A_UINT32  chan_freq;   /* in MHz */
26402     A_UINT32  chan_width;  /* in MHz */
26403     /*
26404      * Two center frequencies are required since agile channel switch
26405      * has to support 160/165 MHz for products like Pine.
26406      * For agile which supports only up to 80MHz (HK),
26407      * freq2 will be 0 and ignored.
26408      */
26409     union {
26410         A_UINT32  center_freq; /* in MHz */ /* old name */
26411         A_UINT32  center_freq1; /* in MHz */ /* new name */
26412     };
26413     A_UINT32  center_freq2; /* in MHz */
26414 } wmi_vdev_adfs_ch_cfg_cmd_fixed_param;
26415 
26416 typedef struct {
26417     A_UINT32 tlv_header;
26418     A_UINT32 vdev_id;
26419 } wmi_vdev_adfs_ocac_abort_cmd_fixed_param;
26420 
26421 typedef enum {
26422     IN_SERVICE_MODE = 0,
26423     OCAC_MODE,
26424 } WMI_DFS_RADAR_DETECTION_MODE;
26425 
26426 typedef struct {
26427     A_UINT32 tlv_header;
26428     A_UINT32 pdev_id;
26429     /* In-service mode or O-CAC mode */
26430     A_UINT32 detection_mode; /* WMI_DFS_RADAR_DETECTION_MODE */
26431     A_UINT32 chan_freq;  /* in MHz */
26432     A_UINT32 chan_width; /* in MHz */
26433     A_UINT32 detector_id;
26434     A_UINT32 segment_id;
26435     A_UINT32 timestamp;
26436     A_UINT32 is_chirp;
26437     A_INT32  freq_offset; /* in MHz */
26438     A_INT32  sidx; /* segment index (where was the radar within the channel) */
26439 } wmi_pdev_dfs_radar_detection_event_fixed_param;
26440 
26441 typedef struct {
26442     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_RADAR_FLAGS */
26443     /*
26444      * Bit 0:
26445      *     0 - need check sub channel marking
26446      *     1 - full bandwidth need put to NOL
26447      *     Refer to WMI_RADAR_FLAGS_FULL_BW_NOL_GET and _SET macros
26448      * [1:31] reserved
26449      */
26450     A_UINT32 flags;
26451 }  WMI_RADAR_FLAGS;
26452 
26453 #define WMI_RADAR_FLAGS_FULL_BW_NOL_BITPOS    0
26454 #define WMI_RADAR_FLAGS_FULL_BW_NOL_NUM_BITS  1
26455 
26456 #define WMI_RADAR_FLAGS_FULL_BW_NOL_GET(flag) \
26457     WMI_GET_BITS(flag, \
26458         WMI_RADAR_FLAGS_FULL_BW_NOL_BITPOS, \
26459         WMI_RADAR_FLAGS_FULL_BW_NOL_NUM_BITS)
26460 #define WMI_RADAR_FLAGS_FULL_BW_NOL_SET(flag, val) \
26461     WMI_SET_BITS(flag, \
26462         WMI_RADAR_FLAGS_FULL_BW_NOL_BITPOS, \
26463         WMI_RADAR_FLAGS_FULL_BW_NOL_NUM_BITS, val)
26464 
26465 typedef enum {
26466     OCAC_COMPLETE = 0,
26467     OCAC_ABORT,
26468 } WMI_VDEV_OCAC_COMPLETE_STATUS;
26469 
26470 typedef struct {
26471     A_UINT32 tlv_header;
26472     A_UINT32 vdev_id;
26473     A_UINT32 chan_freq;   /* in MHz */
26474     A_UINT32 chan_width;  /* in MHz */
26475     /*
26476      * Two center frequencies are required since agile channel switch
26477      * has to support 160/165 MHz for products like Pine.
26478      * For agile which supports only up to 80MHz (HK),
26479      * freq2 will be 0 and ignored.
26480      */
26481     union {
26482         A_UINT32 center_freq; /* in MHz */ /* old name */
26483         A_UINT32 center_freq1; /* in MHz */ /* new name */
26484     };
26485     A_UINT32 status;   /* WMI_VDEV_OCAC_COMPLETE_STATUS */
26486     A_UINT32 center_freq2; /* in MHz */
26487 } wmi_vdev_adfs_ocac_complete_event_fixed_param;
26488 
26489 typedef struct {
26490     A_UINT32 tlv_header;
26491     A_UINT32 vdev_id;
26492 } wmi_vdev_dfs_cac_complete_event_fixed_param;
26493 
26494 
26495 /** TDLS COMMANDS */
26496 
26497 /* WMI_TDLS_SET_STATE_CMDID */
26498 /* TDLS State */
26499 enum wmi_tdls_state {
26500     /** TDLS disable */
26501     WMI_TDLS_DISABLE,
26502     /** TDLS enabled - no firmware connection tracking/notifications */
26503     WMI_TDLS_ENABLE_PASSIVE,
26504     /** TDLS enabled - with firmware connection tracking/notifications */
26505     WMI_TDLS_ENABLE_ACTIVE,
26506     /** TDLS enabled - firmware waits for peer mac for connection tracking */
26507     WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
26508     /** TDLS enabled - TDLS connection tracking is done in host */
26509     WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST,
26510 };
26511 
26512 /* TDLS Options */
26513 #define WMI_TDLS_OFFCHAN_EN             (1 << 0) /** TDLS Off Channel support */
26514 #define WMI_TDLS_BUFFER_STA_EN          (1 << 1) /** TDLS Buffer STA support */
26515 #define WMI_TDLS_SLEEP_STA_EN           (1 << 2) /** TDLS Sleep STA support (not currently supported) */
26516 
26517 typedef struct {
26518     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param  */
26519     A_UINT32 tlv_header;
26520     /** unique id identifying the VDEV */
26521     A_UINT32 vdev_id;
26522     /** Enable/Disable TDLS (wmi_tdls_state) */
26523     A_UINT32 state;
26524     /** Duration (in ms) over which to calculate tx/rx threshold to trigger TDLS Discovery */
26525     A_UINT32 notification_interval_ms;
26526     /** number of packets OVER which notify/suggest TDLS Discovery:
26527      *  if current tx pps counter / notification interval >= threshold
26528      *  then a notification will be sent to host to advise TDLS Discovery */
26529     A_UINT32 tx_discovery_threshold;
26530     /** number of packets UNDER which notify/suggest TDLS Teardown:
26531      *  if current tx pps counter / notification interval < threshold
26532      *  then a notification will be sent to host to advise TDLS Tear down */
26533     A_UINT32 tx_teardown_threshold;
26534     /** Absolute RSSI value under which notify/suggest TDLS Teardown */
26535     A_INT32 rssi_teardown_threshold;
26536     /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
26537     A_INT32 rssi_delta;
26538     /** TDLS Option Control
26539      * Off-Channel, Buffer STA, (later)Sleep STA support */
26540     A_UINT32 tdls_options;
26541     /* Buffering time in number of beacon intervals */
26542     A_UINT32 tdls_peer_traffic_ind_window;
26543     /* Wait time for PTR frame */
26544     A_UINT32 tdls_peer_traffic_response_timeout_ms;
26545     /* Self PUAPSD mask */
26546     A_UINT32 tdls_puapsd_mask;
26547     /* Inactivity timeout */
26548     A_UINT32 tdls_puapsd_inactivity_time_ms;
26549     /* Max of rx frame during SP */
26550     A_UINT32 tdls_puapsd_rx_frame_threshold;
26551     /**Duration (in ms) over which to check whether TDLS link needs to be torn down */
26552     A_UINT32 teardown_notification_ms;
26553     /** STA kickout threshold for TDLS peer */
26554     A_UINT32 tdls_peer_kickout_threshold;
26555     /* TDLS discovery WAKE timeout in ms.
26556      * DUT will wake until this timeout to receive TDLS discovery response
26557      * from peer.
26558      * If tdls_discovery_wake_timeout is 0x0, the DUT will choose autonomously
26559      * what wake timeout value to use.
26560      */
26561     A_UINT32 tdls_discovery_wake_timeout;
26562 } wmi_tdls_set_state_cmd_fixed_param;
26563 
26564 /* WMI_TDLS_PEER_UPDATE_CMDID */
26565 
26566 enum wmi_tdls_peer_state {
26567     /** tx peer TDLS link setup now starting, traffic to DA should be
26568      * paused (except TDLS frames) until state is moved to CONNECTED (or
26569      * TEARDOWN on setup failure) */
26570     WMI_TDLS_PEER_STATE_PEERING,
26571     /** tx peer TDLS link established, running (all traffic to DA unpaused) */
26572     WMI_TDLS_PEER_STATE_CONNECTED,
26573     /** tx peer TDLS link tear down started (link paused, any frames
26574      * queued for DA will be requeued back through the AP)*/
26575     WMI_TDLS_PEER_STATE_TEARDOWN,
26576     /** Add peer mac into connection table */
26577     WMI_TDLS_PEER_ADD_MAC_ADDR,
26578     /** Remove peer mac from connection table */
26579     WMI_TDLS_PEER_REMOVE_MAC_ADDR,
26580 };
26581 
26582 /* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
26583 #define WMI_TDLS_MAX_SUPP_CHANNELS 128
26584 #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
26585 typedef struct {
26586     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities  */
26587     A_UINT32 tlv_header;
26588     /* Peer's QoS Info - for U-APSD */
26589     /* AC FLAGS  - accessed through macros below */
26590     /* Ack, SP, More Data Ack - accessed through macros below */
26591     A_UINT32 peer_qos;
26592     /*TDLS Peer's U-APSD Buffer STA Support*/
26593     A_UINT32 buff_sta_support;
26594     /*TDLS off channel related params */
26595     A_UINT32 off_chan_support;
26596     A_UINT32 peer_curr_operclass;
26597     A_UINT32 self_curr_operclass;
26598     /* Number of channels available for off channel operation */
26599     A_UINT32 peer_chan_len;
26600     A_UINT32 peer_operclass_len;
26601     A_UINT8  peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
26602     /* Is peer initiator or responder of TDLS setup request */
26603     A_UINT32 is_peer_responder;
26604     /* Preferred off channel number as configured by user */
26605     A_UINT32 pref_offchan_num;
26606     /* Preferred off channel bandwidth as configured by user */
26607     A_UINT32 pref_offchan_bw;
26608     /* Preferred off channel frequency in MHz as configured by user */
26609     A_UINT32 pref_offchan_freq;
26610 
26611     /** Followed by the variable length TLV peer_chan_list:
26612      *  wmi_channel peer_chan_list[].
26613       *   Array size would be peer_chan_len.
26614      *  This array is intersected channels which is supported by both peer
26615      *  and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
26616      *  FW shall compute BW for an offchan based on peer's ht/vht cap
26617      *  received in peer_assoc cmd during change STA operation
26618       */
26619  } wmi_tdls_peer_capabilities;
26620 
26621 #define WMI_TDLS_QOS_VO_FLAG           0
26622 #define WMI_TDLS_QOS_VI_FLAG           1
26623 #define WMI_TDLS_QOS_BK_FLAG           2
26624 #define WMI_TDLS_QOS_BE_FLAG           3
26625 #define WMI_TDLS_QOS_ACK_FLAG          4
26626 #define WMI_TDLS_QOS_SP_FLAG           5
26627 #define WMI_TDLS_QOS_MOREDATA_FLAG     7
26628 
26629 #define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps,flag) do { \
26630         (ppeer_caps)->peer_qos |=  (1 << flag);      \
26631      } while (0)
26632 #define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps,flag)   \
26633         (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
26634 
26635 #define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
26636     WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
26637 #define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
26638     WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
26639 #define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
26640     WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
26641 #define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
26642     WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
26643 #define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
26644     WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
26645 #define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
26646     WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
26647 #define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
26648     WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
26649 #define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
26650     WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
26651 #define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
26652     WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
26653 #define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
26654     WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
26655 /* SP has 2 bits */
26656 #define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps,val) do { \
26657      (ppeer_caps)->peer_qos |=  (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
26658      } while (0)
26659 #define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
26660     (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
26661 
26662 #define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
26663     WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
26664 #define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
26665     WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
26666 
26667 
26668 #define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd,flag) do { \
26669         (pset_cmd)->tdls_puapsd_mask |=  (1 << flag);      \
26670      } while (0)
26671 #define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd,flag)   \
26672         (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
26673 
26674 #define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
26675     WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
26676 #define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
26677     WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
26678 #define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
26679     WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
26680 #define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
26681     WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
26682 #define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
26683     WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
26684 #define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
26685     WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
26686 #define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
26687     WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
26688 #define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
26689     WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
26690 #define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
26691     WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
26692 #define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
26693     WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
26694 /* SP has 2 bits */
26695 #define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd,val) do { \
26696      (pset_cmd)->tdls_puapsd_mask |=  (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
26697      } while (0)
26698 #define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
26699     (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
26700 
26701 #define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
26702     WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
26703 #define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
26704     WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
26705 
26706 
26707 typedef struct {
26708     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param  */
26709     A_UINT32    tlv_header;
26710     /** unique id identifying the VDEV */
26711     A_UINT32                    vdev_id;
26712     /** peer MAC address */
26713     wmi_mac_addr                peer_macaddr;
26714     /** new TDLS state for peer (wmi_tdls_peer_state) */
26715     A_UINT32                    peer_state;
26716     /* The TLV for wmi_tdls_peer_capabilities will follow.
26717      *     wmi_tdls_peer_capabilities  peer_caps;
26718      */
26719     /** Followed by the variable length TLV chan_info:
26720      *  wmi_channel chan_info[] */
26721 } wmi_tdls_peer_update_cmd_fixed_param;
26722 
26723 /* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
26724 
26725 
26726 /* bitmap  20, 40, 80 or 160 MHz wide channel */
26727 #define WMI_TDLS_OFFCHAN_20MHZ                  0x1   /*  20 MHz wide channel */
26728 #define WMI_TDLS_OFFCHAN_40MHZ                  0x2   /*  40 MHz wide channel */
26729 #define WMI_TDLS_OFFCHAN_80MHZ                  0x4   /*  80 MHz wide channel */
26730 #define WMI_TDLS_OFFCHAN_160MHZ                 0x8   /*  160 MHz wide channel */
26731 
26732 
26733 enum wmi_tdls_offchan_mode {
26734     WMI_TDLS_ENABLE_OFFCHANNEL,
26735     WMI_TDLS_DISABLE_OFFCHANNEL, /* passive offchannel disable */
26736     WMI_TDLS_ACTIVE_DISABLE_OFFCHANNEL,
26737 };
26738 
26739 typedef struct {
26740     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param  */
26741     A_UINT32   tlv_header;
26742     /** unique id identifying the VDEV */
26743     A_UINT32   vdev_id;
26744     /** Enable/Disable TDLS offchannel */
26745     A_UINT32 offchan_mode;
26746     /** peer MAC address */
26747     wmi_mac_addr   peer_macaddr;
26748     /* Is peer initiator or responder of TDLS setup request */
26749     A_UINT32 is_peer_responder;
26750     /* off channel number*/
26751     A_UINT32 offchan_num;
26752     /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
26753     A_UINT32 offchan_bw_bitmap;
26754     /* operating class for offchan */
26755     A_UINT32 offchan_oper_class;
26756     /* off channel frequency in MHz */
26757     A_UINT32 offchan_freq;
26758 /** This fixed_param TLV is followed by the below additional TLVs:
26759  *    - wmi_channel peer_chan_info[]: optional per-peer chan_info
26760  */
26761 } wmi_tdls_set_offchan_mode_cmd_fixed_param;
26762 
26763 
26764 /** TDLS EVENTS */
26765 enum wmi_tdls_peer_notification {
26766     /** tdls discovery recommended for peer (based
26767      * on tx bytes per second > tx_discover threshold) */
26768     WMI_TDLS_SHOULD_DISCOVER,
26769     /** tdls link tear down recommended for peer
26770      * due to tx bytes per second below tx_teardown_threshold
26771      * NB: this notification sent once */
26772     WMI_TDLS_SHOULD_TEARDOWN,
26773     /** tx peer TDLS link tear down complete */
26774     WMI_TDLS_PEER_DISCONNECTED,
26775     /** TDLS/BT role change notification for connection tracker */
26776     WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
26777 };
26778 
26779 enum wmi_tdls_peer_reason {
26780     /** tdls teardown recommended due to low transmits */
26781     WMI_TDLS_TEARDOWN_REASON_TX,
26782     /** tdls link tear down recommended due to poor RSSI */
26783     WMI_TDLS_TEARDOWN_REASON_RSSI,
26784     /** tdls link tear down recommended due to offchannel scan */
26785     WMI_TDLS_TEARDOWN_REASON_SCAN,
26786     /** tdls peer disconnected due to peer deletion */
26787     WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
26788     /** tdls peer disconnected due to PTR timeout */
26789     WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
26790     /** tdls peer disconnected due wrong PTR format */
26791     WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
26792     /** tdls peer not responding */
26793     WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
26794     /** tdls entered buffer STA role, TDLS connection tracker needs to handle this */
26795     WMI_TDLS_ENTER_BUF_STA,
26796     /** tdls exited buffer STA role, TDLS connection tracker needs to handle this */
26797     WMI_TDLS_EXIT_BUF_STA,
26798     /** BT entered busy mode, TDLS connection tracker needs to handle this */
26799     WMI_TDLS_ENTER_BT_BUSY_MODE,
26800     /** BT exited busy mode, TDLS connection tracker needs to handle this */
26801     WMI_TDLS_EXIT_BT_BUSY_MODE,
26802     /** TDLS module received a scan start event, TDLS connection tracker needs to handle this */
26803     WMI_TDLS_SCAN_STARTED_EVENT,
26804     /** TDLS module received a scan complete event, TDLS connection tracker needs to handle this */
26805     WMI_TDLS_SCAN_COMPLETED_EVENT,
26806 };
26807 
26808 /* WMI_TDLS_PEER_EVENTID */
26809 typedef struct {
26810     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param  */
26811     A_UINT32    tlv_header;
26812     /** peer MAC address */
26813     wmi_mac_addr    peer_macaddr;
26814     /** TDLS peer status (wmi_tdls_peer_notification)*/
26815     A_UINT32        peer_status;
26816     /** TDLS peer reason (wmi_tdls_peer_reason) */
26817     A_UINT32        peer_reason;
26818     /** unique id identifying the VDEV */
26819     A_UINT32        vdev_id;
26820 } wmi_tdls_peer_event_fixed_param;
26821 
26822 /* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
26823  don't use this for any new implementations */
26824 typedef struct {
26825     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param  */
26826     /** unique id identifying the VDEV, generated by the caller */
26827     A_UINT32 vdev_id;
26828     /* New beacon interval to be used for the specified VDEV suggested by firmware */
26829     A_UINT32 new_bcn_intvl;
26830 } wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
26831 
26832 /* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
26833 typedef struct {
26834     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
26835     A_UINT32 tlv_header;
26836     /** 1: enable fw based adaptive ocs,
26837      *  0: disable fw based adaptive ocs
26838      */
26839     A_UINT32 enable;
26840     /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
26841     union {
26842         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
26843         /** pdev_id for identifying the MAC
26844          * See macros starting with WMI_PDEV_ID_ for values.
26845          */
26846         A_UINT32 pdev_id;
26847     };
26848 } wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
26849 
26850 /* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
26851 typedef struct {
26852     /* Frequency of the channel for which the quota is set */
26853     A_UINT32 chan_mhz;
26854     /* Requested channel time quota expressed as percentage */
26855     A_UINT32 channel_time_quota;
26856 } wmi_resmgr_chan_time_quota;
26857 
26858 typedef struct {
26859     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_chan_time_quota_tlv */
26860     A_UINT32 tlv_header;
26861     wmi_resmgr_chan_time_quota chan_time_quota;
26862 } wmi_resmgr_chan_time_quota_tlv;
26863 
26864 typedef struct {
26865     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
26866     A_UINT32 tlv_header;
26867     /** number of channel time quota command structures
26868      * (wmi_resmgr_chan_time_quota) 1 or 2
26869      */
26870     A_UINT32 num_chans;
26871 /* This TLV is followed by another TLV of array of bytes
26872  * A_UINT8 data[];
26873  * This data array contains
26874  * num_chans * size of(struct wmi_resmgr_chan_time_quota)
26875  */
26876 } wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
26877 
26878 typedef enum {
26879     WMI_RESMGR_QUOTA_TYPE_CLEAR   = 0,
26880     WMI_RESMGR_QUOTA_TYPE_FIXED   = 1,
26881     WMI_RESMGR_QUOTA_TYPE_DYNAMIC = 2,
26882 } wmi_resmgr_quota_type;
26883 
26884 typedef struct {
26885     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_chan_time_quota_changed_event_fixed_param */
26886     A_UINT32 tlv_header;
26887     /** quota_type: refer to wmi_resmgr_quota_type
26888      *  0 :  clear  quota
26889      *  1 :  fixed  quota
26890      *  2 : dynamic quota
26891      */
26892     A_UINT32 quota_type;
26893 
26894 /* This TLV is followed by another TLV of array of struct
26895  * wmi_resmgr_chan_time_quota_tlv chan_quota[num_chans];
26896  */
26897 } wmi_resmgr_chan_time_quota_changed_event_fixed_param;
26898 
26899 /* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
26900 typedef struct {
26901     /* Frequency of the channel for which the latency is set */
26902     A_UINT32 chan_mhz;
26903     /* Requested channel latency in milliseconds */
26904     A_UINT32 latency;
26905 } wmi_resmgr_chan_latency;
26906 
26907 typedef struct {
26908     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
26909     A_UINT32 tlv_header;
26910     /** number of channel latency command structures
26911      * (wmi_resmgr_chan_latency) 1 or 2
26912      */
26913     A_UINT32 num_chans;
26914 /* This TLV is followed by another TLV of array of bytes
26915  * A_UINT8 data[];
26916  * This data array contains
26917  * num_chans * size of(struct wmi_resmgr_chan_latency)
26918  */
26919 } wmi_resmgr_set_chan_latency_cmd_fixed_param;
26920 
26921 /* WMI_STA_SMPS_FORCE_MODE_CMDID */
26922 
26923 /** STA SMPS Forced Mode */
26924 typedef enum {
26925     WMI_SMPS_FORCED_MODE_NONE = 0,
26926     WMI_SMPS_FORCED_MODE_DISABLED,
26927     WMI_SMPS_FORCED_MODE_STATIC,
26928     WMI_SMPS_FORCED_MODE_DYNAMIC
26929 } wmi_sta_smps_forced_mode;
26930 
26931 typedef struct {
26932     /** TLV tag and len; tag equals
26933      *  WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
26934     A_UINT32 tlv_header;
26935     /** Unique id identifying the VDEV */
26936     A_UINT32 vdev_id;
26937     /** The mode of SMPS that is to be forced in the FW. */
26938     A_UINT32 forced_mode;
26939 } wmi_sta_smps_force_mode_cmd_fixed_param;
26940 
26941 /** wlan HB commands */
26942 #define WMI_WLAN_HB_ITEM_UDP            0x1
26943 #define WMI_WLAN_HB_ITEM_TCP            0x2
26944 #define WMI_WLAN_HB_MAX_FILTER_SIZE     32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE,
26945                                               must be a multiple of 4 bytes */
26946 
26947 typedef struct {
26948     /** TLV tag and len; tag equals
26949      *  WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
26950     A_UINT32 tlv_header;     /** TLV header*/
26951     A_UINT32 vdev_id;        /** Vdev ID */
26952     A_UINT32 enable;         /** 1: Enable, 0: Disable`*/
26953     A_UINT32 item;           /** 1: UDP, 2: TCP */
26954     A_UINT32 session;        /** Session ID from HOST */
26955 } wmi_hb_set_enable_cmd_fixed_param;
26956 
26957 typedef struct {
26958     /** TLV tag and len; tag equals
26959      *  WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
26960     A_UINT32 tlv_header;      /** TLV header*/
26961     A_UINT32 vdev_id;         /** Vdev ID */
26962     A_UINT32 srv_ip;          /** Server IP address (IPv4) */
26963     A_UINT32 dev_ip;          /** Device IP address (IPv4) */
26964     A_UINT32 seq;             /** TCP Sequence no */
26965     A_UINT32 src_port;        /** Source port */
26966     A_UINT32 dst_port;        /** Destination port */
26967     A_UINT32 interval;        /** Keep alive interval */
26968     A_UINT32 timeout;         /** Timeout if keep alive fails */
26969     A_UINT32 session;         /** Session ID from HOST */
26970     wmi_mac_addr gateway_mac; /** Server Mac Address */
26971 } wmi_hb_set_tcp_params_cmd_fixed_param;
26972 
26973 typedef struct {
26974     /** TLV tag and len; tag equals
26975      *  WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
26976     A_UINT32 tlv_header;
26977     A_UINT32 vdev_id;
26978     A_UINT32 length;
26979     A_UINT32 offset;
26980     A_UINT32 session;
26981     A_UINT8  filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
26982 } wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
26983 
26984 typedef struct {
26985     /** TLV tag and len; tag equals
26986      *  WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
26987     A_UINT32 tlv_header;
26988     A_UINT32 vdev_id;
26989     A_UINT32 srv_ip;
26990     A_UINT32 dev_ip;
26991     A_UINT32 src_port;
26992     A_UINT32 dst_port;
26993     A_UINT32 interval;
26994     A_UINT32 timeout;
26995     A_UINT32 session;
26996     wmi_mac_addr gateway_mac;
26997 } wmi_hb_set_udp_params_cmd_fixed_param;
26998 
26999 typedef struct {
27000     /** TLV tag and len; tag equals
27001      *  WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
27002     A_UINT32 tlv_header;
27003     A_UINT32 vdev_id;
27004     A_UINT32 length;
27005     A_UINT32 offset;
27006     A_UINT32 session;
27007     A_UINT8  filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
27008 } wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
27009 
27010 /** wlan HB events */
27011 typedef enum {
27012     WMI_WLAN_HB_REASON_UNKNOWN      = 0,
27013     WMI_WLAN_HB_REASON_TCP_TIMEOUT  = 1,
27014     WMI_WLAN_HB_REASON_UDP_TIMEOUT  = 2,
27015 } WMI_HB_WAKEUP_REASON;
27016 
27017 typedef struct {
27018     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
27019     A_UINT32 vdev_id;    /** unique id identifying the VDEV */
27020     A_UINT32 session;    /** Session ID from HOST */
27021     A_UINT32 reason;     /** wakeup reason */
27022 } wmi_hb_ind_event_fixed_param;
27023 
27024 typedef struct {
27025     /** TLV tag and len; tag equals
27026      *  WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
27027     A_UINT32 tlv_header;           /** TLV Header */
27028     A_UINT32 vdev_id;              /** Vdev ID */
27029     A_UINT32 session;              /** Session number from the HOST */
27030     A_UINT32 srv_ip;               /** IPv4 address of the OCF server */
27031     A_UINT32 dev_ip;               /** IPv4 address of the device */
27032     A_UINT32 tcp_tx_seq;           /** TCP sequence number */
27033     A_UINT32 src_port;             /** Source port */
27034     A_UINT32 dst_port;             /** Destination port */
27035     A_UINT32 protocol;             /** Protocol used: TCP:0, UDP:1 */
27036     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 */
27037     A_UINT32 timeout_retries;      /** timeout[31:16]: TCP ACK timeout, time to wait for a TCP ACK in ms
27038                                        retries[15:0]: Number of TCP level retries of OIC ping request */
27039     wmi_mac_addr peer_macaddr;     /** MAC address of the OCF server */
27040     A_UINT32 oic_ping_pkt0;        /** OIC ping packet content [Byte03:Byte00] */
27041     A_UINT32 oic_ping_pkt1;        /** OIC ping packet content [Byte07:Byte04] */
27042     A_UINT32 oic_ping_pkt2;        /** OIC ping packet content [Byte11:Byte08] */
27043     A_UINT32 oic_ping_pkt3;        /** OIC ping packet content [Byte15:Byte12] */
27044 
27045     A_UINT32 tls_cipher_suite_version; /** Cipher suite [31:16] as defined in https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml
27046                                        TLS version  [15:00] */
27047     A_UINT32 tls_tx_seq0;          /** Tx sequence number [31:00], incremented after every TLS packet transmission */
27048     A_UINT32 tls_tx_seq1;          /** Tx sequence number [63:32] */
27049     A_UINT32 tls_rx_seq0;          /** Rx sequence number [31:00], incremented after every TLS packet reception */
27050     A_UINT32 tls_rx_seq1;          /** Rx sequence number [63:32] */
27051     A_UINT32 tls_tx_key0;          /** client_write_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
27052     A_UINT32 tls_tx_key1;          /** client_write_key[Byte07:Byte04] */
27053     A_UINT32 tls_tx_key2;          /** client_write_key[Byte11:Byte08] */
27054     A_UINT32 tls_tx_key3;          /** client_write_key[Byte15:Byte12] */
27055     A_UINT32 tls_rx_key0;          /** server_write_key[Byte03:Byte00] */
27056     A_UINT32 tls_rx_key1;          /** server_write_key[Byte07:Byte04] */
27057     A_UINT32 tls_rx_key2;          /** server_write_key[Byte11:Byte08] */
27058     A_UINT32 tls_rx_key3;          /** server_write_key[Byte15:Byte12] */
27059     A_UINT32 tls_MAC_write_key0;   /** client_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
27060     A_UINT32 tls_MAC_write_key1;   /** client_write_MAC_key[Byte07:Byte04] */
27061     A_UINT32 tls_MAC_write_key2;   /** client_write_MAC_key[Byte11:Byte08] */
27062     A_UINT32 tls_MAC_write_key3;   /** client_write_MAC_key[Byte15:Byte12] */
27063     A_UINT32 tls_MAC_write_key4;   /** client_write_MAC_key[Byte19:Byte16] */
27064     A_UINT32 tls_MAC_write_key5;   /** client_write_MAC_key[Byte23:Byte20] */
27065     A_UINT32 tls_MAC_write_key6;   /** client_write_MAC_key[Byte27:Byte24] */
27066     A_UINT32 tls_MAC_write_key7;   /** client_write_MAC_key[Byte31:Byte28] */
27067     A_UINT32 tls_MAC_read_key0;    /** server_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
27068     A_UINT32 tls_MAC_read_key1;    /** server_write_MAC_key[Byte07:Byte04] */
27069     A_UINT32 tls_MAC_read_key2;    /** server_write_MAC_key[Byte11:Byte08] */
27070     A_UINT32 tls_MAC_read_key3;    /** server_write_MAC_key[Byte15:Byte12] */
27071     A_UINT32 tls_MAC_read_key4;    /** server_write_MAC_key[Byte19:Byte16] */
27072     A_UINT32 tls_MAC_read_key5;    /** server_write_MAC_key[Byte23:Byte20] */
27073     A_UINT32 tls_MAC_read_key6;    /** server_write_MAC_key[Byte27:Byte24] */
27074     A_UINT32 tls_MAC_read_key7;    /** server_write_MAC_key[Byte31:Byte28] */
27075     A_UINT32 tls_client_IV0;       /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
27076                                    GCM Mode: GCMNonce.salt [Byte03:Byte00] refer Section 3 of RFC 5288 */
27077     A_UINT32 tls_client_IV1;       /** CBC Mode: CBC_residue [Byte7:Byte4] */
27078     A_UINT32 tls_client_IV2;       /** CBC Mode: CBC_residue [Byte11:Byte8] */
27079     A_UINT32 tls_client_IV3;       /** CBC Mode: CBC_residue [Byte15:Byte12] */
27080     A_UINT32 tls_server_IV0;       /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
27081                                    GCM Mode: GCMNonce.salt [Byte4: Byte0] refer Section 3 of RFC 5288 */
27082     A_UINT32 tls_server_IV1;       /** CBC Mode: CBC_residue [Byte7:Byte4] */
27083     A_UINT32 tls_server_IV2;       /** CBC Mode: CBC_residue [Byte11:Byte8] */
27084     A_UINT32 tls_server_IV3;       /** CBC Mode: CBC_residue [Byte15:Byte12] */
27085 } wmi_oic_ping_offload_params_cmd_fixed_param;
27086 
27087 typedef struct {
27088     /** TLV tag and len; tag equals
27089      *  WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
27090     A_UINT32 tlv_header; /** TLV Header*/
27091     A_UINT32 vdev_id;    /** Interface number */
27092     A_UINT32 session;    /** Session ID*/
27093     A_UINT32 enable;     /** 1: Enable , 0: Disable */
27094 } wmi_oic_ping_offload_set_enable_cmd_fixed_param;
27095 
27096 /** wlan OIC events */
27097 typedef enum {
27098     WMI_WLAN_OIC_REASON_UNKNOWN      = 0, /** Unknown */
27099     WMI_WLAN_OIC_REASON_HOST_WAKE    = 1, /** No error , but host is woken up due to other reasons */
27100     WMI_WLAN_OIC_REASON_TCP_TIMEOUT  = 2, /** TCP Timeout */
27101     WMI_WLAN_OIC_REASON_PING_TIMEOUT = 3, /** OIC Ping resposnse timeout */
27102     WMI_WLAN_OIC_REASON_TLS_ERROR    = 4, /** TLS decryption error */
27103 } WMI_OIC_WAKEUP_REASON;
27104 
27105 typedef struct {
27106     A_UINT32 tlv_header;           /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oic_ind_event_fixed_param */
27107     A_UINT32 vdev_id;              /** unique id identifying the VDEV */
27108     A_UINT32 session;              /** Session ID from driver */
27109     A_UINT32 reason;               /** wakeup reason as per WMI_OIC_WAKEUP_REASON */
27110     A_UINT32 tcp_tx_seq;           /** Current TCP sequence number */
27111     A_UINT32 tcp_ack_num;          /** Current TCP Acknowledgement number */
27112     A_UINT32 tls_tx_seq0;          /** Tx sequence number [31:00], incremented after every TLS packet transmission */
27113     A_UINT32 tls_tx_seq1;          /** Tx sequence number [63:32] */
27114     A_UINT32 tls_rx_seq0;          /** Rx sequence number [31:00], incremented after every TLS packet reception */
27115     A_UINT32 tls_rx_seq1;          /** Rx sequence number [63:32] */
27116     A_UINT32 tls_client_IV0;       /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
27117     A_UINT32 tls_client_IV1;       /** CBC Mode: CBC_residue [Byte7:Byte4] */
27118     A_UINT32 tls_client_IV2;       /** CBC Mode: CBC_residue [Byte11:Byte8] */
27119     A_UINT32 tls_client_IV3;       /** CBC Mode: CBC_residue [Byte15:Byte12] */
27120     A_UINT32 tls_server_IV0;       /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
27121     A_UINT32 tls_server_IV1;       /** CBC Mode: CBC_residue [Byte7:Byte4] */
27122     A_UINT32 tls_server_IV2;       /** CBC Mode: CBC_residue [Byte11:Byte8] */
27123     A_UINT32 tls_server_IV3;       /** CBC Mode: CBC_residue [Byte15:Byte12] */
27124 } wmi_oic_ping_handoff_event;
27125 
27126 typedef struct {
27127    /** TLV tag and len; tag equals
27128     * WMITLV_TAG_STRUC_wmi_dhcp_lease_renew_offload_fixed_param */
27129     A_UINT32 tlv_header;     /** TLV Header*/
27130     A_UINT32 vdev_id;        /** Vdev ID */
27131     A_UINT32 enable;         /** 1: Enable 0: Disable*/
27132     A_UINT32 srv_ip;         /** DHCP Server IP address (IPv4) */
27133     A_UINT32 client_ip;      /** Device IP address (IPv4) */
27134     wmi_mac_addr srv_mac;    /** DHCP Server MAC address */
27135     A_UINT32 parameter_list; /** Optional Parameter list. RFC 1533 gives the complete set of options defined for use with DHCP */
27136 } wmi_dhcp_lease_renew_offload_cmd_fixed_param;
27137 
27138 /** WLAN DHCP Lease Renew Events */
27139 typedef enum {
27140     WMI_WLAN_DHCP_RENEW_REASON_UNKNOWN  = 0, /** Unknown */
27141     WMI_WLAN_DHCP_RENEW_REASON_ACK_TIMEOUT  = 1, /** DHCP ACK Timeout */
27142     WMI_WLAN_DHCP_RENEW_REASON_NACK     = 2, /** DHCP error */
27143 } WMI_DHCP_RENEW_WAKEUP_REASON;
27144 
27145 typedef struct {
27146     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dhcp_renew_ind_event_fixed_param */
27147     A_UINT32 vdev_id;    /** unique id identifying the VDEV */
27148     A_UINT32 reason;     /** wakeup reason as per enum WMI_DHCP_RENEW_WAKEUP_REASON*/
27149 } wmi_dhcp_lease_renew_event;
27150 
27151 /** WMI_STA_SMPS_PARAM_CMDID */
27152 typedef enum {
27153     /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
27154     WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
27155     /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
27156      * to enter D-SMPS mode from Stalled-D-SMPS mode */
27157     WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
27158     /** RSSI threshold to disable SMPS modes */
27159     WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
27160     /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
27161     WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
27162     /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
27163     WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
27164     /** Enable/Disable DTIM 1chRx feature */
27165     WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5,
27166     /** Enable/Disable dynamic bw feature */
27167     WMI_STA_SMPS_PARAM_DYNAMIC_BW_SWITCH = 6,
27168 } wmi_sta_smps_param;
27169 
27170 typedef struct {
27171     /** TLV tag and len; tag equals
27172      *  WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
27173     A_UINT32 tlv_header;
27174     /** Unique id identifying the VDEV */
27175     A_UINT32 vdev_id;
27176     /** SMPS parameter (see wmi_sta_smps_param) */
27177     A_UINT32 param;
27178     /** Value of SMPS parameter */
27179     A_UINT32 value;
27180 } wmi_sta_smps_param_cmd_fixed_param;
27181 
27182 typedef struct {
27183     /** TLV tag and len; tag equals
27184      * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
27185     A_UINT32 tlv_header;
27186     /* TX stats */
27187     A_UINT32 txBytesPushed;
27188     A_UINT32 txPacketsPushed;
27189     /* RX stats */
27190     A_UINT32 rxBytesRcvd;
27191     A_UINT32 rxPacketsRcvd;
27192     A_UINT32 rxTimeTotal;
27193     /** peer MAC address */
27194     wmi_mac_addr peer_macaddr;
27195 } wmi_mcc_sched_sta_traffic_stats;
27196 
27197 typedef struct {
27198     /** TLV tag and len; tag equals
27199      * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
27200     A_UINT32 tlv_header;
27201     /** Duration over which the host stats were collected */
27202     A_UINT32 duration;
27203     /** Number of stations filled in following stats array */
27204     A_UINT32 num_sta;
27205     /* Following this struct are the TLVs:
27206      * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
27207      */
27208 } wmi_mcc_sched_traffic_stats_cmd_fixed_param;
27209 
27210 typedef struct
27211 {
27212     A_UINT32 tlv_header;     /* TLV tag and len; tag equals  WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
27213     /* unique id identifying the VDEV, generated by the caller */
27214     A_UINT32 vdev_id;
27215     /*Batch scan enable command parameters*/
27216     A_UINT32 scanInterval;
27217     A_UINT32 numScan2Batch;
27218     A_UINT32 bestNetworks;
27219     A_UINT32 rfBand;
27220     A_UINT32 rtt;
27221 } wmi_batch_scan_enable_cmd_fixed_param;
27222 
27223 typedef struct
27224 {
27225     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param  */
27226     A_UINT32 supportedMscan;
27227 }  wmi_batch_scan_enabled_event_fixed_param;
27228 
27229 typedef struct
27230 {
27231     A_UINT32 tlv_header;     /* TLV tag and len; tag equals  WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
27232     /* unique id identifying the VDEV, generated by the caller */
27233     A_UINT32 vdev_id;
27234     A_UINT32   param;
27235 } wmi_batch_scan_disable_cmd_fixed_param;
27236 
27237 typedef struct
27238 {
27239     A_UINT32 tlv_header;     /* TLV tag and len; tag equals  WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
27240  /** unique id identifying the VDEV, generated by the caller */
27241     A_UINT32 vdev_id;
27242     A_UINT32 param;
27243 } wmi_batch_scan_trigger_result_cmd_fixed_param;
27244 
27245 typedef struct
27246 {
27247     A_UINT32 tlv_header;
27248     wmi_mac_addr   bssid;     /* BSSID */
27249     wmi_ssid   ssid;     /* SSID */
27250     A_UINT32   ch;           /* Channel number */
27251     A_UINT32   rssi;         /* RSSI or Level */
27252     /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
27253     A_UINT32  timestamp;
27254     A_UINT32  ch_freq; /* Channel frequency in MHz */
27255 } wmi_batch_scan_result_network_info;
27256 
27257 typedef struct
27258 {
27259     A_UINT32 tlv_header;
27260     A_UINT32 scanId;                         /* Scan List ID. */
27261     /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
27262     A_UINT32 numNetworksInScanList;
27263     A_UINT32 netWorkStartIndex;  /* indicate the start index of network info*/
27264 } wmi_batch_scan_result_scan_list;
27265 
27266 #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. */
27267 #define LPI_IE_BITMAP_IS_PROBE               0x00000002     /* send true or false based on scan response frame being a Probe Rsp or not */
27268 #define LPI_IE_BITMAP_SSID                   0x00000004     /* send ssid from received scan response frame */
27269 #define LPI_IE_BITMAP_RSSI                   0x00000008     /* send RSSI value reported by HW for the received scan response after adjusting with noise floor */
27270 #define LPI_IE_BITMAP_CHAN                   0x00000010     /* send channel number from the received scan response */
27271 #define LPI_IE_BITMAP_AP_TX_PWR              0x00000020     /* send Tx power from TPC IE of scan rsp */
27272 #define LPI_IE_BITMAP_TX_RATE                0x00000040     /* send rate of the received frame as reported by HW. */
27273 #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. */
27274 #define LPI_IE_BITMAP_TSF_TIMER_VALUE        0x00000100     /* send timestamp reported in the received scan rsp frame. */
27275 #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. */
27276 /*
27277  * TEMPORARY alias of incorrect old name the correct name.
27278  * This alias will be removed once all references to the old name have been fixed.
27279  */
27280 #define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
27281 #define LPI_IE_BITMAP_CONN_STATUS            0x00000400     /* If an infra STA is active and connected to an AP, true value is sent else false. */
27282 #define LPI_IE_BITMAP_MSAP_IE                0x00000800     /* info on the vendor specific proprietary IE MSAP */
27283 #define LPI_IE_BITMAP_SEC_STATUS             0x00001000     /* we indicate true or false based on if the AP has WPA or RSN security enabled */
27284 #define LPI_IE_BITMAP_DEVICE_TYPE            0x00002000     /* info about the beacons coming from an AP or P2P or NAN device. */
27285 #define LPI_IE_BITMAP_CHAN_IS_PASSIVE        0x00004000     /* info on whether the scan rsp was received from a passive channel */
27286 #define LPI_IE_BITMAP_DWELL_TIME             0x00008000     /* send the scan dwell time of the channel on which the current scan rsp frame was received. */
27287 #define LPI_IE_BITMAP_BAND_CENTER_FREQ1      0x00010000     /* the center frequencies in case AP is supporting wider channels than 20 MHz */
27288 #define LPI_IE_BITMAP_BAND_CENTER_FREQ2      0x00020000     /* same as above */
27289 #define LPI_IE_BITMAP_PHY_MODE               0x00040000     /* PHY mode indicates a, b, ,g, ac and other combinations */
27290 #define LPI_IE_BITMAP_SCAN_MODULE_ID         0x00080000     /* scan module id indicates the scan client who originated the scan */
27291 #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. */
27292 #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 */
27293 #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 */
27294 #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. */
27295 #define LPI_IE_BITMAP_CHRE_RADIO_CHAIN       0x01000000     /* include radio chain and RSSI per chain information if this bit is set - for CHRE */
27296 #define LPI_IE_BITMAP_CHRE_SEC_MODE_MRSNO_WIFI6 0x02000000  /* include MRSNO IE's sec_mode information for WiFi6 if this bit is set - for CHRE */
27297 #define LPI_IE_BITMAP_CHRE_SEC_MODE_MRSNO_WIFI7 0x04000000  /* include MRSNO IE's sec_mode information for WiFi7 if this bit is set - for CHRE */
27298 
27299 /* 0x08000000 is unused / available */
27300 
27301 #define LPI_IE_BITMAP_CHRE_ESS               0x10000000     /* ESS capability info for CHRE */
27302 #define LPI_IE_BITMAP_CHRE_SEC_MODE          0x20000000     /* Security capability info for CHRE */
27303 #define LPI_IE_BITMAP_CHRE_SUPPORTED_RATE    0x40000000     /* Highest MCS corresponding NCC for TX and RX */
27304 #define LPI_IE_BITMAP_ALL                    0xFFFFFFFF
27305 
27306 typedef struct {
27307     A_UINT32 tlv_header;
27308     /**A_BOOL indicates LPI mgmt snooping enable/disable*/
27309     A_UINT32 enable;
27310     /**LPI snooping mode*/
27311     A_UINT32 snooping_mode;
27312     /** LPI interested IEs in snooping context */
27313     A_UINT32 ie_bitmap;
27314 } wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
27315 
27316 typedef struct {
27317     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
27318     /** Scan ID */
27319     A_UINT32 scan_id;
27320     /** Scan requestor ID */
27321     A_UINT32 scan_req_id;
27322     /** VDEV id(interface) that is requesting scan */
27323     A_UINT32 vdev_id;
27324     /** LPI interested IEs in scan context */
27325     A_UINT32 ie_bitmap;
27326     /** Scan Priority, input to scan scheduler */
27327     A_UINT32 scan_priority;
27328     /** dwell time in msec on active channels */
27329     A_UINT32 dwell_time_active;
27330     /** dwell time in msec on passive channels */
27331     A_UINT32 dwell_time_passive;
27332     /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
27333     A_UINT32 min_rest_time;
27334     /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
27335     /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
27336      *  will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
27337      *  switch to off channel. if there is activity the scanner will let the radio on the bss channel
27338      *  until max_rest_time expires.at max_rest_time scanner will switch to off channel
27339      *  irrespective of activity. activity is determined by the idle_time parameter.
27340      */
27341     A_UINT32 max_rest_time;
27342     /** time before sending next set of probe requests.
27343      *   The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
27344      *   The number of probe requests specified depends on the ssid_list and bssid_list
27345      */
27346     A_UINT32 repeat_probe_time;
27347     /** time in msec between 2 consecutive probe requests with in a set. */
27348     A_UINT32 probe_spacing_time;
27349     /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity  */
27350     A_UINT32 idle_time;
27351     /** maximum time in msec allowed for scan  */
27352     A_UINT32 max_scan_time;
27353     /** delay in msec before sending first probe request after switching to a channel */
27354     A_UINT32 probe_delay;
27355     /** Scan control flags */
27356     A_UINT32 scan_ctrl_flags;
27357     /** Burst duration time in msec*/
27358     A_UINT32 burst_duration;
27359 
27360     /** # if channels to scan. In the TLV channel_list[] */
27361     A_UINT32 num_chan;
27362     /** number of bssids. In the TLV bssid_list[] */
27363     A_UINT32 num_bssid;
27364     /** number of ssid. In the TLV ssid_list[] */
27365     A_UINT32 num_ssids;
27366     /** number of bytes in ie data. In the TLV ie_data[] */
27367     A_UINT32 ie_len;
27368     /** Scan control flags extended (see WMI_SCAN_FLAG_EXT_xxx) */
27369     A_UINT32 scan_ctrl_flags_ext;
27370 
27371 /**
27372  * TLV (tag length value) parameters follow the scan_cmd
27373  * structure. The TLV's are:
27374  *     A_UINT32 channel_list[]; // in MHz
27375  *     wmi_ssid ssid_list[];
27376  *     wmi_mac_addr bssid_list[];
27377  *     A_UINT8 ie_data[];
27378  */
27379 } wmi_lpi_start_scan_cmd_fixed_param;
27380 
27381 typedef struct {
27382     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
27383     /** Scan requestor ID */
27384     A_UINT32 scan_req_id;
27385     /** Scan ID */
27386     A_UINT32 scan_id;
27387     /**
27388      * Req Type
27389      * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
27390      * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
27391      * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
27392      * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
27393      */
27394     A_UINT32 req_type;
27395     /**
27396      * vDev ID
27397      * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
27398      */
27399     A_UINT32 vdev_id;
27400 } wmi_lpi_stop_scan_cmd_fixed_param;
27401 
27402 typedef enum {
27403    WMI_LPI_DEVICE_TYPE_AP = 1,
27404    WMI_LPI_DEVICE_TYPE_P2P = 2,
27405    WMI_LPI_DEVICE_TYPE_NAN = 3,
27406 } wmi_lpi_device_type;
27407 
27408 typedef struct
27409 {
27410     A_UINT32 tlv_header;
27411     /** Scan requestor ID */
27412     A_UINT32 scan_req_id;
27413     A_UINT32 ie_bitmap;
27414     A_UINT32 data_len;
27415 }  wmi_lpi_result_event_fixed_param;
27416 
27417 typedef enum {
27418    /** User scan Request completed */
27419    WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
27420    /** User Request was never serviced */
27421    WMI_LPI_STATUS_DROPPED_REQ = 1,
27422    /** Illegal channel Req */
27423    WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
27424    /** Illegal Operation Req */
27425    WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
27426    /** Request Aborted */
27427    WMI_LPI_STATUS_REQ_ABORTED = 4,
27428    /** Request Timed Out */
27429    WMI_LPI_STATUS_REQ_TIME_OUT = 5,
27430    /** Medium Busy, already there
27431     * is a scan is going on */
27432    WMI_LPI_STATUS_MEDIUM_BUSY = 6,
27433    /** Extscan is the scan client whose scan complete event is triggered */
27434    WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
27435 } wmi_lpi_staus;
27436 
27437 typedef struct
27438 {
27439     A_UINT32      tlv_header;
27440     wmi_lpi_staus status;
27441     /** Scan requestor ID */
27442     A_UINT32      scan_req_id;
27443 }  wmi_lpi_status_event_fixed_param;
27444 
27445 typedef struct
27446 {
27447     A_UINT32      tlv_header;
27448     wmi_mac_addr  bssid;
27449     wmi_ssid      ssid;
27450     A_UINT32      freq;
27451     A_UINT32      rssi;
27452     A_UINT32      vdev_id;
27453 }  wmi_lpi_handoff_event_fixed_param;
27454 
27455 typedef struct
27456 {
27457     A_UINT32 tlv_header;
27458     A_UINT32 timestamp;   /*timestamp of batch scan event*/
27459     A_UINT32 numScanLists;  /*number of scan in this event*/
27460     A_UINT32 isLastResult;  /*is this event a last event of the whole batch scan*/
27461 }  wmi_batch_scan_result_event_fixed_param;
27462 
27463 typedef enum {
27464     /** beacons not received from P2P GO */
27465     WMI_P2P_GO_BMISS = 0,
27466     /** beacons not received from P2 GO's STA's connected AP */
27467     WMI_DFS_AP_BMISS = 1,
27468 } wmi_dfs_ap_bmiss_reason;
27469 
27470 typedef struct {
27471     A_UINT32 tlv_header;  /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_cli_dfs_ap_bmiss_fixed_param*/
27472     A_UINT32 vdev_id;
27473     A_UINT32 reason_code; /* contains a wmi_dfs_ap_bmiss_reason value */
27474 } wmi_p2p_cli_dfs_ap_bmiss_fixed_param;
27475 
27476 typedef struct {
27477     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param  */
27478     A_UINT32 vdev_id;
27479 /* This TLV is followed by p2p_noa_info for vdev :
27480  *     wmi_p2p_noa_info p2p_noa_info;
27481  */
27482 } wmi_p2p_noa_event_fixed_param;
27483 
27484 #define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET      6
27485 #define WMI_RFKILL_CFG_RADIO_LEVEL_MASK      0x1
27486 
27487 #define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET      0
27488 #define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK      0x3f
27489 
27490 #define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET      7
27491 #define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK      0xf
27492 
27493 typedef struct {
27494     /** TLV tag and len; tag equals
27495      * */
27496     A_UINT32 tlv_header;
27497     /** gpip pin number */
27498     A_UINT32 gpio_pin_num;
27499     /** gpio interrupt type */
27500     A_UINT32 int_type;
27501     /** RF radio status */
27502     A_UINT32 radio_state;
27503 } wmi_rfkill_mode_param;
27504 
27505 typedef enum {
27506     WMI_SET_LED_SYS_POWEROFF,
27507     WMI_SET_LED_SYS_S3_SUSPEND,
27508     WMI_SET_LED_SYS_S4_S5,
27509     WMI_SET_LED_SYS_DRIVER_DISABLE,
27510     WMI_SET_LED_SYS_WAKEUP,
27511     WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
27512     WMI_SET_LED_SYS_POWERON,
27513 } wmi_led_sys_state_param;
27514 
27515 typedef enum {
27516     WMI_CONFIG_LED_TO_VDD = 0,
27517     WMI_CONFIG_LED_TO_GND = 1,
27518 } wmi_config_led_connect_type;
27519 
27520 typedef enum {
27521    WMI_CONFIG_LED_NOT_WITH_BT = 0,
27522    WMI_CONFIG_LED_WITH_BT = 1,
27523 } wmi_config_led_with_bt_flag;
27524 
27525 typedef enum {
27526    WMI_CONFIG_LED_DISABLE = 0,
27527    WMI_CONFIG_LED_ENABLE  = 1,
27528 } wmi_config_led_enable_flag;
27529 
27530 typedef enum {
27531     WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0,
27532     WMI_CONFIG_LED_HIGH_OFF         = 1,
27533     WMI_CONFIG_LED_HIGH_ON          = 2,
27534 } wmi_config_led_on_flag;
27535 
27536 typedef enum {
27537     WMI_CONFIG_LED_UNSPECIFIED = 0,
27538     WMI_CONFIG_LED_ON          = 1,
27539     WMI_CONFIG_LED_OFF         = 2,
27540     WMI_CONFIG_LED_DIM         = 3,
27541     WMI_CONFIG_LED_BLINK       = 4,
27542     WMI_CONFIG_LED_TXRX        = 5,
27543 } wmi_config_led_operation_type;
27544 
27545 typedef struct {
27546     /** TLV tag and len; tag equals
27547      *  WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */
27548     A_UINT32 tlv_header;
27549     /* Set GPIO pin */
27550     A_UINT32 led_gpio_pin;
27551     /* Set connect type defined in wmi_config_led_connect_type */
27552     A_UINT32 connect_type;
27553     /* Set flag defined in wmi_config_led_with_bt_flag*/
27554     A_UINT32 with_bt;
27555     /* Set LED enablement defined in wmi_config_led_enable_flag */
27556     A_UINT32 led_enable;
27557     /** pdev_id for identifying the MAC
27558      * See macros starting with WMI_PDEV_ID_ for values.
27559      */
27560     A_UINT32 pdev_id;
27561     /* see wmi_config_led_operation_type enum */
27562     A_UINT32 led_operation_type;
27563     /* see wmi_config_led_on_flag enum */
27564     A_UINT32 led_on_flag;      /* configure high/low on/off sense */
27565     A_UINT32 led_on_interval;  /* for blink function; unit: ms */
27566     A_UINT32 led_off_interval; /* for blink function; unit: ms */
27567     A_UINT32 led_repeat_cnt;   /* for blink function: how many blinks */
27568 } wmi_pdev_set_led_config_cmd_fixed_param;
27569 
27570 #define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
27571 #define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK   0xff
27572 
27573 /** WMI_SMARTANT_STATE_CHANGE_EVENTIDWMI_SMARTANT_STATE_CHANGE_EVENTID
27574  *    report Smart Antenna status to host */
27575 typedef struct {
27576     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_smartant_event_fixed_param */
27577     A_UINT32 tlv_header;
27578     /** whether Antenna Controller is still alive or offline. */
27579     A_UINT32 smart_ant_AC_alive;
27580 } wmi_smartant_state_param;
27581 
27582 /** WMI_PEER_INFO_REQ_CMDID
27583  *   Request FW to provide peer info */
27584 typedef struct {
27585     /** TLV tag and len; tag equals
27586      *  WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param   */
27587     A_UINT32 tlv_header;
27588     /** In order to get the peer info for a single peer, host shall
27589      *  issue the peer_mac_address of that peer. For getting the
27590      *  info all peers, the host shall issue 0xFFFFFFFF as the mac
27591      *  address. The firmware will return the peer info for all the
27592      *  peers on the specified vdev_id */
27593     wmi_mac_addr peer_mac_address;
27594     /** vdev id */
27595     A_UINT32 vdev_id;
27596 } wmi_peer_info_req_cmd_fixed_param;
27597 
27598 typedef struct {
27599     /** TLV tag and len; tag equals
27600      *  WMITLV_TAG_STRUC_wmi_peer_info */
27601     A_UINT32 tlv_header;
27602     /** mac addr of the peer */
27603     wmi_mac_addr peer_mac_address;
27604     /** data_rate of the peer */
27605     A_UINT32 data_rate;
27606     /** RSSI of the peer */
27607     A_UINT32 rssi;
27608     /** tx fail count */
27609     A_UINT32 tx_fail_cnt;
27610 } wmi_peer_info;
27611 
27612 /** FW response with the peer info */
27613 typedef struct {
27614     /** TLV tag and len; tag equals
27615      *  WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param   */
27616     A_UINT32 tlv_header;
27617     /** number of peers in peer_info */
27618     A_UINT32 num_peers;
27619     /* Set to 1 only if vdev_id field is valid */
27620     A_UINT32 valid_vdev_id;
27621     /* VDEV to which the peer belongs to */
27622     A_UINT32 vdev_id;
27623     /* This TLV is followed by another TLV of array of structs
27624      * wmi_peer_info peer_info[];
27625      */
27626 } wmi_peer_info_event_fixed_param;
27627 
27628 /** WMI_PEER_ANTDIV_INFO_REQ_CMDID
27629  *   Request FW to provide peer info */
27630 typedef struct {
27631     /** TLV tag and len; tag equals
27632      *  WMITLV_TAG_STRUC_wmi_peer_antdiv_info_req_cmd_fixed_param   */
27633     A_UINT32 tlv_header;
27634     /** In order to get the peer antdiv info for a single peer, host shall
27635      *  issue the peer_mac_address of that peer. For getting the
27636      *  info all peers, the host shall issue 0xFFFFFFFF as the mac
27637      *  address. The firmware will return the peer info for all the
27638      *  peers on the specified vdev_id */
27639     wmi_mac_addr peer_mac_address;
27640     /** vdev id */
27641     A_UINT32 vdev_id;
27642 } wmi_peer_antdiv_info_req_cmd_fixed_param;
27643 
27644 /** FW response with the peer antdiv info */
27645 typedef struct {
27646     /** TLV tag and len; tag equals
27647      *  WMITLV_TAG_STRUC_wmi_peer_antdiv_info_event_fixed_param   */
27648     A_UINT32 tlv_header;
27649     /** number of peers in peer_info */
27650     A_UINT32 num_peers;
27651     /* VDEV to which the peer belongs to */
27652     A_UINT32 vdev_id;
27653     /* This TLV is followed by another TLV of array of structs
27654      * wmi_peer_antdiv_info peer_antdiv_info[];
27655      */
27656 } wmi_peer_antdiv_info_event_fixed_param;
27657 
27658 typedef struct {
27659     /** TLV tag and len; tag equals
27660      *  WMITLV_TAG_STRUC_wmi_peer_antdiv_info */
27661     A_UINT32 tlv_header;
27662     /** mac addr of the peer */
27663     wmi_mac_addr peer_mac_address;
27664     /** per chain RSSI of the peer, for up to 8 chains.
27665      * Each chain's entry reports the RSSI for different bandwidths:
27666      * bits 7:0   -> primary 20 MHz
27667      * bits 15:8  -> secondary 20 MHz of  40 MHz channel (if applicable)
27668      * bits 23:16 -> secondary 40 MHz of  80 MHz channel (if applicable)
27669      * bits 31:24 -> secondary 80 MHz of 160 MHz channel (if applicable)
27670      * Each of these 8-bit RSSI reports is in dB units, with respect to
27671      * the noise floor.
27672      * 0x80 means invalid.
27673      * All unused bytes within used chain_rssi indices shall be set to 0x80.
27674      * All unused chain_rssi indices shall be set to 0x80808080.
27675      */
27676     A_INT32 chain_rssi[8];
27677 } wmi_peer_antdiv_info;
27678 
27679 typedef struct {
27680     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_msduq_qdepth_thresh_update */
27681 
27682     /** tid_number */
27683     A_UINT32 tid_num;
27684 
27685     /** msduq_mask to set the value
27686      * bit 0 - HI-PRI msdu flowq qdepth threshold need to update if set
27687      * bit 1 - LOW-PRI msdu flowq qdepth threshold need to update if set
27688      * bit 2 - UDP msdu flowq qdepth threshold need to update if set
27689      * bit 3 - NON-UDP msdu flowq qdepth threshold need to update if set
27690      * rest of bits are reserved and set to 0.
27691      */
27692     A_UINT32 msduq_update_mask;
27693 
27694     /** Qdepth threshold value
27695      * If number of msdus in a queue excess over qdepth_thresh_value value
27696      * while queuing msdu's then we drop new msdus.
27697      * (Though dropping older (stale) data rather than newer data might be
27698      * preferable, the dropping is performed by MAC HW, and there's no option
27699      * to configure the HW to do head dropping rather than tail dropping.)
27700      */
27701     A_UINT32 qdepth_thresh_value;
27702 } wmi_msduq_qdepth_thresh_update;
27703 
27704 /** WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID
27705  *   Request FW to update msduq qdepth threshold per TID per peer */
27706 typedef struct {
27707     /** TLV tag and len; tag equals
27708      *  WMITLV_TAG_STRUC_wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param
27709      */
27710     A_UINT32 tlv_header;
27711 
27712     /** pdev id
27713      * The pdev_id can be determined from the vdev_id, but the pdev_id
27714      * is explicitly provided so it can be used for sanity checking.
27715      */
27716     A_UINT32 pdev_id;
27717 
27718     /** vdev id */
27719     A_UINT32 vdev_id;
27720 
27721     /**
27722      * To set the peer msduq qdepth threshold update for a single peer,
27723      * the host shall send mac address for which peer need to be updated.
27724      */
27725     wmi_mac_addr peer_mac_address;
27726 
27727     /** number of payload update tlvs */
27728     A_UINT32 num_of_msduq_updates;
27729 
27730     /** Followed by the variable length TLV msduq_qdepth_updates:
27731      *  wmi_msduq_qdepth_th_update msduq_qdepth_thshd_update_list[]
27732      */
27733 } wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param;
27734 
27735 /**
27736  * ACK policy to be followed for the TID
27737  */
27738 typedef enum {
27739     /** Used when the host does not want to configure the ACK policy */
27740     WMI_PEER_TID_CONFIG_ACK_POLICY_IGNORE,
27741     /** Allow ACK for the TID */
27742     WMI_PEER_TID_CONFIG_ACK,
27743     /** Do not expect ACK for the TID */
27744     WMI_PEER_TID_CONFIG_NOACK,
27745 } WMI_PEER_TID_CONFIG_ACK_POLICY;
27746 
27747 /**
27748  * Aggregation control policy for the TID
27749  */
27750 typedef enum {
27751     /** Used when the host does not want to configure the aggregation policy */
27752     WMI_PEER_TID_CONFIG_AGGR_CONTROL_IGNORE,
27753     /** Enable aggregation for the TID */
27754     WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE,
27755     /** Disable aggregation for the TID */
27756     WMI_PEER_TID_CONFIG_AGGR_CONTROL_DISABLE,
27757 } WMI_PEER_TID_CONFIG_AGGR_CONTROL;
27758 
27759 /**
27760  * Rate control policy for the TID
27761  */
27762 typedef enum {
27763     /** Used when the host does not want to configure the rate control policy */
27764     WMI_PEER_TID_CONFIG_RATE_CONTROL_IGNORE,
27765     /** Auto rate control */
27766     WMI_PEER_TID_CONFIG_RATE_CONTROL_AUTO,
27767     /** Fixed rate control */
27768     WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE,
27769     /** Set the Default lowest rate (6Mbps in 5GHZ and 1Mbps in 2GHZ) */
27770     WMI_PEER_TID_CONFIG_RATE_CONTROL_DEFAULT_LOWEST_RATE,
27771     /**
27772      * Set the highest rate cap allowed for this TID.
27773      * Rate cap is specified in rate code format,
27774      * i.e. NSS and MCS combined as shown below:
27775      * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
27776      * b'3-b'0 indicate the MCS
27777      */
27778     WMI_PEER_TID_CONFIG_RATE_UPPER_CAP,
27779 } WMI_PEER_TID_CONFIG_RATE_CONTROL;
27780 
27781 /**
27782  * SW retry threshold for the TID
27783  */
27784 typedef enum {
27785     /** Used when the host does not want to configure the SW retry threshold */
27786     WMI_PEER_TID_SW_RETRY_IGNORE = 0,
27787     WMI_PEER_TID_SW_RETRY_MIN = 1,
27788     WMI_PEER_TID_SW_RETRY_MAX = 30,
27789     /** No SW retry for the TID */
27790     WMI_PEER_TID_SW_RETRY_NO_RETRY = 0xFFFFFFFF,
27791 } WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD;
27792 
27793 /*
27794  * values for tid_config_supported_bitmap field,
27795  * in wmi_peer_tid_configurations_cmd structure.
27796  */
27797 typedef enum {
27798     /* Used to indicate that disable_rts_cts field is valid */
27799     WMI_PEER_TID_DISABLE_RTS_CTS_VALID      = 0x00000001,
27800     WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_VALID = 0x00000002,
27801     WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_VALID = 0x00000004,
27802 } WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP;
27803 
27804 /*
27805  * Per TID level enable/disable of RTS/CTS for that peer.
27806  * Currently applicable only for "data tids" within targets which set
27807  * the RTSCTS_FOR_UNICAST_MGMT WMI service bit.
27808  *
27809  * Enum values/Expected values for disable_rts_cts of
27810  * WMI_PEER_TID_DISABLE_RTS_CTS_VALID as below:
27811  *
27812  * 0 (WMI_RTSCTS_RESET)   - Use default RTS/CTS
27813  * 1 (WMI_RTSCTS_DISABLE) - Disable RTS/CTS for every ppdu for that
27814  *                          configured data TID
27815  * 2 (WMI_RTSCTS_ENABLE)  - Enable RTS/CTS for  every ppdu for that
27816  *                          configured data TID
27817  */
27818 typedef enum {
27819     WMI_RTSCTS_RESET   = 0,
27820     WMI_RTSCTS_DISABLE = 1,
27821     WMI_RTSCTS_ENABLE  = 2,
27822 } WMI_PEER_TID_CONFIG_RTSCTS_CONTROL;
27823 
27824 /**
27825  * MPDU Aggregate value for the TID
27826  */
27827 typedef enum {
27828     /** Set the default Aggregation value configured in FW */
27829     WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_DEFAULT,
27830     WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_MIN = 1,
27831     WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_MAX = 1024,
27832 } WMI_PEER_TID_CONFIG_MAX_NUM_MPDU_IN_PPDU;
27833 
27834 /**
27835  * MSDU Aggregate value for the TID
27836  */
27837 typedef enum {
27838     /** Set the default Aggregation value configured in FW */
27839     WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_DEFAULT,
27840     WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_MIN = 1,
27841     WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_MAX = 7,
27842 } WMI_PEER_TID_CONFIG_MAX_NUM_MSDU_IN_MPDU;
27843 
27844 /**
27845  * Command format for the TID configuration
27846  */
27847 typedef struct {
27848     /** TLV tag and len; tag equals
27849      *  WMITLV_TAG_STRUC_wmi_peer_tid_configurations_cmd_fixed_param
27850      */
27851     A_UINT32 tlv_header;
27852 
27853     /** vdev id */
27854     A_UINT32 vdev_id;
27855 
27856     /** peer MAC address */
27857     wmi_mac_addr peer_mac_address;
27858 
27859     /** TID number, generated by the caller.
27860      * Valid range for QoS TID : 0-15
27861      * Valid range for non QOS/Mgmt TID: 16-19
27862      * Any other TID number is invalid.
27863      */
27864     A_UINT32 tid_num;
27865 
27866     /** ACK policy - of type WMI_PEER_TID_CONFIG_ACK_POLICY */
27867     A_UINT32 ack_policy;
27868 
27869     /** Aggregation control - of type WMI_PEER_TID_CONFIG_AGGR_CONTROL */
27870     A_UINT32 aggr_control;
27871 
27872     /** Rate control - of type WMI_PEER_TID_CONFIG_RATE_CONTROL */
27873     A_UINT32 rate_control;
27874 
27875     /** Fixed rate control parameters - of type WMI_PEER_PARAM_FIXED_RATE.
27876      * This is applicable only when rate_control is
27877      * WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE
27878      */
27879     A_UINT32 rcode_rcflags;
27880 
27881     /** MPDU SW retry threshold - of type WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD
27882      * This SW retry threshold limits the total number of retransmits of
27883      * nacked or unacked MPDUs, but it is up to the FW to decide what
27884      * tx rate to use during each retransmission.
27885      */
27886     A_UINT32 sw_retry_threshold;
27887 
27888     /*--- Start of extended structure ---*/
27889     /* Bitmap to indicate which fields in the extended structure are valid.
27890      * Bitmap values correspond to enum WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP
27891      */
27892     A_UINT32 tid_config_supported_bitmap;
27893 
27894     /* Knob to enable/disable RTS/CTS per TID
27895      * Enum values/Expected values:
27896      *
27897      * 0 (WMI_RTSCTS_RESET)   - Use default RTS/CTS
27898      * 1 (WMI_RTSCTS_DISABLE) - Disable RTS/CTS for every ppdu for
27899      *                          that configured data TID
27900      * 2 (WMI_RTSCTS_ENABLE)  - Enable RTS/CTS for  every ppdu for
27901      *                          that configured data TID
27902      */
27903     A_UINT32 disable_rts_cts;
27904 
27905     /** Size for mpdu aggregation
27906      * (max MPDUs per PPDU)
27907      * Valid range : 1-1024 (refer to WMI_PEER_TID_MAX_NUM_MPDU_IN_PPDU_MIN,MAX)
27908      * When this field is set to 0, default aggregation value configured
27909      * in the fw will be used.
27910      * This is applicable only when aggr_control is
27911      * WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE
27912      */
27913     A_UINT32 max_num_mpdu_in_ppdu;
27914 
27915     /** Size for msdu aggregation
27916      * (max MSDUs per MPDU)
27917      * Valid range : 1-7 (refer to WMI_PEER_TID_MAX_NUM_MSDU_IN_MPDU_MIN,MAX)
27918      * When this field is set to 0, default aggregation value configured
27919      * in the fw will be used.
27920      * This is applicable only when aggr_control is
27921      * WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE
27922      */
27923     A_UINT32 max_num_msdu_in_mpdu;
27924 } wmi_peer_tid_configurations_cmd_fixed_param;
27925 
27926 /* The below enable/disable macros are used for both per peer CFR capture
27927  * control (as in wmi_peer_cfr_capture_cmd) and control of the entire periodic
27928  * CFR capture feature (as in WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE)
27929  */
27930 #define WMI_PEER_CFR_CAPTURE_ENABLE   1
27931 #define WMI_PEER_CFR_CAPTURE_DISABLE  0
27932 
27933 #define WMI_PEER_CFR_ONE_SHOT_REQUEST 0
27934 #define WMI_PEER_CFR_PERIODICITY_MIN  10 /* 10ms */
27935 #define WMI_PEER_CFR_PERIODICITY_MAX  10*60*1000 /* 10 minutes */
27936 
27937 /* Bandwidth of peer CFR captures */
27938 typedef enum {
27939     WMI_PEER_CFR_CAPTURE_BW_20MHZ    = 0,
27940     WMI_PEER_CFR_CAPTURE_BW_40MHZ    = 1,
27941     WMI_PEER_CFR_CAPTURE_BW_80MHZ    = 2,
27942     WMI_PEER_CFR_CAPTURE_BW_160MHZ   = 3,
27943     WMI_PEER_CFR_CAPTURE_BW_80_80MHZ = 4,
27944     WMI_PEER_CFR_CAPTURE_BW_MAX,
27945 } WMI_PEER_CFR_CAPTURE_BW;
27946 
27947 /* Peer CFR capture method */
27948 typedef enum {
27949     /* Send null frame on the requested bw and capture CFR on ACK */
27950     WMI_PEER_CFR_CAPTURE_METHOD_NULL_FRAME = 0,
27951     WMI_PEER_CFR_CAPTURE_METHOD_NULL_FRAME_WITH_PHASE = 1,
27952     WMI_PEER_CFR_CAPTURE_METHOD_PROBE_RESP = 2,
27953     /* New methods to be added here */
27954     WMI_PEER_CFR_CAPTURE_METHOD_MAX,
27955 } WMI_PEER_CFR_CAPTURE_METHOD;
27956 
27957 /*
27958  * Peer command structure to configure the CFR capture
27959  */
27960 typedef struct {
27961     /** TLV tag and len; tag equals
27962      *  WMITLV_TAG_STRUC_wmi_peer_cfr_capture_cmd_fixed_param
27963      */
27964     A_UINT32 tlv_header;
27965 
27966     /* WMI_PEER_CFR_CAPTURE_ENABLE: Enable CFR capture for the peer
27967      * WMI_PEER_CFR_CAPTURE_DISABLE: Disable CFR capture for the peer
27968      */
27969     A_UINT32 request;
27970     /* Peer MAC address. In AP mode, this is the address of the connected peer
27971      * for which CFR capture is needed. In case of STA mode, this is the address
27972      * of the AP to which the STA is connected
27973      */
27974     wmi_mac_addr mac_addr;
27975     /* vdev id */
27976     A_UINT32 vdev_id;
27977     /* Periodicity of measurement in ms.
27978      * WMI_PEER_CFR_ONE_SHOT_REQUEST: One-shot request i.e., Only one CFR
27979      * capture for the request and no periodic CFR captures.
27980      * The min value is WMI_PEER_CFR_PERIODICITY_MIN
27981      * The max value is WMI_PEER_CFR_PERIODICITY_MAX
27982      */
27983     A_UINT32 periodicity;
27984     /* BW of measurement - of type WMI_PEER_CFR_CAPTURE_BW */
27985     A_UINT32 bandwidth;
27986     /* Method used to capture CFR - of type WMI_PEER_CFR_CAPTURE_METHOD */
27987     A_UINT32 capture_method;
27988 } wmi_peer_cfr_capture_cmd_fixed_param;
27989 
27990 typedef enum {
27991     WMI_PEER_IND_SMPS = 0x0, /* spatial multiplexing power save */
27992     WMI_PEER_IND_OMN,        /* operating mode notification */
27993     WMI_PEER_IND_OMI,        /* operating mode indication */
27994 } WMI_PEER_OPER_MODE_IND;
27995 
27996 typedef struct {
27997     /** TLV tag and len; tag equals
27998      *  WMITLV_TAG_STRUC_wmi_peer_oper_mode_change */
27999     A_UINT32 tlv_header;
28000     /** mac addr of the peer */
28001     wmi_mac_addr peer_mac_address;
28002     /** Peer type indication WMI_PEER_OPER_MODE_IND. */
28003     A_UINT32 ind_type;
28004     /** new_rxnss valid for all peer_operating mode ind. */
28005     A_UINT32 new_rxnss;
28006     /** new_bw  valid for peer_operating mode ind. OMN/OMI
28007      *  value of this bw is as per 11ax/ac standard:
28008      *  0 = 20MHz,1 = 40MHz, 2= 80MHz, 3 = 160MHz
28009      */
28010     A_UINT32 new_bw;
28011     /** new_txnss valid for peer_operating mode ind. OMI */
28012     A_UINT32 new_txnss;
28013     /** new_disablemu: disable mu mode
28014      *  valid for peer_operating mode ind. OMI
28015      */
28016     A_UINT32 new_disablemu;
28017 } wmi_peer_oper_mode_change_event_fixed_param;
28018 
28019 /** FW response when tx failure count has reached threshold
28020  *  for a peer */
28021 typedef struct {
28022     /** TLV tag and len; tag equals
28023      *  WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
28024     A_UINT32 tlv_header;
28025     /** vdev id*/
28026     A_UINT32 vdev_id;
28027     /** mac address */
28028     wmi_mac_addr peer_mac_address;
28029     /** tx failure count - will eventually be removed and not used */
28030     A_UINT32 tx_fail_cnt;
28031     /** seq number of the nth tx_fail_event */
28032     A_UINT32 seq_no;
28033 } wmi_peer_tx_fail_cnt_thr_event_fixed_param;
28034 
28035 enum wmi_rmc_mode {
28036    /** Disable RMC */
28037    WMI_RMC_MODE_DISABLED = 0,
28038    /** Enable RMC */
28039    WMI_RMC_MODE_ENABLED = 1,
28040 };
28041 
28042 /** Enable RMC transmitter functionality. Upon
28043  *  receiving this, the FW shall mutlicast frames with
28044  *  reliability. This is a vendor
28045  *  proprietary feature. */
28046 typedef struct {
28047     /** TLV tag and len; tag equals
28048      *  WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param   */
28049     A_UINT32 tlv_header;
28050     /** vdev id*/
28051     A_UINT32 vdev_id;
28052     /** enable_rmc contains values from enum wmi_rmc_mode;
28053      *  Default value: 0 (disabled) */
28054     A_UINT32 enable_rmc;
28055 } wmi_rmc_set_mode_cmd_fixed_param;
28056 
28057 /** Configure transmission periodicity of action frames in a
28058  *  RMC network for the multicast transmitter */
28059 typedef struct {
28060     /** TLV tag and len; tag equals
28061      *  WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
28062     A_UINT32 tlv_header;
28063     /** vdev id */
28064     A_UINT32 vdev_id;
28065     /** time period in milliseconds. Default: 300 ms.
28066        An action frame indicating the current leader is transmitted by the
28067        RMC transmitter once every 'periodity_msec' */
28068     A_UINT32 periodicity_msec;
28069 } wmi_rmc_set_action_period_cmd_fixed_param;
28070 
28071 /** Optimise Leader selection process in RMC functionality. For
28072  *  Enhancement/Debug purposes only */
28073 typedef struct {
28074     /** TLV tag and len; tag equals
28075      *  WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param   */
28076     A_UINT32 tlv_header;
28077     /** vdev id */
28078     A_UINT32 vdev_id;
28079     /** flags ::
28080      *  0x0001 - Enable beacon averaging
28081      *  0x0002 - Force leader selection
28082      *  0x0004 - Enable Timer based leader switch
28083      *  0x0008 - Use qos/NULL based for multicast reliability */
28084     A_UINT32 flags;
28085     /**  control leader change timeperiod (in seconds) */
28086     A_UINT32 peridocity_leader_switch;
28087     /** control activity timeout value for data rx (in seconds) */
28088     A_UINT32 data_activity_timeout;
28089     /** mac address of leader */
28090     wmi_mac_addr forced_leader_mac_addr;
28091 } wmi_rmc_config_cmd_fixed_param;
28092 
28093 /** MHF is generally implemented in
28094  *  the kernel. To decrease system power consumption, the
28095  *  driver can enable offloading this to the chipset. In
28096  *  order for the offload, the firmware needs the routing table.
28097  *  The host shall plumb the routing table into FW. The firmware
28098  *  shall perform an IP address lookup and forward the packet to
28099  *  the next hop using next hop's mac address. This is a vendor
28100  *  proprietary feature. */
28101 enum wmi_mhf_ofl_mode {
28102    /** Disable MHF offload */
28103    WMI_MHF_OFL_MODE_DISABLED = 0,
28104    /** Enable MHF offload */
28105    WMI_MHF_OFL_MODE_ENABLED = 1,
28106 };
28107 
28108 typedef struct {
28109     /** TLV tag and len; tag equals
28110      *  WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
28111     A_UINT32 tlv_header;
28112     /** vdev id*/
28113     A_UINT32 vdev_id;
28114     /** enable_mhf_ofl contains values from enum
28115      *  wmi_mhf_ofl_mode; Default value: 0 (disabled) */
28116     A_UINT32 enable_mhf_ofl;
28117 } wmi_mhf_offload_set_mode_cmd_fixed_param;
28118 
28119 enum wmi_mhf_ofl_table_action {
28120    /** Create MHF offload table in FW */
28121    WMI_MHF_OFL_TBL_CREATE = 0,
28122    /** Append to existing MHF offload table */
28123    WMI_MHF_OFL_TBL_APPEND = 1,
28124    /** Flush entire MHF offload table in FW */
28125    WMI_MHF_OFL_TBL_FLUSH = 2,
28126 };
28127 
28128 typedef struct {
28129     /** TLV tag and len; tag equals
28130      *  WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
28131     A_UINT32 tlv_header;
28132     /** vdev id*/
28133     A_UINT32 vdev_id;
28134     /** action corresponds to values from enum
28135      *  wmi_mhf_ofl_table_action */
28136     A_UINT32 action;
28137     /** number of entries in the table */
28138     A_UINT32 num_entries;
28139 /** Followed by the variable length TLV
28140  *  wmi_mhf_offload_routing_table_entry entries[] */
28141 } wmi_mhf_offload_plumb_routing_table_cmd;
28142 
28143 typedef struct {
28144     /** TLV tag and len; tag equals
28145      *  WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
28146     A_UINT32 tlv_header;
28147     /** Destination node's IP address */
28148     WMI_IPV4_ADDR dest_ipv4_addr;
28149     /** Next hop node's MAC address */
28150     wmi_mac_addr next_hop_mac_addr;
28151 } wmi_mhf_offload_routing_table_entry;
28152 
28153 enum {
28154     WMI_DFS_RADAR_PULSE_FLAG_MASK_PSIDX_DIFF_VALID = 0x00000001,
28155 };
28156 
28157 typedef struct {
28158     /** tlv tag and len, tag equals
28159       * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
28160     A_UINT32 tlv_header;
28161 
28162     /** full 64 tsf timestamp get from MAC tsf timer indicates
28163      * the time that the radar event uploading to host, split
28164      * it to high 32 bit and lower 32 bit in fulltsf_high and
28165      * full_tsf_low
28166      */
28167     A_UINT32 upload_fullts_low;
28168     A_UINT32 upload_fullts_high;
28169 
28170     /** timestamp indicates the time when DFS pulse is detected
28171      * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
28172      */
28173     A_UINT32 pulse_detect_ts;
28174 
28175     /** the duaration of the pulse in us */
28176     A_UINT32 pulse_duration;
28177 
28178     /** the center frequency of the radar pulse detected, KHz */
28179     A_UINT32 pulse_center_freq;
28180 
28181     /** bandwidth of current DFS channel, MHz */
28182     A_UINT32 ch_bandwidth;
28183 
28184     /** center channel frequency1 of current DFS channel, MHz */
28185     A_UINT16 ch_center_freq1;
28186 
28187     /** center channel frequency2 of current DFS channel, MHz,
28188      * reserved for 160 BW mode
28189      */
28190     A_UINT16 ch_center_freq2;
28191 
28192     /** flag to indicate if this pulse is chirp */
28193     A_UINT8  pulse_is_chirp;
28194 
28195     /** RSSI recorded in the ppdu */
28196     A_UINT8  rssi;
28197 
28198     /** extended RSSI info */
28199     A_UINT8  rssi_ext;
28200 
28201     union {
28202         A_UINT8 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
28203         /** pdev_id for identifying the MAC
28204          * See macros starting with WMI_PDEV_ID_ for values.
28205          */
28206         A_UINT8 pdev_id;
28207     };
28208 
28209     /** index of peak magnitude bin (signed) */
28210     A_INT32 peak_sidx;
28211 
28212     /** Max pulse chirp velocity in delta bins over chirp FFT interval */
28213     A_INT32 pulse_delta_peak;
28214 
28215     /** Max pulse chirp velocity variance in delta bins */
28216     A_INT32 pulse_delta_diff;
28217 
28218     /** the difference in the FFT peak index between short FFT and the first long FFT
28219      * psidx_diff = (first_long_fft_psidx - 4*first_short_fft_psidx),
28220      */
28221     A_INT32 psidx_diff;
28222 
28223     /** pulse_flags: see WMI_DFS_RADAR_PULSE_FLAG_MASK enum values
28224      *  0x0001 - set if psidx_diff is valid
28225      */
28226     A_UINT32 pulse_flags;
28227 
28228 } wmi_dfs_radar_event_fixed_param;
28229 
28230 enum {
28231     /* DEFAULT - target chooses what action to take, based on its thermal
28232      * management policy
28233      * Targets which throttle tx (and potentially rx) based on thermal
28234      * management thresholds specified by the host will shut down tx
28235      * if the temperature exceeds upper_thresh_degreeC.
28236      * Targets which simply inform the host about threshold breaches will
28237      * send a notification message to the host if the temperature exceeds
28238      * upper_thresh_degreeC.
28239      * Conversely, if the temperature was above upper_thresh_degreeC but
28240      * then drops to below lower_threshold_degreeC, the target will either
28241      * resume tx, or notify the host.
28242      */
28243     WMI_THERMAL_MGMT_ACTION_DEFAULT = 0,
28244     /* HALT_TRAFFIC -
28245      * If the temperature rises above upper_thresh_degreeC, the target will
28246      * halt tx.
28247      * If the temperature falls back below lower_thresh_degreeC, the target
28248      * will resume tx.
28249      */
28250     WMI_THERMAL_MGMT_ACTION_HALT_TRAFFIC = 1,
28251     /* NOTIFY_HOST - the target will notify the host if the temperature
28252      * either rises above upper_thresh_degreeC or falls below
28253      * lower_thresh_degreeC.
28254      */
28255     WMI_THERMAL_MGMT_ACTION_NOTIFY_HOST = 2,
28256     /* CHAIN SCALING -
28257      * The target will switch tx chain mask from multi chains to single chain
28258      * if the temperature rises above upper_thresh_degreeC.
28259      * The target will switch tx chainmask back to multi chains if the
28260      * temperature drops below upper_thresh_degreeC.
28261      */
28262     WMI_THERMAL_MGMT_ACTION_CHAINSCALING = 3,
28263 };
28264 
28265 typedef struct {
28266     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param  */
28267 
28268     /*Thermal thresholds*/
28269     A_UINT32 lower_thresh_degreeC; /* in degree C*/
28270     A_UINT32 upper_thresh_degreeC; /* in degree C*/
28271 
28272     /*Enable/Disable Thermal Monitoring for Mitigation*/
28273     A_UINT32 enable;
28274 
28275     /* action: what the target should do when a thermal upper/lower threshold
28276      * is crossed.
28277      * Refer to the WMI_THERMAL_MGMT_ACTION enum.
28278      */
28279     A_UINT32 action;
28280     A_UINT32 threshold_warning_degreeC;
28281     A_UINT32 sample_rate_ms;
28282 } wmi_thermal_mgmt_cmd_fixed_param;
28283 
28284 typedef struct {
28285     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param  */
28286 
28287     A_UINT32 temperature_degreeC;/* temperature in degree C*/
28288 } wmi_thermal_mgmt_event_fixed_param;
28289 
28290 /**
28291 * This command is sent from WLAN host driver to firmware to
28292  * request firmware to configure auto shutdown timer in fw
28293  * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
28294  */
28295 typedef struct {
28296     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param  */
28297     A_UINT32 timer_value;   /** timer value; 0=disable */
28298 } wmi_host_auto_shutdown_cfg_cmd_fixed_param;
28299 
28300 enum wmi_host_auto_shutdown_reason {
28301     WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
28302     WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
28303     WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
28304 };
28305 
28306 /* WMI_HOST_AUTO_SHUTDOWN_EVENTID  */
28307 typedef struct {
28308     A_UINT32    tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param  */
28309     A_UINT32    shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
28310 } wmi_host_auto_shutdown_event_fixed_param;
28311 
28312 
28313 
28314 /** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
28315  *  fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
28316  *  This command is only used by some customer for  verification test.  It is not for end-user.
28317  *
28318  *  array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
28319  *
28320  *  The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
28321  *  the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condition only. When multiple
28322  *  conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
28323  *  <channel, ack_offset> pair is unique.
28324  *
28325  *  the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
28326  *  called basic_config_info by bitmap
28327  *  to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
28328  *
28329  *  '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
28330  *   is ignored.
28331  *  disable will remove preious conditions from FW.
28332  *  conditions from the later command will over write conditions stored from a previous command.
28333  *
28334  */
28335 
28336 #define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF    0   /** dont' care the bt status */
28337 #define WMI_TPC_CHAINMASK_CONFIG_BT_ON        1   /** apply only when bt on */
28338 #define WMI_TPC_CHAINMASK_CONFIG_BT_OFF       2   /** apply only when bt off  */
28339 #define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1     3   /** reserved  */
28340 
28341 #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE   0   /**  don't care the chainmask */
28342 #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0      1   /**  force to use Chain0 to send */
28343 #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1      2   /**  force to use Chain1 to send */
28344 #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1  3   /** force to use Chain0 & Chain1 to send */
28345 
28346 #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF  0   /**  don't care about stbc  */
28347 #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON      1   /**  apply only when stbc on */
28348 #define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF     2   /**  apply only when stbc off */
28349 #define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1   3   /**  reserved */
28350 
28351 #define WMI_TPC_CHAINMASK_CONFIG_BAND_2G      0   /**  2G */
28352 #define WMI_TPC_CHAINMASK_CONFIG_BAND_5G      1   /**  5G */
28353 
28354 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G    0        /** 11b 2G */
28355 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G    1        /** 11g 2G */
28356 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G    2        /** 11n 2G */
28357 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G   3    /** 11n + 11ac 2G */
28358 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G    4        /** 11a 5G */
28359 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G    5        /** 11n 5G */
28360 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G   6        /** 11ac 5G */
28361 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G  7     /** 11n + 11ac 5G */
28362 
28363 #define WMI_TPC_CHAINMASK_CONFIG_STREAM_1           0    /** 1 stream  */
28364 #define WMI_TPC_CHAINMASK_CONFIG_STREAM_2           1    /** 2 streams */
28365 
28366 #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF        0    /** channel field is ignored */
28367 #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON         1    /** channel field needs to be checked */
28368 
28369 #define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF           0    /** rate field is ignored */
28370 #define WMI_TPC_CHAINMASK_CONFIG_RATE_ON            1    /** rate field needs to be checked */
28371 
28372 /**  Bit map definition for basic_config_info starts   */
28373 #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S   0
28374 #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET     (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
28375 #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x)     WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
28376 #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_SET(x,z)   WMI_F_RMW(x,(z) & 0x1f,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
28377 
28378 #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S      5
28379 #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET        (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
28380 #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x)     WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
28381 #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_SET(x,z)   WMI_F_RMW(x, (z) & 0x1f, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
28382 
28383 #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S  10
28384 #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK   (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
28385 #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x)   WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
28386 #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_SET(x,z)  WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
28387 
28388 #define WMI_TPC_CHAINMASK_CONFIG_BT_S       12
28389 #define WMI_TPC_CHAINMASK_CONFIG_BT         (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
28390 #define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x)     WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BT)
28391 #define WMI_TPC_CHAINMASK_CONFIG_BT_SET(x,z)   WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_BT)
28392 
28393 #define WMI_TPC_CHAINMASK_CONFIG_STBC_S     14
28394 #define WMI_TPC_CHAINMASK_CONFIG_STBC       (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
28395 #define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x)     WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STBC)
28396 #define WMI_TPC_CHAINMASK_CONFIG_STBC_SET(x,z)   WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_STBC)
28397 
28398 #define WMI_TPC_CHAINMASK_CONFIG_BAND_S     16
28399 #define WMI_TPC_CHAINMASK_CONFIG_BAND       (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
28400 #define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x)  WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BAND)
28401 #define WMI_TPC_CHAINMASK_CONFIG_BAND_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_BAND)
28402 
28403 #define WMI_TPC_CHAINMASK_CONFIG_STREAM_S   17
28404 #define WMI_TPC_CHAINMASK_CONFIG_STREAM     (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
28405 #define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x)  WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STREAM)
28406 #define WMI_TPC_CHAINMASK_CONFIG_STREAM_SET(x,z)  WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_STREAM)
28407 
28408 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S     18
28409 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE       (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
28410 #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
28411 #define WMI_TPC_CHAINAMSK_CONFIG_PHY_MODE_SET(x,z)  WMI_F_RMW(x, (z) & 0x7, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
28412 
28413 #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S     21
28414 /*
28415  * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
28416  * is temporarily maintained as an alias for the correct name
28417  * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
28418  */
28419 #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
28420 #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL       (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
28421 #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x)  WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
28422 #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_SET(x,z)  WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
28423 
28424 #define WMI_TPC_CHAINMASK_CONFIG_RATE_S  22
28425 /*
28426  * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
28427  * is temporarily maintained as an alias for the correct name
28428  * (WMI_TPC_CHAINMASK_CONFIG_RATE)
28429  */
28430 #define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
28431 #define WMI_TPC_CHAINMASK_CONFIG_RATE    (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
28432 #define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x)   WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
28433 #define WMI_TPC_CHAINMASK_CONFIG_RATE_SET(x,z)  WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_RATE)
28434 
28435 /**  Bit map definition for basic_config_info ends   */
28436 
28437 typedef struct {
28438     A_UINT32 tlv_header;
28439     /** Basic condition defined as bit map above, bitmap is chosen to save memory.
28440      * Bit0  ~ Bit4: tpc offset which will be adjusted if condition matches, the unit is 0.5dB.  bit4 indicates signed
28441      * Bit5  ~ Bit9: ack offset which will be adjusted if condition matches, the unit is 0.5dB.  bit9 indicates signed
28442      * 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
28443      * 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
28444      * 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
28445      * Bit16 : band condition  b'0: 2G,  b'1: 5G
28446      * Bit17 : stream condition:  b'0: 1 stream, b'1: 2 streams
28447      * 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
28448      * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
28449      * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
28450      * Bit23 ~ Bit31:  reserved
28451      */
28452     A_UINT32 basic_config_info;
28453 
28454     /** channel mapping bit rule: The lower bit corresponds with smaller channel.
28455      *  it depends on Bit14 of basic_config_info
28456      *  Total 24 channels for 5G
28457      *  36    40    44    48    52    56    60    64   100   104   108   112   116   120   124   128   132   136   140   149   153   157   161   165
28458      *  Total 14 channels for 2G
28459      *  1 ~ 14
28460      */
28461     A_UINT32 channel;
28462 
28463     /** rate mapping bit rule:  The lower bit corresponds with lower rate.
28464      *  it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
28465      *  Legacy rates , 11b, 11g, 11A
28466      *  11n one stream (ht20, ht40) 8+8
28467      *  11n two streams (ht20, ht40) 8+8
28468      *  11ac one stream (vht20, vht40, vht80) 10+10+10
28469      *  11ac two streams (vht20, vht40, vht80) 10+10+10
28470      */
28471     A_UINT32 rate0;
28472     /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
28473      *  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
28474      */
28475 
28476     /** 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
28477      */
28478     A_UINT32 rate1;
28479 } wmi_tpc_chainmask_config;
28480 
28481 #define WMI_TPC_CHAINMASK_CONFIG_DISABLE   0   /** control the off for the tpc & chainmask*/
28482 #define WMI_TPC_CHAINMASK_CONFIG_ENABLE    1   /** control the on for the tpc & chainmask*/
28483 
28484 typedef struct {
28485     A_UINT32 tlv_header;
28486     A_UINT32 enable;  /** enable to set tpc & chainmask when conditions meet, 0: disabled,   1: enabled.  */
28487     A_UINT32 num_tpc_chainmask_configs;
28488     /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config  */
28489 } wmi_tpc_chainmask_config_cmd_fixed_param;
28490 
28491 typedef struct {
28492     A_UINT32 tlv_header;        /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_req_fixed_param */
28493     A_UINT32 pdev_id;
28494     /**
28495      * Bits 31:0:   base address of ring [31:0]
28496      */
28497     A_UINT32 base_addr_lo;
28498     /**
28499      * Bits 3:0:    base address of ring [35:32]
28500      * Bits 31:4:   reserved
28501      */
28502     A_UINT32 base_addr_hi;
28503     /**
28504      * Bits 31:0:   address of head index [31:0]
28505      */
28506     A_UINT32 head_idx_addr_lo;
28507     /**
28508      * Bits 3:0:    address of head index [35:32]
28509      * Bits 31:4:   reserved
28510      */
28511     A_UINT32 head_idx_addr_hi;
28512     /**
28513      * Bits 31:0:   address of tail index [31:0]
28514      */
28515     A_UINT32 tail_idx_addr_lo;
28516     /**
28517      * Bits 3:0:    address of tail index [35:32]
28518      * Bits 31:4:   reserved
28519      */
28520     A_UINT32 tail_idx_addr_hi;
28521     A_UINT32 num_ptr;           /** Number of pointers in the ring */
28522 } wmi_oem_dma_ring_cfg_req_fixed_param;
28523 
28524 #define WMI_OEM_DMA_RING_ADDR_LO_S 0
28525 #define WMI_OEM_DMA_RING_ADDR_LO 0xffffffff
28526 
28527 #define WMI_OEM_DMA_RING_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_LO)
28528 #define WMI_OEM_DMA_RING_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_LO)
28529 
28530 #define WMI_OEM_DMA_RING_ADDR_HI_S 0
28531 #define WMI_OEM_DMA_RING_ADDR_HI 0xf
28532 
28533 #define WMI_OEM_DMA_RING_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_HI)
28534 #define WMI_OEM_DMA_RING_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_HI)
28535 
28536 typedef struct {
28537     A_UINT32 tlv_header;    /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_rsp_fixed_param */
28538     A_UINT32 pdev_id;
28539     A_UINT32 cfg_status;    /** Configuration status; see A_STATUS */
28540 } wmi_oem_dma_ring_cfg_rsp_fixed_param;
28541 
28542 typedef struct {
28543     A_UINT32 tlv_header;    /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_indirect_data */
28544     A_UINT32 pdev_id;       /** ID of pdev whose OEM DMA ring produced the data */
28545     /**
28546      * Bits 31:0:   address of data [31:0]
28547      */
28548     A_UINT32 addr_lo;
28549     /**
28550      * Bits 3:0:    address of data [35:32]
28551      * Bits 11:4:   reserved
28552      * Bits 31:12:  opaque host context data [19:0]
28553      */
28554     A_UINT32 addr_hi;
28555     A_UINT32 len;           /** Length of data in bytes */
28556 } wmi_oem_indirect_data;
28557 
28558 #define WMI_OEM_DMA_DATA_ADDR_LO_S 0
28559 #define WMI_OEM_DMA_DATA_ADDR_LO 0xffffffff
28560 
28561 #define WMI_OEM_DMA_DATA_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_LO)
28562 #define WMI_OEM_DMA_DATA_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_LO)
28563 
28564 #define WMI_OEM_DMA_DATA_ADDR_HI_S 0
28565 #define WMI_OEM_DMA_DATA_ADDR_HI 0xf
28566 
28567 #define WMI_OEM_DMA_DATA_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI)
28568 #define WMI_OEM_DMA_DATA_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_HI)
28569 
28570 #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_S 12
28571 #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA 0xfffff
28572 
28573 #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA)
28574 #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)
28575 
28576 typedef struct {
28577     A_UINT32 tlv_header;    /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_buf_release_hdr */
28578     A_UINT32 pdev_id;       /** ID of pdev whose OEM DMA ring produced the data */
28579 } wmi_oem_dma_buf_release_fixed_param;
28580 
28581 typedef struct {
28582     /**
28583      * Bits 31:0:   address of data [31:0]
28584      */
28585     A_UINT32 addr_lo;
28586     /**
28587      * Bits 3:0:    address of data [35:32]
28588      * Bits 11:4:   reserved
28589      * Bits 31:12:  host context data [19:0]
28590      */
28591     A_UINT32 addr_hi;
28592 } wmi_oem_dma_buf_release_entry;
28593 
28594 typedef struct {
28595     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_data_cmd_fixed_param */
28596     A_UINT32 tlv_header;
28597     /** Unique id identifying the VDEV */
28598     A_UINT32 vdev_id;
28599     /** Actual length in byte of data[]. */
28600     A_UINT32 data_len;
28601     /**
28602      * pdev_vdev_flag - 0  follow old method (vdev_id is valid, ignore pdev_id)
28603      * pdev_vdev_flag - 1  pdev_id is valid
28604      */
28605     A_UINT32 pdev_vdev_flag;
28606     /** Unique id identifying the PDEV */
28607     A_UINT32 pdev_id;
28608 /** This structure is used to send OEM DATA binary blobs from
28609  * application/service to firmware where Host driver is pass through.
28610  * The OEM-specific commands from OEM-specific userspace applications
28611  * are passed to OEM-specific feature handlers in firmware as OEM DATA
28612  * binary blobs. The format of the data is per agreement between FW and
28613  * userspace applications, with the binary blob beginning with a header
28614  * that identifies to the FW the nature of the remaining data within the
28615  * blob.
28616  *
28617  * Following this structure is the TLV:
28618  *     A_UINT8 data[]; <-- actual length in byte given by field data_len.
28619  */
28620 } wmi_oem_data_cmd_fixed_param;
28621 
28622 typedef struct {
28623     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
28624     A_UINT32 data_len; /** length in byte of data[]. */
28625 /* This structure is used to send REQ binary blobs
28626 * from application/service to firmware where Host drv is pass through .
28627 * Following this structure is the TLV:
28628 *     A_UINT8 data[]; <-- length in byte given by field data_len.
28629 */
28630 } wmi_nan_cmd_param;
28631 
28632 typedef enum {
28633     WMI_NAN_VENDOR1_REQ1 = 1,
28634 } WMI_NAN_OEM_DATA_TYPE;
28635 
28636 typedef struct {
28637     /** oem_data_type:
28638      * Indicate what kind of OEM-specific data is present in the
28639      * oem_data_buffer[].
28640      * Possible values are listed in the enum WMI_NAN_OEM_DATA_TYPE.
28641      */
28642     A_UINT32 oem_data_type;
28643     /** oem_data_len:
28644      * Actual length in bytes of the OEM-specific data within the
28645      * oem_data_buffer[].
28646      * Note that it is possible for a single message to contain multiple
28647      * OEM opaque data blobs.  In such cases, the oem_data_len field of
28648      * nan_oem_data_hdr[0] not only specifies the size of the first such
28649      * opaque blob, but furthermore specifies the offset in oem_data_buffer[]
28650      * where the second opaque blob begins.
28651      */
28652     A_UINT32 oem_data_len;
28653 } wmi_nan_oem_data_hdr;
28654 
28655 typedef struct {
28656     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_oem_data_cmd_fixed_param */
28657 
28658     /* Following this structure are the below TLVs:
28659      *   - wmi_nan_oem_data_hdr nan_oem_data_hdr[];
28660      *     This TLV explains the type and size of the one or more OEM NAN
28661      *     opaque data blobs carried in this message.
28662      *   - A_UINT8 nan_oem_data_buffer[];
28663      *     This TLV holds the contents of the one or more OEM NAN opaque data
28664      *     blobs carried in this message.
28665      */
28666 } wmi_nan_oem_data_cmd_fixed_param;
28667 
28668 #define WMI_NAN_GET_RANGING_INITIATOR_ROLE(flag)      WMI_GET_BITS(flag, 0, 1)
28669 #define WMI_NAN_SET_RANGING_INITIATOR_ROLE(flag, val) WMI_SET_BITS(flag, 0, 1, val)
28670 #define WMI_NAN_GET_RANGING_RESPONDER_ROLE(flag)      WMI_GET_BITS(flag, 1, 1)
28671 #define WMI_NAN_SET_RANGING_RESPONDER_ROLE(flag, val) WMI_SET_BITS(flag, 1, 1, val)
28672 #define WMI_NAN_GET_NAN_6G_DISABLE(flag)              WMI_GET_BITS(flag, 2, 1)
28673 #define WMI_NAN_SET_NAN_6G_DISABLE(flag, val)         WMI_SET_BITS(flag, 2, 1, val)
28674 
28675 typedef struct {
28676     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_host_config_param */
28677     A_UINT32 nan_2g_disc_disable:1; /** This bit when set to 1 indicate NAN 2G discovery should be disabled */
28678     A_UINT32 nan_5g_disc_disable:1; /** This bit when set to 1 indicate NAN 5G discovery should be disabled */
28679     A_UINT32 reserved:30;
28680     /** Flags: refer to WMI_NAN_GET/SET macros
28681      *  Bit   0    -> Nan ranging initiator role (0 - Disable, 1 - Enable)
28682      *  Bit   1    -> Nan ranging responder role (0 - Disable, 1 - Enable)
28683      *  Bit   2    -> Nan 6 GHz support          (1 - Disable, 0 - Enable)
28684      *  Bits  3-31 -> Reserved
28685      */
28686     A_UINT32 flags;
28687 } wmi_nan_host_config_param_PROTOTYPE;
28688 #define wmi_nan_host_config_param wmi_nan_host_config_param_PROTOTYPE
28689 
28690 typedef struct {
28691     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
28692     A_UINT32 data_len; /** length in byte of data[]. */
28693 /* This structure is used to send REQ binary blobs
28694 * from firmware to application/service where Host drv is pass through .
28695 * Following this structure is the TLV:
28696 *     A_UINT8 data[]; <-- length in byte given by field data_len.
28697 */
28698 } wmi_nan_event_hdr;
28699 
28700 typedef struct {
28701     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_oem_data_event_fixed_param */
28702 
28703     /* Following this structure are the below TLVs:
28704      *   - wmi_nan_oem_data_hdr nan_oem_data_hdr[];
28705      *     This TLV explains the type and size of the one or more OEM NAN
28706      *     opaque data blobs carried in this message.
28707      *   - A_UINT8 nan_oem_data_buffer[];
28708      *     This TLV holds the contents of the one or more OEM NAN opaque data
28709      *     blobs carried in this message.
28710      */
28711 } wmi_nan_oem_data_event_fixed_param;
28712 
28713 typedef struct {
28714     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_info */
28715     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 */
28716     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 */
28717     A_UINT32 reserved:31;
28718     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 */
28719 } wmi_nan_event_info_PROTOTYPE;
28720 
28721 #define wmi_nan_event_info wmi_nan_event_info_PROTOTYPE
28722 
28723 /**
28724  * Event to indicate NAN discovery interface created
28725  */
28726 typedef struct {
28727     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param */
28728     A_UINT32 tlv_header;
28729     /** Unique id identifying the VDEV */
28730     A_UINT32 vdev_id;
28731     /** NAN interface MAC address */
28732     wmi_mac_addr nan_interface_macaddr;
28733 } wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE;
28734 
28735 #define wmi_nan_disc_iface_created_event_fixed_param wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE
28736 
28737 /**
28738  * Event to indicate NAN discovery interface deleted
28739  */
28740 typedef struct {
28741     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param */
28742     A_UINT32 tlv_header;
28743     /** Unique id identifying the VDEV */
28744     A_UINT32 vdev_id;
28745 } wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE;
28746 
28747 #define wmi_nan_disc_iface_deleted_event_fixed_param wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE
28748 
28749 /**
28750  * Event to indicate NAN device started new cluster
28751  */
28752 typedef struct {
28753     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param */
28754     A_UINT32 tlv_header;
28755     /** Unique id identifying the VDEV */
28756     A_UINT32 vdev_id;
28757     /** NAN Cluster ID */
28758     A_UINT32 nan_cluster_id;
28759 } wmi_nan_started_cluster_event_fixed_param_PROTOTYPE;
28760 
28761 #define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE
28762 
28763 /**
28764  * Event to indicate NAN device joined to cluster
28765  */
28766 typedef struct {
28767     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param */
28768     A_UINT32 tlv_header;
28769     /** Unique id identifying the VDEV */
28770     A_UINT32 vdev_id;
28771     /** NAN Cluster ID */
28772     A_UINT32 nan_cluster_id;
28773 } wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE;
28774 
28775 #define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE
28776 
28777 typedef struct {
28778     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_dmesg_event_fixed_param */
28779     A_UINT32 tlv_header;
28780     /** length in byte of msg[]. */
28781     A_UINT32 msg_len;
28782     /* Following this structure is the TLV:
28783      *  A_UINT8 msg[]; <-- length in byte given by field data_len.
28784      * This data contains the string message which will be given to Host to dump it to kernel logs.
28785      */
28786 } wmi_nan_dmesg_event_fixed_param;
28787 
28788 typedef struct {
28789     /** TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_nan_capabilities */
28790     A_UINT32 tlv_header;
28791     /** Maximum number of ndp sessions supported by the Firmware */
28792     A_UINT32 max_ndp_sessions;
28793     /** Maximum number of nan pairing sessions supported by the Firmware */
28794     A_UINT32 max_pairing_sessions;
28795 } wmi_nan_capabilities;
28796 
28797 /** NAN DATA CMD's */
28798 
28799 /**
28800  * NAN Data get capabilities req
28801  */
28802 typedef struct {
28803     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param */
28804     A_UINT32 tlv_header;
28805     /** unique id generated in upper layer for the transaction */
28806     A_UINT32 transaction_id;
28807 } wmi_ndi_get_cap_req_fixed_param_PROTOTYPE;
28808 
28809 #define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE
28810 
28811 /**
28812  * NDP Response code
28813  */
28814 typedef enum {
28815     NDP_RSP_CODE_REQUEST_ACCEPT = 0x00,
28816     NDP_RSP_CODE_REQUEST_REJECT = 0x01,
28817     NDP_RSP_CODE_REQUEST_DEFER  = 0x02,
28818 } wmi_ndp_rsp_code_PROTOTYPE;
28819 
28820 #define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE
28821 
28822 /**
28823  * NDP Channel configuration type
28824  */
28825 typedef enum {
28826     WMI_NDP_CHANNEL_NOT_REQUESTED = 0, /* Channel will not configured */
28827     WMI_NDP_REQUEST_CHANNEL_SETUP = 1, /* Channel will be provided and is optional/hint */
28828     WMI_NDP_FORCE_CHANNEL_SETUP = 2/* NDP must start on the provided channel */
28829 } wmi_ndp_channel_cfg_PROTOTYPE;
28830 
28831 /*
28832  * The WMI_NDP_IPV6_INTF_ADDR_LEN macro cannot be changed without breaking
28833  * WMI compatibility.
28834  */
28835 #define WMI_NDP_IPV6_INTF_ADDR_LEN    16
28836 
28837 typedef struct {
28838     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_transport_ip_param */
28839     /* Presence of ipv6_intf_addr */
28840     A_UINT32 ipv6_addr_present;
28841     /* Presence of transport Port */
28842     A_UINT32 trans_port_present;
28843     /* Presence of  transport Protocol */
28844     A_UINT32 trans_proto_present;
28845     /* ipv6 Interface address */
28846     A_UINT8  ipv6_intf_addr[WMI_NDP_IPV6_INTF_ADDR_LEN];
28847     /* Transport Port */
28848     A_UINT32 transport_port;
28849     /* Transport Protocol */
28850     A_UINT32 transport_protocol;
28851 } wmi_ndp_transport_ip_param;
28852 
28853 #define wmi_ndp_channel_cfg wmi_ndp_channel_cfg_PROTOTYPE
28854 
28855 typedef struct {
28856     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_channel_info */
28857     A_UINT32 mac_id; /* mac_id associated with ndp channel at same index */
28858 } wmi_ndp_channel_info_PROTOTYPE;
28859 
28860 #define wmi_ndp_channel_info wmi_ndp_channel_info_PROTOTYPE
28861 
28862 typedef struct {
28863     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_event_param */
28864     A_UINT32 vdev_id; /* NDI VDEV ID */
28865     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 */
28866     A_UINT32 reserved:31;
28867 } wmi_ndp_event_param_PROTOTYPE;
28868 
28869 #define wmi_ndp_event_param wmi_ndp_event_param_PROTOTYPE
28870 
28871 /**
28872  * NDP Initiator requesting a data session
28873  */
28874 typedef struct {
28875     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param */
28876     A_UINT32 tlv_header;
28877     /** Unique id identifying the VDEV */
28878     A_UINT32 vdev_id;
28879     /** unique id generated in upper layer for the transaction */
28880     A_UINT32 transaction_id;
28881     /** Unique Instance Id identifying the Responder's service */
28882     A_UINT32 service_instance_id;
28883     /** Discovery MAC addr of the publisher/peer */
28884     wmi_mac_addr peer_discovery_mac_addr;
28885     /** Actual number of bytes in TLV ndp_cfg */
28886     A_UINT32 ndp_cfg_len;
28887     /** Actual number of bytes in TLV ndp_app_info */
28888     A_UINT32 ndp_app_info_len;
28889     /** NDP channel configuration type defined in wmi_ndp_channel_cfg */
28890     A_UINT32 ndp_channel_cfg;
28891     /**  NAN Cipher Suite Shared Key */
28892     A_UINT32 nan_csid;
28893     /** Actual number of bytes in TLV ndp_pmk */
28894     A_UINT32 nan_pmk_len;
28895     /** Actual number of bytes in TLV ndp_passphrase */
28896     A_UINT32 nan_passphrase_len;
28897     /** Actual number of bytes in TLV nan_servicename */
28898     A_UINT32 nan_servicename_len;
28899     /** NAN Cipher Suite Capability field */
28900     A_UINT32 nan_csid_cap;
28901     /** GTK protection is required for the NDP */
28902     A_UINT32 nan_gtk_required;
28903     /**
28904      * TLV (tag length value) parameters follow the ndp_initiator_req
28905      * structure. The TLV's are:
28906      * wmi_channel channel;
28907      * A_UINT8 ndp_cfg[];
28908      * A_UINT8 ndp_app_info[];
28909      * A_UINT8 ndp_pmk[];
28910      * A_INT8 ndp_passphrase[];
28911      * A_INT8 nan_servicename[];
28912      * wmi_ndp_transport_ip_param ndp_transport_ip_param;
28913      */
28914 } wmi_ndp_initiator_req_fixed_param_PROTOTYPE;
28915 
28916 #define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE
28917 
28918 /**
28919  * Initiate a data response on the responder side
28920  * for data request indication from the peer
28921  */
28922 typedef struct {
28923     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param */
28924     A_UINT32 tlv_header;
28925     /** Unique id identifying the VDEV */
28926     A_UINT32 vdev_id;
28927     /** unique id generated in upper layer for the transaction */
28928     A_UINT32 transaction_id;
28929     /**
28930      * Unique token Id generated on the initiator/responder
28931      * side used for a NDP session between two NAN devices
28932      */
28933     A_UINT32 ndp_instance_id;
28934     /** Response Code defined in wmi_ndp_rsp_code */
28935     A_UINT32 rsp_code;
28936     /** Number of bytes in TLV ndp_cfg */
28937     A_UINT32 ndp_cfg_len;
28938     /** Number of bytes in TLV ndp_app_info */
28939     A_UINT32 ndp_app_info_len;
28940     /**  NAN Cipher Suite Shared Key */
28941     A_UINT32 nan_csid;
28942     /** Actual number of bytes in TLV ndp_pmk */
28943     A_UINT32 nan_pmk_len;
28944     /** Actual number of bytes in TLV ndp_passphrase */
28945     A_UINT32 nan_passphrase_len;
28946     /** Actual number of bytes in TLV nan_servicename */
28947     A_UINT32 nan_servicename_len;
28948     /** NAN Cipher Suite Capability field */
28949     A_UINT32 nan_csid_cap;
28950     /** GTK protection is required for the NDP */
28951     A_UINT32 nan_gtk_required;
28952     /**
28953      * TLV (tag length value) parameters follow the ndp_responder_req
28954      * structure. The TLV's are:
28955      * A_UINT8 ndp_cfg[];
28956      * A_UINT8 ndp_app_info[];
28957      * A_UINT8 ndp_pmk[];
28958      * A_INT8 ndp_passphrase[];
28959      * A_INT8 nan_servicename[];
28960      * wmi_ndp_transport_ip_param ndp_transport_ip_param;
28961      */
28962 } wmi_ndp_responder_req_fixed_param_PROTOTYPE;
28963 
28964 #define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE
28965 
28966 /**
28967  * NDP end type
28968  */
28969 typedef enum {
28970     WMI_NDP_END_TYPE_UNSPECIFIED = 0x00,
28971     WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01,
28972     WMI_NDP_END_TYPE_OTA_FRAME = 0x02,
28973     WMI_NDP_END_TYPE_DATA_INACTIVITY = 0x03,
28974 } wmi_ndp_end_type_PROTOTYPE;
28975 
28976 #define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE
28977 
28978 /**
28979  * NDP end reason code
28980  */
28981 typedef enum {
28982     WMI_NDP_END_REASON_UNSPECIFIED = 0x00,
28983     WMI_NDP_END_REASON_INACTIVITY = 0x01,
28984     WMI_NDP_END_REASON_PEER_DATA_END = 0x02,
28985     WMI_NDP_END_REASON_DATA_INACTIVITY = 0x03,
28986 } wmi_ndp_end_reason_code_PROTOTYPE;
28987 
28988 #define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE
28989 
28990 /**
28991  * NDP end request
28992  */
28993 typedef struct {
28994     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */
28995     A_UINT32 tlv_header;
28996     /** NDP instance id */
28997     A_UINT32 ndp_instance_id;
28998     /** vdev_id valid flag */
28999     A_UINT32 vdev_id_valid;
29000     /** vdev id */
29001     A_UINT32 vdev_id;
29002 } wmi_ndp_end_req_PROTOTYPE;
29003 
29004 #define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
29005 
29006 typedef struct {
29007     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_cmd_param */
29008     A_UINT32 vdev_id; /* NDI VDEV ID */
29009     A_UINT32 ndp_disable:1; /** This bit when set to 1 indicates to terminate all NDPs associated with NDI vdev ID */
29010     A_UINT32 reserved:31;
29011 } wmi_ndp_cmd_param_PROTOTYPE;
29012 
29013 #define wmi_ndp_cmd_param wmi_ndp_cmd_param_PROTOTYPE
29014 
29015 /**
29016  * NDP End request
29017  */
29018 typedef struct {
29019     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param */
29020     A_UINT32 tlv_header;
29021     /** unique id generated in upper layer for the transaction */
29022     A_UINT32 transaction_id;
29023     /**
29024      * TLV (tag length value) parameters follow the ndp_end_req
29025      * structure. The TLV's are:
29026      * wmi_ndp_end_req ndp_end_req_list[];
29027      */
29028 } wmi_ndp_end_req_fixed_param_PROTOTYPE;
29029 
29030 #define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE
29031 
29032 /* NAN DATA RSP EVENTS */
29033 
29034 /**
29035  * Event to indicate NAN Data Interface capabilities cmd
29036  */
29037 typedef struct {
29038     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param */
29039     A_UINT32 tlv_header;
29040     /** Copy of transaction_id received in wmi_ndi_get_cap_req */
29041     A_UINT32 transaction_id;
29042     /** Max ndi interface support */
29043     A_UINT32 max_ndi_interfaces;
29044     /** Max ndp sessions can support */
29045     A_UINT32 max_ndp_sessions;
29046     /** Max number of peer's per ndi */
29047     A_UINT32 max_peers_per_ndi;
29048     /** which combination of bands is supported - see NAN_DATA_SUPPORTED_BAND enums */
29049     A_UINT32 nan_data_supported_bands;
29050 } wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
29051 
29052 #define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
29053 
29054 /**
29055  * NDP command response code
29056  */
29057 typedef enum {
29058     NDP_CMD_RSP_STATUS_SUCCESS = 0x00,
29059     NDP_CMD_RSP_STATUS_ERROR = 0x01,
29060 } wmi_ndp_cmd_rsp_status_PROTOTYPE;
29061 
29062 #define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE
29063 
29064 /**
29065  * Event response for wmi_ndp_initiator_req
29066  */
29067 typedef struct {
29068     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param */
29069     A_UINT32 tlv_header;
29070     /** Unique id identifying the VDEV */
29071     A_UINT32 vdev_id;
29072     /** Copy of transaction_id received in wmi_ndp_initiator_req */
29073     A_UINT32 transaction_id;
29074     /** Response status defined in wmi_ndp_cmd_rsp_status*/
29075     A_UINT32 rsp_status;
29076     A_UINT32 reason_code;
29077     /**
29078      * Unique token Id generated on the initiator/responder
29079      * side used for a NDP session between two NAN devices
29080      */
29081     A_UINT32 ndp_instance_id;
29082 } wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE;
29083 
29084 #define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE
29085 
29086 /**
29087  * Event response for wmi_ndp_responder_req cmd
29088  */
29089 typedef struct {
29090     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param */
29091     A_UINT32 tlv_header;
29092     /** Unique id identifying the VDEV */
29093     A_UINT32 vdev_id;
29094     /** Copy of transaction_id received in wmi_ndp_responder_req */
29095     A_UINT32 transaction_id;
29096     /** Response status defined in wmi_ndp_cmd_rsp_status*/
29097     A_UINT32 rsp_status;
29098     A_UINT32 reason_code;
29099     /**
29100      * Unique token Id generated on the initiator/responder
29101      * side used for a NDP session between two NAN devices
29102      */
29103     A_UINT32 ndp_instance_id;
29104     /** NDI mac address of the peer */
29105     wmi_mac_addr peer_ndi_mac_addr;
29106     /** Host can create peer if this entry is TRUE */
29107     A_UINT32 create_peer;
29108 } wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
29109 
29110 #define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
29111 
29112 /**
29113  * Active ndp instance id
29114  */
29115 typedef struct {
29116     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_active_ndp_instance_id */
29117     A_UINT32 tlv_header;
29118     /** NDP instance id */
29119     A_UINT32 ndp_instance_id;
29120 } wmi_active_ndp_instance_id_PROTOTYPE;
29121 
29122 #define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE
29123 
29124 /**
29125  * NDP end response per ndi
29126  */
29127 typedef struct {
29128     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi */
29129     A_UINT32 tlv_header;
29130     /** Unique id identifying the VDEV */
29131     A_UINT32 vdev_id;
29132     /** Peer MAC addr */
29133     wmi_mac_addr peer_mac_addr;
29134     /** Number of active ndps on this ndi */
29135     A_UINT32 num_active_ndps_on_ndi;
29136 } wmi_ndp_end_rsp_per_ndi_PROTOTYPE;
29137 
29138 #define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE
29139 
29140 /**
29141  * Event response for wmi_ndp_end_req cmd
29142  */
29143 typedef struct {
29144     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param */
29145     A_UINT32 tlv_header;
29146     /** Copy of transaction_id received in wmi_ndp_end_req */
29147     A_UINT32 transaction_id;
29148     /** Response status defined in wmi_ndp_cmd_rsp_status*/
29149     A_UINT32 rsp_status;
29150     A_UINT32 reason_code;
29151     /**
29152      * TLV (tag length value) parameters follow the ndp_end_rsp
29153      * structure. The TLV's are:
29154      * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[];
29155      * wmi_active_ndp_instance_id active_ndp_instances_id[];
29156      */
29157 } wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE;
29158 
29159 #define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE
29160 
29161 /** NAN DATA EVENTS */
29162 
29163 /**
29164  * NDP self role
29165  */
29166 typedef enum {
29167     WMI_NDP_INITIATOR_ROLE,
29168     WMI_NDP_RESPONDER_ROLE,
29169 } wmi_ndp_self_role_PROTOTYPE;
29170 
29171 #define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE
29172 
29173 /**
29174  * NDP accept policy
29175  */
29176 typedef enum {
29177     WMI_NDP_ACCEPT_POLICY_NONE,
29178     WMI_NDP_ACCEPT_POLICY_ALL,
29179 } wmi_ndp_accept_policy_PROTOTYPE;
29180 
29181 #define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE
29182 
29183 /**
29184  * Event indication received on the responder side when a NDP Initiator request/
29185  * NDP session is initiated on the Initiator side (self role will be NDP_RESPONDER_ROLE)
29186  *
29187  * Event indication received on the initiator side when a
29188  * NDP responder request on the Initiator side (self role will be NDP_INITIATOR_ROLE)
29189  */
29190 typedef struct {
29191     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param */
29192     A_UINT32 tlv_header;
29193     /** Unique id identifying the VDEV */
29194     A_UINT32 vdev_id;
29195     /** Self NDP Role defined in wmi_ndp_self_role */
29196     A_UINT32 self_ndp_role;
29197     /** Accept policy defined in wmi_ndp_accept_policy */
29198     A_UINT32 accept_policy;
29199     /** Unique Instance Id corresponding to a service/session. */
29200     A_UINT32 service_instance_id;
29201     /** Discovery MAC addr of the peer/initiator */
29202     wmi_mac_addr peer_discovery_mac_addr;
29203     /** NDI mac address of the peer */
29204     wmi_mac_addr peer_ndi_mac_addr;
29205     /**
29206      * Unique token Id generated on the initiator/responder
29207      * side used for a NDP session between two NAN devices
29208      */
29209     A_UINT32 ndp_instance_id;
29210     /** Number of bytes in TLV wmi_ndp_cfg */
29211     A_UINT32 ndp_cfg_len;
29212     /** Number of bytes in TLV wmi_ndp_app_info */
29213     A_UINT32 ndp_app_info_len;
29214     /** Peer NAN Cipher Suite Shared Key */
29215     A_UINT32 nan_csid;
29216     /** Actual number of bytes in TLV nan_scid */
29217     A_UINT32 nan_scid_len;
29218     /** Self NDI mac address */
29219     wmi_mac_addr self_ndi_mac_addr;
29220     /** Number of bytes in TLV service_id */
29221     A_UINT32 service_id_len;
29222     /** NAN Cipher Suite Capability field */
29223     A_UINT32 nan_csid_cap;
29224     /** GTK protection is required for the NDP */
29225     A_UINT32 nan_gtk_required;
29226     /**
29227      * TLV (tag length value) parameters follow the ndp_indication
29228      * structure. The TLV's are:
29229      * A_UINT8 ndp_cfg[];
29230      * A_UINT8 ndp_app_info[];
29231      * A_UINT8 nan_scid[];
29232      * wmi_ndp_transport_ip_param ndp_transport_ip_param;
29233      * A_UINT8 service_id[service_id_len]; <- holds a single service ID of an
29234      *     indeterminate number of bytes (most likely 6 bytes)
29235      */
29236 } wmi_ndp_indication_event_fixed_param_PROTOTYPE;
29237 
29238 #define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE
29239 
29240 /**
29241  * Event indication of data confirm is received on both
29242  * initiator and responder side confirming a NDP session
29243  */
29244 typedef struct {
29245     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param */
29246     A_UINT32 tlv_header;
29247     /** Unique id identifying the VDEV */
29248     A_UINT32 vdev_id;
29249     /**
29250      * Unique token Id generated on the initiator/responder
29251      * side used for a NDP session between two NAN devices
29252      */
29253     A_UINT32 ndp_instance_id;
29254     /** NDI mac address of the peer (required to derive target ipv6 address) */
29255     wmi_mac_addr peer_ndi_mac_addr;
29256     /** Response Code defined in wmi_ndp_rsp_code */
29257     A_UINT32 rsp_code;
29258     /** Number of bytes in TLV wmi_ndp_cfg */
29259     A_UINT32 ndp_cfg_len;
29260     /** Number of bytes in TLV wmi_ndp_app_info */
29261     A_UINT32 ndp_app_info_len;
29262     /** Reason Code */
29263     A_UINT32 reason_code;
29264     /** Number of active ndps on this peer */
29265     A_UINT32 num_active_ndps_on_peer;
29266     /** Number of channels on this peer */
29267     A_UINT32 num_ndp_channels;
29268     /**
29269      * TLV (tag length value) parameters follow the ndp_confirm
29270      * structure. The TLV's are:
29271      * A_UINT8 ndp_cfg[];
29272      * A_UINT8 ndp_app_info[];
29273      * wmi_channel ndp_channel_list[];
29274      * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
29275      *                      // since Nss is associated with the channel
29276      * wmi_ndp_transport_ip_param ndp_transport_ip_param;
29277      */
29278 } wmi_ndp_confirm_event_fixed_param_PROTOTYPE;
29279 
29280 #define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE
29281 
29282 /**
29283  * Event indication received on the initiator/responder side terminating a NDP session
29284  */
29285 typedef struct {
29286     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_indication */
29287     A_UINT32 tlv_header;
29288     /** type defined in  wmi_ndp_end_type */
29289     A_UINT32 type;
29290     /** Unique id identifying the VDEV */
29291     A_UINT32 vdev_id;
29292     /** reason_code  defined in  wmi_ndp_end_reason_code */
29293     A_UINT32 reason_code;
29294     /** NDP instance id */
29295     A_UINT32 ndp_instance_id;
29296     /** NDI MAC addr of the peer */
29297     wmi_mac_addr peer_ndi_mac_addr;
29298     /** Number of active ndps on this peer */
29299     A_UINT32 num_active_ndps_on_peer;
29300 } wmi_ndp_end_indication_PROTOTYPE;
29301 
29302 #define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE
29303 
29304 typedef struct
29305 {
29306     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndl_schedule_update_fixed_param */
29307     /** Unique id identifying the VDEV */
29308     A_UINT32 vdev_id;
29309    /** peer MAC address */
29310     wmi_mac_addr peer_macaddr;
29311    /** Flags:
29312     *  Bit   0    -> Nss updated
29313     *  Bit   1    -> channel list updated
29314     *  Bits  2-31 -> Reserved
29315     */
29316     A_UINT32 flags;
29317     /** num of channels */
29318     A_UINT32 num_channels;
29319     /** num of ndp instances */
29320     A_UINT32 num_ndp_instances;
29321     /**
29322      * TLV (tag length value) parameters follow the ndl_schedule_update
29323      * structure. The TLV's are:
29324      * A_UINT32 ndp_instance_list[];
29325      * wmi_channel ndl_channel_list[];
29326      * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
29327      *                      // since Nss is associate with a channel
29328      */
29329 } wmi_ndl_schedule_update_fixed_param_PROTOTYPE;
29330 
29331 #define wmi_ndl_schedule_update_fixed_param wmi_ndl_schedule_update_fixed_param_PROTOTYPE
29332 
29333 typedef struct {
29334     A_UINT32 tlv_header;
29335     A_UINT32 num_data;
29336     /* followed by WMITLV_TAG_ARRAY_BYTE */
29337 } wmi_diag_data_container_event_fixed_param;
29338 
29339 enum {
29340     WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
29341     WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
29342     WMI_PDEV_PARAM_TXPOWER_REASON_MAX
29343 };
29344 
29345 #define PDEV_PARAM_TXPOWER_VALUE_MASK  0x000000FF
29346 #define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
29347 
29348 #define PDEV_PARAM_TXPOWER_REASON_MASK  0x0000FF00
29349 #define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
29350 
29351 #define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value)     \
29352     ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
29353 
29354 #define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value)     \
29355     ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
29356 
29357 #define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param)     \
29358     (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
29359 
29360 #define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param)     \
29361     (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
29362 
29363 #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK 0x00000001
29364 #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT 0
29365 
29366 #define SET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param, value) \
29367     do { \
29368         (param) &= ~PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK; \
29369         (param) |= (value) << PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT; \
29370     } while (0)
29371 
29372 #define GET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param)     \
29373     (((param) & PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK) >> PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT)
29374 
29375 /**
29376  * This command is sent from WLAN host driver to firmware to
29377  * notify the current modem power state. Host would receive a
29378  * message from modem when modem is powered on. Host driver
29379  * would then send this command to firmware. Firmware would then
29380  * power on WCI-2 (UART) interface for LTE/MWS Coex.
29381  *
29382  * This command is only applicable for APQ platform which has
29383  * modem on the platform. If firmware doesn't support MWS Coex,
29384  * this command can be dropped by firmware.
29385  *
29386  * This is a requirement from modem team that WCN can't toggle
29387  * UART before modem is powered on.
29388  */
29389 typedef struct {
29390     /** TLV tag and len; tag equals
29391      *  WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
29392     A_UINT32 tlv_header;
29393 
29394     /** Modem power state parameter */
29395     A_UINT32 modem_power_state;
29396 } wmi_modem_power_state_cmd_param;
29397 
29398 enum {
29399     WMI_MODEM_STATE_OFF = 0,
29400     WMI_MODEM_STATE_ON
29401 };
29402 
29403 /**
29404  * This command is sent from WLAN host driver to firmware to
29405  * notify the updated Specific Absorption Rate (SAR) limits.
29406  * A critical regulation for FCC compliance, OEMs require methods to set
29407  * limits on TX power of WLAN/WWAN.
29408  * Host would receive instructions on what to set the limits per
29409  * band/chain/modulation to, it would then interpret and send the limits
29410  * to FW using this WMI message.
29411  * Since it is possible to have too many commands to fit into one message,
29412  * FW will keep receiving the messages, until it finds one with
29413  * commit_limits = 1, at which point it will apply all the received
29414  * specifications.
29415  */
29416 typedef struct {
29417     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limits_cmd_param */
29418     A_UINT32 tlv_header;
29419 
29420     /** when set to WMI_SAR_FEATURE_ON_*, enable SAR feature
29421      *  with BDF (SET_0 to 4) or WMI
29422      * if set to WMI_SAR_FEATURE_OFF, disable feature;
29423      * if set to WMI_SAR_FEATURE_NO_CHANGE, do not alter state of feature;
29424      */
29425     A_UINT32 sar_enable;
29426 
29427     /** number of items in sar_limits[] */
29428     A_UINT32 num_limit_rows;
29429 
29430     /** once received and is set to 1, FW will calculate the power limits
29431      * and send set_power command to apply them.
29432      * Otherwise just update local values stored in FW until a future msg
29433      * with commit_limits=1 arrives.
29434      */
29435     A_UINT32 commit_limits;
29436 
29437     /**
29438      * TLV (tag length value) parameters follow the sar_limit_cmd_row
29439      * structure. The TLV's are:
29440      * wmi_sar_limit_cmd_row sar_limits[];
29441      */
29442 } wmi_sar_limits_cmd_fixed_param;
29443 
29444 enum wmi_sar_feature_state_flags {
29445     WMI_SAR_FEATURE_OFF = 0,
29446     WMI_SAR_FEATURE_ON_SET_0,
29447     WMI_SAR_FEATURE_ON_SET_1,
29448     WMI_SAR_FEATURE_ON_SET_2,
29449     WMI_SAR_FEATURE_ON_SET_3,
29450     WMI_SAR_FEATURE_ON_SET_4,
29451     WMI_SAR_FEATURE_NO_CHANGE,
29452     WMI_SAR_FEATURE_ON_USER_DEFINED,
29453     WMI_SAR_FEATURE_ON_SAR_V2_0,
29454     WMI_SAR_FEATURE_ON_SAR_V3,
29455 };
29456 
29457 typedef struct {
29458     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limit_cmd_row */
29459 
29460     /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
29461      * new band_id values .
29462      */
29463     A_UINT32 band_id;
29464 
29465     A_UINT32 chain_id;
29466 
29467     /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
29468     A_UINT32 mod_id;
29469 
29470     /**
29471      * To be backwards-compatible with older code use a union with
29472      * limit_value & limit_index as alternate names / interpretations
29473      * of the same message information element.
29474      * The older code still uses limit_value, while the new code will
29475      * use limit_index.
29476      * The interpretation of the field as value or index depends on
29477      * WMI_SAR_FEATURE_ON_*
29478      * WMI_SAR_FEATURE_ON_SAR_V2_0 will use it as index, other case
29479      * still use it as value.
29480      */
29481     union {
29482         /** actual power limit value, in steps of 0.5 dBm */
29483         A_UINT32 limit_value;
29484         A_UINT32 limit_index;
29485     };
29486 
29487     /** in case the OEM doesn't care about one of the qualifiers from above,
29488      * the bit for that qualifier within the validity_bitmap can be set to 0
29489      * so that limit is applied to all possible cases of this qualifier
29490      * (i.e. if a qualifier's validity_bitmap flag is 0, the qualifier is
29491      * treated as a wildcard).
29492      * Current masks:
29493      *     WMI_SAR_BAND_ID_VALID_MASK
29494      *     WMI_SAR_CHAIN_ID_VALID_MASK
29495      *     WMI_SAR_MOD_ID_VALID_MASK
29496      * Example: if !WMI_IS_SAR_MOD_ID_VALID(bitmap),
29497      *     it means apply same limit_value to both WMI_SAR_MOD_CCK and
29498      *     WMI_SAR_MOD_OFDM cases.
29499      */
29500     A_UINT32 validity_bitmap;
29501 } wmi_sar_limit_cmd_row;
29502 
29503 enum wmi_sar_band_id_flags {
29504     WMI_SAR_2G_ID = 0,
29505     WMI_SAR_5G_ID
29506 };
29507 
29508 enum wmi_sar_mod_id_flags {
29509     WMI_SAR_MOD_CCK = 0,
29510     WMI_SAR_MOD_OFDM
29511 };
29512 
29513 /**
29514  * This message is sent from FW to WLAN host to inform the host of the
29515  * updated Specific Absorption Rate (SAR) limits currently in use.
29516  */
29517 typedef struct {
29518     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_event_param */
29519     A_UINT32 tlv_header;
29520 
29521     /** when set to WMI_SAR_FEATURE_ON_*, SAR feature is enabled
29522      *  with BDF (SET_0 to 4) or WMI
29523      * if set to WMI_SAR_FEATURE_OFF, feature is disabled;
29524      */
29525     A_UINT32 sar_enable;
29526 
29527     /**
29528      * number of items in sar_limits[].
29529      *  used when sar_enable == WMI_SAR_FEATURE_ON_USER_DEFINED.
29530      *  Should be zero if any of the BDF sets is activated.
29531      */
29532     A_UINT32 num_limit_rows;
29533 
29534     /**
29535      * TLV (tag length value) parameters follow the sar_get_limit_event_row
29536      * structure. The TLV's are:
29537      * wmi_sar_get_limit_event_row sar_limits[num_limit_rows];
29538      */
29539 } wmi_sar_get_limits_event_fixed_param;
29540 
29541 typedef struct {
29542     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limit_event_row */
29543 
29544     /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
29545      * new band_id values .
29546      */
29547     A_UINT32 band_id;
29548 
29549     A_UINT32 chain_id;
29550 
29551     /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
29552     A_UINT32 mod_id;
29553 
29554     /** actual power limit value, in steps of 0.5 dBm */
29555     A_UINT32 limit_value;
29556 } wmi_sar_get_limit_event_row;
29557 
29558 #define WMI_SAR_BAND_ID_VALID_MASK      (0x1)
29559 #define WMI_SAR_CHAIN_ID_VALID_MASK     (0x2)
29560 #define WMI_SAR_MOD_ID_VALID_MASK       (0x4)
29561 
29562 #define WMI_SET_SAR_BAND_ID_VALID(bitmap)    ((bitmap) |= WMI_SAR_BAND_ID_VALID_MASK)
29563 #define WMI_SET_SAR_CHAIN_ID_VALID(bitmap)   ((bitmap) |= WMI_SAR_CHAIN_ID_VALID_MASK)
29564 #define WMI_SET_SAR_MOD_ID_VALID(bitmap)     ((bitmap) |= WMI_SAR_MOD_ID_VALID_MASK)
29565 
29566 #define WMI_IS_SAR_BAND_ID_VALID(bitmap)     ((bitmap) & WMI_SAR_BAND_ID_VALID_MASK)
29567 #define WMI_IS_SAR_CHAIN_ID_VALID(bitmap)    ((bitmap) & WMI_SAR_CHAIN_ID_VALID_MASK)
29568 #define WMI_IS_SAR_MOD_ID_VALID(bitmap)      ((bitmap) & WMI_SAR_MOD_ID_VALID_MASK)
29569 
29570 /**
29571  * This command is sent from WLAN host driver to firmware to
29572  * get current Specific Absorption Rate (SAR) limits status from firmware.
29573  * The command does not require any parameters as of now.
29574  */
29575 typedef struct {
29576     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_cmd_param */
29577     A_UINT32 tlv_header;
29578     /** currently no parameters are required. Reserved bit field for future use added */
29579     /*  All bits need to be set to 0 while it is a reserved field. */
29580     A_UINT32 reserved;
29581 } wmi_sar_get_limits_cmd_fixed_param;
29582 
29583 #define WMI_ROAM_AUTH_STATUS_CONNECTED       0x1 /** connected, but not authenticated */
29584 #define WMI_ROAM_AUTH_STATUS_AUTHENTICATED   0x2 /** connected and authenticated */
29585 
29586 /** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
29587     generated whenever firmware roamed to new AP silently and
29588     (a) If the host is awake, FW sends the event to the host immediately .
29589     (b) If host is in sleep then either
29590         (1) FW waits until  host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
29591     command to FW (part of host wake up sequence  from low power mode) before sending the event host.
29592         (2) data/mgmt frame is received from roamed AP, which needs to return to host
29593 */
29594 
29595 #define GTK_OFFLOAD_KCK_EXTENDED_BYTES 32
29596 
29597 typedef struct {
29598     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
29599     A_UINT32 tlv_header;
29600 
29601     A_UINT8  kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
29602     A_UINT8  kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
29603     A_UINT8  replay_counter[GTK_REPLAY_COUNTER_BYTES];
29604 } wmi_key_material;
29605 
29606 typedef struct {
29607     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material_ext */
29608     A_UINT32 tlv_header;
29609     /*
29610      * key_buffer contains kck,kck2,kek,kek2,replay counter, in order.
29611      * If both the below kck_len and kek_len fields are 0x0, the split
29612      * between kck vs. kek should be inferred based on akmp.
29613      */
29614     A_UINT8  key_buffer[GTK_OFFLOAD_KEK_EXTENDED_BYTES+GTK_OFFLOAD_KCK_EXTENDED_BYTES+GTK_REPLAY_COUNTER_BYTES];
29615     /* length of kck in key_buffer */
29616     A_UINT32 kck_len;
29617     /* length of kek in key_buffer */
29618     A_UINT32 kek_len;
29619 } wmi_key_material_ext;
29620 
29621 typedef struct {
29622     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param  */
29623     /** Unique id identifying the VDEV on which roaming is done by firmware */
29624     A_UINT32 vdev_id;
29625     /** auth_status: connected or authorized */
29626     A_UINT32 auth_status;
29627     /** roam_reason:
29628      * bits 0-3  roam trigger reason LSbs - see WMI_ROAM_TRIGGER_REASON_XXX
29629      * bits 4-5  subnet status - see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
29630      * bit  6    HW mode status, set 1 to indicate host to schedule
29631      *           HW mode change, see WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE.
29632      * bit  7    0x1 to show bits 8-15 are valid
29633      * bits 8-15 full WMI_ROAM_TRIGGER_REASON_ID/WMI_ROAM_TRIGGER_EXT_REASON_ID
29634      *           since 4 bits are not enough.
29635      */
29636     A_UINT32 roam_reason;
29637     /** associated AP's RSSI calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
29638     A_UINT32 rssi;
29639     /** MAC address of roamed AP */
29640     wmi_mac_addr bssid;     /* BSSID */
29641     /** whether the frame is beacon or probe rsp */
29642     A_UINT32 is_beacon;
29643     /** the length of beacon/probe rsp */
29644     A_UINT32 bcn_probe_rsp_len;
29645     /** the length of reassoc rsp */
29646     A_UINT32 reassoc_rsp_len;
29647     /** the length of reassoc req */
29648     A_UINT32 reassoc_req_len;
29649     /**
29650      * maximum allowed Tx power (in dBm) for this connection.
29651      * max_allowed_tx_power = 0 dBm means value is not specified.
29652      */
29653     A_INT32 max_allowed_tx_power;
29654     /** unique id to identify mac's TSF register */
29655     A_UINT32 mac_tsf_id;
29656     /** ignore mac_tsf_id unless mac_tsf_id_valid is set */
29657     A_UINT32 mac_tsf_id_valid;
29658     /**
29659      * TLV (tag length value) parameters follows roam_synch_event
29660      * The TLV's are:
29661      *     A_UINT8 bcn_probe_rsp_frame[bcn_probe_resp_len];
29662      *     A_UINT8 reassoc_rsp_frame[reassoc_rsp_len];
29663      *     wmi_channel chan;
29664      *     wmi_key_material key[];
29665      *     A_UINT32 status[]; subnet changed status not being used currently.
29666      *         Will pass the information using roam_status.
29667      *     A_UINT8 reassoc_req_frame[reassoc_req_len];
29668      *     wmi_pdev_hw_mode_transition_event_fixed_param
29669      *         hw_mode_transition_fixed_param[];
29670      *     wmi_pdev_set_hw_mode_response_vdev_mac_entry
29671      *         wmi_pdev_set_hw_mode_response_vdev_mac_mapping[];
29672      *     wmi_roam_fils_synch_tlv_param roam_fils_synch_info[];
29673      *     wmi_key_material_ext key_ext[];
29674      *     wmi_roam_pmk_cache_synch_tlv_param roam_pmk_cache_synch_info[];
29675      *     wmi_pdev_band_to_mac mac_freq_mapping[];
29676      */
29677 } wmi_roam_synch_event_fixed_param;
29678 
29679 /**
29680  * The WMI_ROAM_SYNCH_FRAME_EVENTID message is used in conjunction with the
29681  * WMI_ROAM_SYNCH_EVENTID message.  The former will be sent 1st followed by
29682  * the latter for cases where the WMI_ROAM_SYNCH_EVENTID message size would
29683  * exceed 2K.  The more_frag field in the WMI_ROAM_SYNCH_FRAME_EVENTID informs
29684  * the host whether more WMI_ROAM_SYNCH_FRAME_EVENTID messages would follow;
29685  * after the WMI_ROAM_SYNCH_FRAME_EVENTID messages the target sends the
29686  * WMI_ROAM_SYNCH_EVENTID with bcn_probe_rsp_len, reassoc_rsp_len, and
29687  * reassoc_rsp_len set to 0.
29688  */
29689 typedef struct {
29690     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_frame_event_fixed_param  */
29691     /** Unique id identifying the VDEV on which roaming is done by firmware */
29692     A_UINT32 vdev_id;
29693     /** More frags to follow? */
29694     A_UINT32 more_frag;
29695     /** whether the frame is beacon or probe rsp */
29696     A_UINT32 is_beacon;
29697     /** the length of beacon/probe rsp */
29698     A_UINT32 bcn_probe_rsp_len;
29699     /** the length of reassoc rsp */
29700     A_UINT32 reassoc_rsp_len;
29701     /** the length of reassoc req */
29702     A_UINT32 reassoc_req_len;
29703     A_INT32 bcn_probe_resp_rssi; /* RSSI units dBm */
29704     /**
29705      * TLV (tag length value) parameters follows roam_synch_event
29706      * The TLV's are:
29707      *     A_UINT8 bcn_probe_rsp_frame[bcn_probe_rsp_len];
29708      *     A_UINT8 reassoc_rsp_frame[reassoc_rsp_len];
29709      *     A_UINT8 reassoc_req_frame[reassoc_req_len];
29710      */
29711 } wmi_roam_synch_frame_event_fixed_param;
29712 
29713 typedef struct {
29714     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_frame_event_fixed_param  */
29715     /** Unique id identifying the VDEV on which roaming is done by firmware */
29716     A_UINT32 vdev_id;
29717     /* Exact frame length without considering 4 byte alignment */
29718     A_UINT32 frame_length;
29719     A_INT32  rssi; /* Units in dBm */
29720     /* The frequency on which to transmit. */
29721     A_UINT32 primary_channel_freq; /* MHz units */
29722     /**
29723      * TLV (tag length value) parameters follows roam_frame_event
29724      * The TLV's are:
29725      *     A_UINT8 frame[frame_length];
29726      */
29727 } wmi_roam_frame_event_fixed_param;
29728 
29729 #define WMI_PEER_ESTIMATED_LINKSPEED_INVALID    0xFFFFFFFF
29730 
29731 typedef struct {
29732     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
29733     A_UINT32 tlv_header;
29734     /** MAC address of the peer for which the estimated link speed is required. */
29735     wmi_mac_addr peer_macaddr;
29736     /* Set to 1 only if vdev_id field is valid */
29737     A_UINT32 valid_vdev_id;
29738     /* VDEV to which the peer belongs to */
29739     A_UINT32 vdev_id;
29740 } wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
29741 
29742 typedef struct {
29743     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
29744     A_UINT32 tlv_header;
29745     /** MAC address of the peer for which the estimated link speed is required.
29746      */
29747     wmi_mac_addr peer_macaddr;
29748   /* Estimated link speed in kbps.
29749    * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
29750    */
29751     A_UINT32 est_linkspeed_kbps;
29752     /* Set to 1 only if vdev_id field is valid */
29753     A_UINT32 valid_vdev_id;
29754     /* VDEV to which the peer belongs to */
29755     A_UINT32 vdev_id;
29756 } wmi_peer_estimated_linkspeed_event_fixed_param;
29757 
29758 typedef struct {
29759     A_UINT32 tlv_header; /* TLV tag and len; tag equals */
29760     /* vdev ID */
29761     A_UINT32 vdev_id;
29762     A_UINT32 data_len; /** length in byte of data[]. */
29763 /* This structure is used to send REQ binary blobs
29764  * from application/service to firmware where Host drv is pass through .
29765  * Following this structure is the TLV:
29766  *     A_UINT8 data[]; <-- length in byte given by field data_len.
29767  *     A_UINT32 vdev_id_bitmap[];
29768  *         This array is present and non-zero length in MLO case, stats should
29769  *         only be provided from the vdev_id_bitmap in the bitmap when it is
29770  *         present.
29771  */
29772 } wmi_req_stats_ext_cmd_fixed_param;
29773 
29774 typedef struct {
29775     /** TLV tag and len; tag equals
29776      *  WMITLV_TAG_STRUC_wmi_partner_link_stats */
29777     A_UINT32 tlv_header;
29778     A_UINT32 vdev_id;
29779     A_UINT32 data_length; /* length of the stats for this vdev */
29780     A_UINT32 offset; /* offset of the stats from partner_link_data for this vdev */
29781 } wmi_partner_link_stats;
29782 
29783 typedef struct {
29784     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
29785     A_UINT32 vdev_id; /** vdev ID */
29786     A_UINT32 data_len; /** length in byte of data[]. */
29787     /* This structure is used to send REQ binary blobs
29788      * from firmware to application/service where Host drv is pass through .
29789      * Following this structure is the TLV:
29790      *     A_UINT8 data[]; <-- length in byte given by field data_len.
29791      */
29792     /* This structure is used to send information of partner links.
29793      * Following this structure is the TLV:
29794      *     wmi_partner_link_stats partner_link_stats[];
29795      */
29796     /* This structure is used to send REQ binary blobs of stats of partner
29797      * links from firmware to application/service where Host drv is pass
29798      * through.
29799      * Following this structure is the TLV partner_link_stats:
29800      *     A_UINT8 partner_link_stats_data[]; <-- length and offset in byte
29801      *                                            units given by TLV
29802      *                                            wmi_partner_link_stats.
29803      */
29804 } wmi_stats_ext_event_fixed_param;
29805 
29806 typedef enum {
29807     /** Default: no replay required. */
29808     WMI_PEER_DELETE_NO_REPLAY = 0,
29809     /**
29810       * Replay requested due to UMAC hang during Peer delete.
29811       * Replay done by Host SW after MLO UMAC SSR recovered the UMAC.
29812       */
29813     WMI_PEER_DELETE_REPLAY_FOR_UMAC,
29814 } WMI_PEER_DELETE_REPLAY_T;
29815 
29816 typedef struct {
29817     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param  */
29818     /** unique id identifying the VDEV, generated by the caller */
29819     A_UINT32 vdev_id;
29820     /** peer MAC address */
29821     wmi_mac_addr peer_macaddr;
29822     /** WMI_PEER_DELETE_REPLAY_T */
29823     A_UINT32 replay_type;
29824 } wmi_peer_delete_resp_event_fixed_param;
29825 
29826 typedef struct {
29827     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_all_peer_resp_event_fixed_param */
29828     /** unique id identifying the VDEV, generated by the caller */
29829     A_UINT32 vdev_id;
29830     /* Status of peer delete all command */
29831     /*
29832      * Values for Status:
29833      *  0 - OK; command successful
29834      *  1 - EINVAL; Requested invalid vdev_id
29835      *  2 - EFAILED; Delete all peer failed
29836      */
29837     A_UINT32 status;
29838     /** WMI_PEER_DELETE_REPLAY_T */
29839     A_UINT32 replay_type;
29840 } wmi_vdev_delete_all_peer_resp_event_fixed_param;
29841 
29842 typedef struct {
29843     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
29844     A_UINT32 tlv_header;
29845     A_UINT32 vdev_id; /* vdev ID */
29846     /* MAC address of the peer for which the estimated link speed is required.*/
29847     wmi_mac_addr peer_macaddr;
29848     A_UINT32 state; /* peer state */
29849 } wmi_peer_state_event_fixed_param;
29850 
29851 typedef struct {
29852     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param */
29853     A_UINT32 tlv_header;
29854     /* unique id identifying the VDEV, generated by the caller */
29855     A_UINT32 vdev_id;
29856     /* peer MAC address */
29857     wmi_mac_addr peer_macaddr;
29858     /* status
29859      * 0: ok
29860      * 1: fail - peer not present
29861      */
29862     A_UINT32 status;
29863 } wmi_peer_assoc_conf_event_fixed_param;
29864 
29865 typedef struct {
29866     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_conf_event_fixed_param */
29867     A_UINT32 tlv_header;
29868     /* unique id identifying the VDEV, generated by the caller */
29869     A_UINT32 vdev_id;
29870     /* peer MAC address */
29871     wmi_mac_addr peer_macaddr;
29872     /* 0: OK.
29873      * 1: FAIL - same bss peer exist already. */
29874     A_UINT32 status;
29875 } wmi_peer_create_conf_event_fixed_param;
29876 
29877 enum {
29878     WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0,    /** scan_type: passive */
29879     WMI_2G4_HT40_OBSS_SCAN_ACTIVE, /** scan_type: active */
29880 };
29881 
29882 typedef struct {
29883     /**
29884      * TLV tag and len;
29885      * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enable_cmd_fixed_param
29886      */
29887     A_UINT32 tlv_header;
29888     A_UINT32 vdev_id;
29889     /**
29890      * active or passive. if active all the channels are actively scanned.
29891      *  if passive then all the channels are passively scanned
29892      */
29893     A_UINT32 scan_type;
29894     /**
29895      * FW can perform multiple scans with in a  OBSS scan interval.
29896      * For each scan,
29897      *  if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel  ,
29898      *  if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
29899      *   The unit for these 2 parameters is TUs.
29900      */
29901     A_UINT32 obss_scan_passive_dwell;
29902     A_UINT32 obss_scan_active_dwell;
29903     /**
29904      * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
29905      *  both min and total per channel dwell time requirement
29906      */
29907     A_UINT32 bss_channel_width_trigger_scan_interval;
29908     /**
29909      * FW can perform multiple scans with in a  OBSS scan interval.
29910      * For each scan,
29911      * the total per channel dwell time across all scans with in OBSS scan interval should be
29912      * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
29913      * for active scans and ,
29914      *   The unit for these 2 parameters is TUs.
29915      */
29916     A_UINT32 obss_scan_passive_total_per_channel;
29917     A_UINT32 obss_scan_active_total_per_channel;
29918     A_UINT32 bss_width_channel_transition_delay_factor; /** parameter to check exemption from scan */
29919     A_UINT32 obss_scan_activity_threshold; /** parameter to check exemption from scan */
29920     /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
29921     A_UINT32 forty_mhz_intolerant; /** STA 40M bandwidth intolerant capability */
29922     A_UINT32 current_operating_class; /** STA current operating class */
29923     /** length of 2.4GHz channel list to scan at, channel number list in tlv->channels[] */
29924     A_UINT32 channel_len;
29925     /** length of optional ie data to append to probe request when active scan, ie data in tlv->ie_field[] */
29926     A_UINT32 ie_len;
29927 
29928 /**
29929  * TLV (tag length value) parameters following the fixed param structure
29930  *     A_UINT8 channels[channel_len]; // channel numbers
29931  *     A_UINT8 ie_field[ie_len];
29932  *     A_UINT32 chan_freqs[channel_len] // in MHz
29933  */
29934 } wmi_obss_scan_enable_cmd_fixed_param;
29935 
29936 typedef struct {
29937     /**
29938     * TLV tag and len;
29939     * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
29940     */
29941     A_UINT32 tlv_header;
29942     A_UINT32 vdev_id;
29943 } wmi_obss_scan_disable_cmd_fixed_param;
29944 
29945 typedef struct {
29946     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
29947     A_UINT32 tlv_header;
29948     /** unique id identifying the VDEV */
29949     A_UINT32 vdev_id;
29950     /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
29951     A_UINT32 tx_status;
29952 } wmi_offload_prb_rsp_tx_status_event_fixed_param;
29953 
29954 typedef enum {
29955     WMI_FRAME_TX_OK,            /* frame tx ok */
29956     WMI_FRAME_TX_XRETRY,        /* excessivley retried */
29957     WMI_FRAME_TX_DROP,          /* frame dropped by FW due to resources */
29958     WMI_FRAME_TX_FILTERED,      /* frame filtered by hardware */
29959 } WMI_FRAME_TX_STATUS;
29960 
29961 /**
29962  * This command is sent from WLAN host driver to firmware to
29963  * request firmware to send the latest channel avoidance range
29964  * to host.
29965  *
29966  * This command is only applicable for APQ platform which has
29967  * modem on the platform. If firmware doesn't support MWS Coex,
29968  * this command can be dropped by firmware.
29969  *
29970  * Host would send this command to firmware to request a channel
29971  * avoidance information update.
29972  */
29973 typedef struct {
29974     /** TLV tag and len; tag equals
29975      *  WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
29976     A_UINT32 tlv_header;
29977 } wmi_chan_avoid_update_cmd_param;
29978 
29979 /* ExtScan operation mode */
29980 typedef enum {
29981    WMI_EXTSCAN_MODE_NONE          = 0x0000,
29982    WMI_EXTSCAN_MODE_START         = 0x0001, /* ExtScan/TableMonitoring operation started */
29983    WMI_EXTSCAN_MODE_STOP          = 0x0002, /* ExtScan/TableMonitoring operation stopped */
29984    WMI_EXTSCAN_MODE_IGNORED       = 0x0003, /* ExtScan command ignored due to error */
29985 } wmi_extscan_operation_mode;
29986 
29987 /* Channel Mask */
29988 typedef enum {
29989    WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
29990    WMI_CHANNEL_BAND_24          = 0x0001, /* 2.4 channel */
29991    WMI_CHANNEL_BAND_5_NON_DFS   = 0x0002, /* 5G Channels (No DFS channels) */
29992    WMI_CHANNEL_BAND_DFS         = 0x0004, /* DFS channels */
29993 } wmi_channel_band_mask;
29994 
29995 typedef enum {
29996     WMI_EXTSCAN_CYCLE_STARTED_EVENT     = 0x0001,
29997     WMI_EXTSCAN_CYCLE_COMPLETED_EVENT   = 0x0002,
29998     WMI_EXTSCAN_BUCKET_STARTED_EVENT    = 0x0004,
29999     WMI_EXTSCAN_BUCKET_COMPLETED_EVENT  = 0x0008,
30000     WMI_EXTSCAN_BUCKET_FAILED_EVENT     = 0x0010,
30001     WMI_EXTSCAN_BUCKET_OVERRUN_EVENT    = 0x0020,
30002     WMI_EXTSCAN_THRESHOLD_NUM_SCANS     = 0x0040,
30003     WMI_EXTSCAN_THRESHOLD_PERCENT       = 0x0080,
30004 
30005     WMI_EXTSCAN_EVENT_MAX               = 0x8000
30006 } wmi_extscan_event_type;
30007 
30008 #define WMI_EXTSCAN_CYCLE_EVENTS_MASK    (WMI_EXTSCAN_CYCLE_STARTED_EVENT   | \
30009                                           WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
30010 
30011 #define WMI_EXTSCAN_BUCKET_EVENTS_MASK   (WMI_EXTSCAN_BUCKET_STARTED_EVENT   | \
30012                                           WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
30013                                           WMI_EXTSCAN_BUCKET_FAILED_EVENT    | \
30014                                           WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
30015 
30016 typedef enum {
30017     WMI_EXTSCAN_NO_FORWARDING         = 0x0000,
30018     WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
30019 } wmi_extscan_forwarding_flags;
30020 
30021 typedef enum {
30022     WMI_EXTSCAN_USE_MSD                 = 0x0001,    /* Use Motion Sensor Detection */
30023     WMI_EXTSCAN_EXTENDED_BATCHING_EN    = 0x0002,    /* Extscan LPASS extended batching feature is supported and enabled */
30024 } wmi_extscan_configuration_flags;
30025 
30026 typedef enum {
30027     WMI_EXTSCAN_BUCKET_CACHE_RESULTS     = 0x0001,   /* Cache the results of bucket whose configuration flags has this bit set */
30028     WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002,   /* Report ext scan results to context hub or not. */
30029 } wmi_extscan_bucket_configuration_flags;
30030 
30031 typedef enum {
30032     WMI_EXTSCAN_STATUS_OK    = 0,
30033     WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
30034     WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
30035     WMI_EXTSCAN_STATUS_INTERNAL_ERROR
30036 } wmi_extscan_start_stop_status;
30037 
30038 typedef struct {
30039     /** Request ID - to identify command. Cannot be 0 */
30040     A_UINT32     request_id;
30041     /** Requestor ID - client requesting ExtScan */
30042     A_UINT32     requestor_id;
30043     /** VDEV id(interface) that is requesting scan */
30044     A_UINT32     vdev_id;
30045 } wmi_extscan_command_id;
30046 
30047 typedef struct {
30048     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
30049     /** channel in MHz */
30050     A_UINT32    channel;
30051 
30052     /** dwell time in msec - use defaults if 0 */
30053     A_UINT32    min_dwell_time;
30054     A_UINT32    max_dwell_time;
30055 
30056     /** passive/active channel and other flags */
30057     A_UINT32    control_flags;                        /* 0 => active, 1 => passive scan; ignored for DFS */
30058 } wmi_extscan_bucket_channel;
30059 
30060 /* Scan Bucket specification */
30061 typedef struct {
30062     A_UINT32        tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
30063     /** Bucket ID  - 0-based */
30064     A_UINT32        bucket_id;
30065     /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
30066     A_UINT32        notify_extscan_events;
30067     /** Options to forward scan results - see wmi_extscan_forwarding_flags */
30068     A_UINT32        forwarding_flags;
30069     /** ExtScan configuration flags - wmi_extscan_bucket_configuration_flags */
30070     A_UINT32        configuration_flags;
30071     /** DEPRECATED member: multiplier to be applied to the periodic scan's base period */
30072     A_UINT32        base_period_multiplier;
30073     /** dwell time in msec on active channels - use defaults if 0 */
30074     A_UINT32        min_dwell_time_active;
30075     A_UINT32        max_dwell_time_active;
30076     /** dwell time in msec on passive channels - use defaults if 0 */
30077     A_UINT32        min_dwell_time_passive;
30078     A_UINT32        max_dwell_time_passive;
30079     /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
30080     A_UINT32        channel_band;
30081     /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
30082     A_UINT32        num_channels;
30083     /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
30084     A_UINT32        min_period;
30085     /** period above which exponent is not applied anymore */
30086     A_UINT32        max_period;
30087     /** back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
30088       * new_bucket_period = last_bucket_period + last_exponent_period * exp_backoff
30089       */
30090     A_UINT32        exp_backoff;
30091     /** number of scans performed at a given periodicity after which exponential back off value is
30092        * applied to current periodicity to obtain a newer one
30093        */
30094     A_UINT32        exp_max_step_count;
30095 /** Followed by the variable length TLV chan_list:
30096  *  wmi_extscan_bucket_channel chan_list[] */
30097 } wmi_extscan_bucket;
30098 
30099 typedef struct {
30100     A_UINT32     tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
30101     /** Request ID - to identify command. Cannot be 0 */
30102     A_UINT32     request_id;
30103     /** Requestor ID - client requesting ExtScan */
30104     A_UINT32     requestor_id;
30105     /** VDEV id(interface) that is requesting scan */
30106     A_UINT32     vdev_id;
30107     /** table ID - to allow support for multiple simultaneous requests */
30108     A_UINT32     table_id;
30109     /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
30110     A_UINT32     base_period;
30111     /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
30112     A_UINT32     max_iterations;
30113     /** Options to forward scan results - see wmi_extscan_forwarding_flags */
30114     A_UINT32     forwarding_flags;
30115     /** ExtScan configuration flags - wmi_extscan_configuration_flags */
30116     A_UINT32     configuration_flags;
30117     /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
30118     A_UINT32     notify_extscan_events;
30119     /** Scan Priority, input to scan scheduler */
30120     A_UINT32     scan_priority;
30121     /** Maximum number of BSSIDs to cache on each scan cycle */
30122     A_UINT32     max_bssids_per_scan_cycle;
30123     /** Minimum RSSI value to report */
30124     A_UINT32     min_rssi;
30125     /** Maximum table usage in percentage */
30126     A_UINT32     max_table_usage;
30127     /** default dwell time in msec on active channels */
30128     A_UINT32     min_dwell_time_active;
30129     A_UINT32     max_dwell_time_active;
30130     /** default dwell time in msec on passive channels */
30131     A_UINT32     min_dwell_time_passive;
30132     A_UINT32     max_dwell_time_passive;
30133     /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
30134     A_UINT32     min_rest_time;
30135     /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
30136     /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
30137      *  will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
30138      *  switch to off channel. if there is activity the scanner will let the radio on the bss channel
30139      *  until max_rest_time expires.at max_rest_time scanner will switch to off channel
30140      *  irrespective of activity. activity is determined by the idle_time parameter.
30141      */
30142     A_UINT32     max_rest_time;
30143     /** time before sending next set of probe requests.
30144      *   The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
30145      *   The number of probe requests specified depends on the ssid_list and bssid_list
30146      */
30147     /** Max number of probes to be sent */
30148     A_UINT32     n_probes;
30149     /** time in msec between 2 sets of probe requests. */
30150     A_UINT32     repeat_probe_time;
30151     /** time in msec between 2 consecutive probe requests with in a set. */
30152     A_UINT32     probe_spacing_time;
30153     /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity  */
30154     A_UINT32     idle_time;
30155     /** maximum time in msec allowed for scan  */
30156     A_UINT32     max_scan_time;
30157     /** delay in msec before sending first probe request after switching to a channel */
30158     A_UINT32     probe_delay;
30159     /** Scan control flags */
30160     A_UINT32     scan_ctrl_flags;
30161     /** Burst duration time in msec*/
30162     A_UINT32     burst_duration;
30163 
30164     /** number of bssids in the TLV bssid_list[] */
30165     A_UINT32     num_bssid;
30166     /** number of ssid in the TLV ssid_list[] */
30167     A_UINT32     num_ssids;
30168     /** number of bytes in TLV ie_data[] */
30169     A_UINT32     ie_len;
30170     /** number of buckets in the TLV bucket_list[] */
30171     A_UINT32     num_buckets;
30172     /** in number of scans, send notifications to host after these many scans */
30173     A_UINT32    report_threshold_num_scans;
30174     /** number of channels in channel_list[] determined by the
30175         sum of wmi_extscan_bucket.num_channels in array  */
30176 
30177 /**
30178  * TLV (tag length value) parameters follow the extscan_cmd
30179  * structure. The TLV's are:
30180  *     wmi_ssid                   ssid_list[];
30181  *     wmi_mac_addr               bssid_list[];
30182  *     A_UINT8                    ie_data[];
30183  *     wmi_extscan_bucket         bucket_list[];
30184  *     wmi_extscan_bucket_channel channel_list[];
30185  */
30186 } wmi_extscan_start_cmd_fixed_param;
30187 
30188 typedef struct {
30189     A_UINT32     tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
30190     /** Request ID - to match running command. 0 matches any request */
30191     A_UINT32     request_id;
30192     /** Requestor ID - client requesting stop */
30193     A_UINT32     requestor_id;
30194     /** VDEV id(interface) that is requesting scan */
30195     A_UINT32     vdev_id;
30196     /** table ID - to allow support for multiple simultaneous requests */
30197     A_UINT32     table_id;
30198 } wmi_extscan_stop_cmd_fixed_param;
30199 
30200 enum wmi_extscan_get_cached_results_flags {
30201     WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE        = 0x0000,
30202     WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
30203 };
30204 
30205 typedef struct {
30206     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
30207     /** request ID - used to correlate command with events */
30208     A_UINT32    request_id;
30209     /** Requestor ID - client that requested results */
30210     A_UINT32    requestor_id;
30211     /** VDEV id(interface) that is requesting scan */
30212     A_UINT32    vdev_id;
30213     /** table ID - to allow support for multiple simultaneous requests */
30214     A_UINT32    table_id;
30215     /** maximum number of results to be returned  */
30216     A_UINT32    max_results;
30217     /** flush BSSID list - wmi_extscan_get_cached_results_flags */
30218     A_UINT32    control_flags; /* enum wmi_extscan_get_cached_results_flags */
30219 } wmi_extscan_get_cached_results_cmd_fixed_param;
30220 
30221 typedef struct {
30222     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
30223     /** request ID - used to correlate command with events */
30224     A_UINT32    request_id;
30225     /** Requestor ID - client that requested results */
30226     A_UINT32    requestor_id;
30227     /** VDEV id(interface) that is requesting scan */
30228     A_UINT32    vdev_id;
30229     /** table ID - to allow support for multiple simultaneous requests */
30230     A_UINT32    table_id;
30231 } wmi_extscan_get_wlan_change_results_cmd_fixed_param;
30232 
30233 typedef struct {
30234     A_UINT32        tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
30235     /** bssid */
30236     wmi_mac_addr    bssid;
30237     /** channel in MHz */
30238     A_UINT32        channel;
30239     /** upper RSSI limit */
30240     A_UINT32        upper_rssi_limit;
30241     /** lower RSSI limit */
30242     A_UINT32        lower_rssi_limit;
30243 } wmi_extscan_wlan_change_bssid_param;
30244 
30245 typedef struct {
30246     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
30247     /** Request ID - to identify command. Cannot be 0 */
30248     A_UINT32    request_id;
30249     /** Requestor ID - client requesting wlan change monitoring */
30250     A_UINT32    requestor_id;
30251     /** VDEV id(interface) that is requesting scan */
30252     A_UINT32    vdev_id;
30253     /** table ID - to allow support for multiple simultaneous tables */
30254     A_UINT32    table_id;
30255     /** operation mode: start/stop */
30256     A_UINT32    mode; /* wmi_extscan_operation_mode */
30257     /** number of RSSI samples to store */
30258     A_UINT32    max_rssi_samples;
30259     /** number of samples to use to calculate RSSI average */
30260     A_UINT32    rssi_averaging_samples;
30261     /** number of scans to confirm loss of contact with RSSI */
30262     A_UINT32    lost_ap_scan_count;
30263     /** number of out-of-range BSSIDs necessary to send event */
30264     A_UINT32    max_out_of_range_count;
30265 
30266     /** total number of bssid signal descriptors (in all pages) */
30267     A_UINT32    total_entries;
30268     /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
30269     A_UINT32    first_entry_index;
30270     /** number of bssid signal descriptors in this page */
30271     A_UINT32    num_entries_in_page;
30272 /* Following this structure is the TLV:
30273  *     wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[];
30274  *         (number of elements given by field num_page_entries)
30275  */
30276 } wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
30277 
30278 typedef struct {
30279     A_UINT32        tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
30280     /** bssid */
30281     wmi_mac_addr    bssid;
30282     /** RSSI min threshold for reporting */
30283     A_UINT32        min_rssi;
30284     /** Deprecated entry - channel in MHz */
30285     A_UINT32        channel;
30286     /** RSSI max threshold for reporting */
30287     A_UINT32        max_rssi;
30288 } wmi_extscan_hotlist_entry;
30289 
30290 typedef struct {
30291     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
30292     /** Request ID - to identify command. Cannot be 0 */
30293     A_UINT32    request_id;
30294     /** Requestor ID - client requesting hotlist monitoring */
30295     A_UINT32    requestor_id;
30296     /** VDEV id(interface) that is requesting scan */
30297     A_UINT32    vdev_id;
30298     /** table ID - to allow support for multiple simultaneous tables */
30299     A_UINT32    table_id;
30300     /** operation mode: start/stop */
30301     A_UINT32    mode;    /* wmi_extscan_operation_mode */
30302     /** total number of bssids (in all pages) */
30303     A_UINT32    total_entries;
30304     /** index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry */
30305     A_UINT32    first_entry_index;
30306     /** number of bssids in this page */
30307     A_UINT32    num_entries_in_page;
30308     /** number of consecutive scans to confirm loss of contact with AP */
30309     A_UINT32    lost_ap_scan_count;
30310 /* Following this structure is the TLV:
30311  *     wmi_extscan_hotlist_entry hotlist[]; <-- number of elements given by field num_page_entries.
30312  */
30313 } wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
30314 
30315 typedef struct {
30316     A_UINT32        tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
30317     /**ssid */
30318     wmi_ssid        ssid;
30319     /**band */
30320     A_UINT32        band;
30321     /**RSSI threshold for reporting */
30322     A_UINT32        min_rssi;
30323     A_UINT32        max_rssi;
30324 } wmi_extscan_hotlist_ssid_entry;
30325 
30326 typedef struct {
30327     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param */
30328     /** Request ID - to identify command. Cannot be 0 */
30329     A_UINT32    request_id;
30330     /** Requestor ID - client requesting hotlist ssid monitoring */
30331     A_UINT32    requestor_id;
30332     /** VDEV id(interface) that is requesting scan */
30333     A_UINT32    vdev_id;
30334     /** table ID - to allow support for multiple simultaneous tables */
30335     A_UINT32    table_id;
30336     /** operation mode: start/stop */
30337     A_UINT32    mode; /* wmi_extscan_operation_mode */
30338     /**total number of ssids (in all pages) */
30339     A_UINT32    total_entries;
30340     /**index of the first ssid entry found in the TLV wmi_extscan_hotlist_ssid_entry*/
30341     A_UINT32    first_entry_index;
30342     /**number of ssids in this page */
30343     A_UINT32    num_entries_in_page;
30344     /** number of consecutive scans to confirm loss of an ssid **/
30345     A_UINT32    lost_ap_scan_count;
30346     /* Following this structure is the TLV:
30347      *     wmi_extscan_hotlist_ssid_entry hotlist_ssid[]; <-- number of elements given by field num_page_entries.
30348      */
30349 } wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
30350 
30351 typedef struct {
30352     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
30353     /** table ID - to allow support for multiple simultaneous tables */
30354     A_UINT32    table_id;
30355     /** size in bytes of scan cache entry */
30356     A_UINT32    scan_cache_entry_size;
30357     /** maximum number of scan cache entries */
30358     A_UINT32    max_scan_cache_entries;
30359     /** maximum number of buckets per extscan request */
30360     A_UINT32    max_buckets;
30361     /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
30362     A_UINT32    max_bssid_per_scan;
30363     /** table usage level at which indication must be sent to host */
30364     A_UINT32    max_table_usage_threshold;
30365 } wmi_extscan_cache_capabilities;
30366 
30367 typedef struct {
30368     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
30369     /** table ID - to allow support for multiple simultaneous tables */
30370     A_UINT32    table_id;
30371     /** size in bytes of wlan change entry */
30372     A_UINT32    wlan_change_entry_size;
30373     /** maximum number of entries in wlan change table */
30374     A_UINT32    max_wlan_change_entries;
30375     /** number of RSSI samples used for averaging RSSI */
30376     A_UINT32    max_rssi_averaging_samples;
30377     /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
30378     A_UINT32    max_rssi_history_entries;
30379 } wmi_extscan_wlan_change_monitor_capabilities;
30380 
30381 typedef struct {
30382     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
30383     /** table ID - to allow support for multiple simultaneous tables */
30384     A_UINT32    table_id;
30385     /** size in bytes of hotlist entry */
30386     A_UINT32    wlan_hotlist_entry_size;
30387     /** maximum number of entries in wlan change table */
30388     A_UINT32    max_hotlist_entries;
30389 } wmi_extscan_hotlist_monitor_capabilities;
30390 
30391 typedef struct {
30392     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
30393     /** Request ID - matches request ID used to start hot list monitoring */
30394     A_UINT32    request_id;
30395     /** Requestor ID - client requesting stop */
30396     A_UINT32    requestor_id;
30397     /** number of extscan caches */
30398     A_UINT32    num_extscan_cache_tables;
30399     /** number of wlan change lists */
30400     A_UINT32    num_wlan_change_monitor_tables;
30401     /** number of hotlists */
30402     A_UINT32    num_hotlist_monitor_tables;
30403     /** if one sided rtt data collection is supported */
30404     A_UINT32    rtt_one_sided_supported;
30405     /** if 11v data collection is supported */
30406     A_UINT32    rtt_11v_supported;
30407     /** if 11mc data collection is supported */
30408     A_UINT32    rtt_ftm_supported;
30409     /** number of extscan cache capabilities (one per table)  */
30410     A_UINT32    num_extscan_cache_capabilities;
30411     /** number of wlan change  capabilities (one per table)  */
30412     A_UINT32    num_extscan_wlan_change_capabilities;
30413     /** number of extscan hotlist capabilities (one per table)  */
30414     A_UINT32    num_extscan_hotlist_capabilities;
30415 /* Following this structure is the TLV:
30416  *     wmi_extscan_cache_capabilities               extscan_cache_capabilities; <-- number of capabilities given by num_extscan_caches
30417  *     wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities;   <-- number of capabilities given by num_wlan_change_monitor_tables
30418  *     wmi_extscan_hotlist_monitor_capabilities     hotlist_capabilities;       <-- number of capabilities given by num_hotlist_monitor_tables
30419  */
30420 } wmi_extscan_set_capabilities_cmd_fixed_param;
30421 
30422 typedef struct {
30423     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
30424     /** Request ID - matches request ID used to start hot list monitoring */
30425     A_UINT32    request_id;
30426     /** Requestor ID - client requesting capabilities */
30427     A_UINT32    requestor_id;
30428 } wmi_extscan_get_capabilities_cmd_fixed_param;
30429 
30430 typedef struct {
30431     A_UINT32     tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
30432     /** Request ID of the operation that was started/stopped */
30433     A_UINT32     request_id;
30434     /** Requestor ID of the operation that was started/stopped */
30435     A_UINT32     requestor_id;
30436     /** VDEV id(interface) of the operation that was started/stopped */
30437     A_UINT32     vdev_id;
30438     /** extscan WMI command */
30439     A_UINT32     command;
30440     /** operation mode: start/stop */
30441     A_UINT32     mode; /* wmi_extscan_operation_mode */
30442     /**success/failure */
30443     A_UINT32     status; /* enum wmi_extscan_start_stop_status */
30444     /** table ID - to allow support for multiple simultaneous requests */
30445     A_UINT32     table_id;
30446 } wmi_extscan_start_stop_event_fixed_param;
30447 
30448 typedef struct {
30449     A_UINT32     tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
30450     /** Request ID of the extscan operation that is currently running */
30451     A_UINT32     request_id;
30452     /** Requestor ID of the extscan operation that is currently running */
30453     A_UINT32     requestor_id;
30454     /** VDEV id(interface) of the extscan operation that is currently running */
30455     A_UINT32     vdev_id;
30456     /** scan event (wmi_scan_event_type) */
30457     A_UINT32     event; /* wmi_extscan_event_type */
30458     /** table ID - to allow support for multiple simultaneous requests */
30459     A_UINT32     table_id;
30460     /**number of buckets */
30461     A_UINT32     num_buckets;
30462     /* Following this structure is the TLV:
30463      *     A_UINT32    bucket_id[]; <-- number of elements given by field num_buckets.
30464      */
30465 } wmi_extscan_operation_event_fixed_param;
30466 
30467 /* Types of extscan tables */
30468 typedef enum {
30469     EXTSCAN_TABLE_NONE    = 0,
30470     EXTSCAN_TABLE_BSSID   = 1,
30471     EXTSCAN_TABLE_RSSI    = 2,
30472 } wmi_extscan_table_type;
30473 
30474 typedef struct {
30475     A_UINT32     tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
30476     /** Request ID of the extscan operation that is currently running */
30477     A_UINT32     request_id;
30478     /** Requestor ID of the extscan operation that is currently running */
30479     A_UINT32     requestor_id;
30480     /** VDEV id(interface) of the extscan operation that is currently running */
30481     A_UINT32     vdev_id;
30482     /** table ID - to allow support for multiple simultaneous tables */
30483     A_UINT32     table_id;
30484     /**see wmi_extscan_table_type for table reporting usage */
30485     A_UINT32     table_type;
30486     /**number of entries in use */
30487     A_UINT32     entries_in_use;
30488     /**maximum number of entries in table */
30489     A_UINT32     maximum_entries;
30490 } wmi_extscan_table_usage_event_fixed_param;
30491 
30492 typedef enum {
30493     WMI_SCAN_STATUS_INTERRUPTED = 1      /* Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
30494                                             this can be used to discard scan results */
30495 } wmi_scan_status_flags;
30496 
30497 typedef struct {
30498     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
30499     /** RSSI */
30500     A_UINT32    rssi;
30501     /** time stamp in milliseconds */
30502     A_UINT32    tstamp;
30503     /** Extscan cycle during which this entry was scanned */
30504     A_UINT32    scan_cycle_id;
30505     /** flag to indicate if the given result was obtained as part of interrupted (aborted/large time gap preempted) scan */
30506     A_UINT32    flags;
30507     /** Bitmask of buckets (i.e. sets of channels) scanned */
30508     A_UINT32    buckets_scanned;
30509 } wmi_extscan_rssi_info;
30510 
30511 typedef struct {
30512     A_UINT32        tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
30513     /** bssid */
30514     wmi_mac_addr    bssid;
30515     /** ssid */
30516     wmi_ssid        ssid;
30517     /** channel in MHz */
30518     A_UINT32        channel;
30519     /** capabilities */
30520     A_UINT32        capabilities;
30521     /** beacon interval in TUs */
30522     A_UINT32        beacon_interval;
30523     /** time stamp in milliseconds - time last seen */
30524     A_UINT32        tstamp;
30525     /** flags - _tExtScanEntryFlags */
30526     A_UINT32        flags;
30527     /** RTT in ns */
30528     A_UINT32        rtt;
30529     /** RTT standard deviation */
30530     A_UINT32        rtt_sd;
30531     /** RSSI information */
30532     A_UINT32        number_rssi_samples;
30533     /** IE length */
30534     A_UINT32        ie_length; /* length of IE data */
30535 } wmi_extscan_wlan_descriptor;
30536 
30537 typedef struct {
30538     A_UINT32     tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
30539     /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
30540     A_UINT32     request_id;
30541     /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
30542     A_UINT32     requestor_id;
30543     /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
30544     A_UINT32     vdev_id;
30545     /** Request ID of the extscan operation that is currently running */
30546     A_UINT32     extscan_request_id;
30547     /** Requestor ID of the extscan operation that is currently running */
30548     A_UINT32     extscan_requestor_id;
30549     /** VDEV id(interface) of the extscan operation that is currently running */
30550     A_UINT32     extscan_vdev_id;
30551     /** table ID - to allow support for multiple simultaneous tables */
30552     A_UINT32     table_id;
30553     /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
30554     A_UINT32     current_tstamp;
30555     /**total number of bssids (in all pages) */
30556     A_UINT32     total_entries;
30557     /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
30558     A_UINT32     first_entry_index;
30559     /**number of bssids in this page */
30560     A_UINT32     num_entries_in_page;
30561     /** number of buckets scanned**/
30562     A_UINT32     buckets_scanned;
30563     /* Followed by the variable length TLVs
30564      *     wmi_extscan_wlan_descriptor    bssid_list[]
30565      *     wmi_extscan_rssi_info          rssi_list[]
30566      *     A_UINT8                        ie_list[]
30567      */
30568 } wmi_extscan_cached_results_event_fixed_param;
30569 
30570 typedef enum {
30571     EXTSCAN_WLAN_CHANGE_FLAG_NONE         = 0x00,
30572     EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
30573     EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST      = 0x02,
30574 } wmi_extscan_wlan_change_flags;
30575 
30576 typedef struct {
30577     A_UINT32        tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
30578     /** bssid */
30579     wmi_mac_addr    bssid;
30580     /** time stamp in milliseconds */
30581     A_UINT32        tstamp;
30582     /** upper RSSI limit */
30583     A_UINT32        upper_rssi_limit;
30584     /** lower RSSI limit */
30585     A_UINT32        lower_rssi_limit;
30586     /** channel */
30587     A_UINT32        channel;    /* in MHz */
30588     /** current RSSI average */
30589     A_UINT32        rssi_average;
30590     /** flags - wmi_extscan_wlan_change_flags */
30591     A_UINT32        flags;
30592     /** length of RSSI history to follow (number of values) */
30593     A_UINT32        num_rssi_samples;
30594 } wmi_extscan_wlan_change_result_bssid;
30595 
30596 typedef struct {
30597     A_UINT32     tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
30598     /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
30599     A_UINT32     request_id;
30600     /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
30601     A_UINT32     requestor_id;
30602     /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
30603     A_UINT32     vdev_id;
30604     /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
30605     A_UINT32     config_request_id;
30606     /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
30607     A_UINT32     config_requestor_id;
30608     /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
30609     A_UINT32     config_vdev_id;
30610     /** table ID - to allow support for multiple simultaneous tables */
30611     A_UINT32     table_id;
30612     /**number of entries with RSSI out of range or BSSID not detected */
30613     A_UINT32     change_count;
30614     /**total number of bssid signal descriptors (in all pages) */
30615     A_UINT32     total_entries;
30616     /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
30617     A_UINT32     first_entry_index;
30618     /**number of bssids signal descriptors in this page */
30619     A_UINT32     num_entries_in_page;
30620 /* Following this structure is the TLV:
30621  *     wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[];
30622  *         (number of descriptors given by field num_entries_in_page)
30623  * Following this structure is the list of RSSI values (each is an A_UINT8):
30624  *     A_UINT8 rssi_list[]; <-- last N RSSI values.
30625  */
30626 } wmi_extscan_wlan_change_results_event_fixed_param;
30627 
30628 enum _tExtScanEntryFlags
30629 {
30630     WMI_HOTLIST_FLAG_NONE           = 0x00,
30631     WMI_HOTLIST_FLAG_PRESENCE       = 0x01,
30632     WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
30633 };
30634 
30635 typedef struct {
30636     A_UINT32     tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
30637     /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
30638     A_UINT32     config_request_id;
30639     /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
30640     A_UINT32     config_requestor_id;
30641     /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
30642     A_UINT32     config_vdev_id;
30643     /** table ID - to allow support for multiple simultaneous tables */
30644     A_UINT32     table_id;
30645     /**total number of bssids (in all pages) */
30646     A_UINT32     total_entries;
30647     /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
30648     A_UINT32     first_entry_index;
30649     /**number of bssids in this page */
30650     A_UINT32     num_entries_in_page;
30651 /* Following this structure is the TLV:
30652  *     wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
30653  */
30654 } wmi_extscan_hotlist_match_event_fixed_param;
30655 
30656 typedef struct {
30657     A_UINT32     tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
30658     /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
30659     A_UINT32     config_request_id;
30660     /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
30661     A_UINT32     config_requestor_id;
30662     /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
30663     A_UINT32     config_vdev_id;
30664     /** table ID - to allow support for multiple simultaneous tables */
30665     A_UINT32     table_id;
30666     /**total number of ssids (in all pages) */
30667     A_UINT32     total_entries;
30668     /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
30669     A_UINT32     first_entry_index;
30670     /**number of ssids in this page */
30671     A_UINT32     num_entries_in_page;
30672 /* Following this structure is the TLV:
30673  *     wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
30674  */
30675 } wmi_extscan_hotlist_ssid_match_event_fixed_param;
30676 
30677 typedef struct {
30678     A_UINT32     tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
30679     /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
30680     A_UINT32     request_id;
30681     /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
30682     A_UINT32     requestor_id;
30683     /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
30684     A_UINT32     vdev_id;
30685     /** number of extscan caches */
30686     A_UINT32     num_extscan_cache_tables;
30687     /** number of wlan change lists */
30688     A_UINT32     num_wlan_change_monitor_tables;
30689     /** number of hotlists */
30690     A_UINT32     num_hotlist_monitor_tables;
30691     /** if one sided rtt data collection is supported */
30692     A_UINT32     rtt_one_sided_supported;
30693     /** if 11v data collection is supported */
30694     A_UINT32     rtt_11v_supported;
30695     /** if 11mc data collection is supported */
30696     A_UINT32     rtt_ftm_supported;
30697     /** number of extscan cache capabilities (one per table)  */
30698     A_UINT32     num_extscan_cache_capabilities;
30699     /** number of wlan change  capabilities (one per table)  */
30700     A_UINT32     num_extscan_wlan_change_capabilities;
30701     /** number of extscan hotlist capabilities (one per table)  */
30702     A_UINT32     num_extscan_hotlist_capabilities;
30703     /* max number of roaming ssid whitelist firmware can support */
30704     A_UINT32 num_roam_ssid_whitelist;
30705     /* max number of blacklist bssid firmware can support */
30706     A_UINT32 num_roam_bssid_blacklist;
30707     /* max number of preferred list firmware can support */
30708     A_UINT32 num_roam_bssid_preferred_list;
30709     /* max number of hotlist ssids firmware can support */
30710     A_UINT32 num_extscan_hotlist_ssid;
30711     /* max number of epno networks firmware can support */
30712     A_UINT32 num_epno_networks;
30713 
30714 /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
30715  * supports multiple lists of each type.
30716  *
30717  *     wmi_extscan_cache_capabilities               extscan_cache_capabilities[] <-- capabilities of extscan cache (BSSID/RSSI lists)
30718  *     wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[]   <-- capabilities of wlan_change_monitor_tables
30719  *     wmi_extscan_hotlist_monitor_capabilities     hotlist_capabilities[]       <-- capabilities of hotlist_monitor_tables
30720  */
30721 } wmi_extscan_capabilities_event_fixed_param;
30722 
30723 /* WMI_D0_WOW_DISABLE_ACK_EVENTID  */
30724 typedef struct {
30725     A_UINT32    tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param  */
30726     A_UINT32    reserved0; /* for future need */
30727 } wmi_d0_wow_disable_ack_event_fixed_param;
30728 
30729 /** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
30730 typedef struct {
30731     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param  */
30732     /** pdev_id for identifying the MAC
30733      * See macros starting with WMI_PDEV_ID_ for values.
30734      */
30735     A_UINT32 pdev_id;
30736 } wmi_pdev_resume_event_fixed_param;
30737 
30738 
30739 
30740 /** value representing all modules */
30741 #define WMI_DEBUG_LOG_MODULE_ALL 0xffff
30742 
30743 /* param definitions */
30744 
30745 /**
30746   * Log level for a given module. Value contains both module id and log level.
30747   * here is the bitmap definition for value.
30748   * module Id   : 16
30749   *     Flags   :  reserved
30750   *     Level   :  8
30751   * if odule Id  is WMI_DEBUG_LOG_MODULE_ALL then  log level is  applied to all modules (global).
30752   * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
30753   */
30754 #define WMI_DEBUG_LOG_PARAM_LOG_LEVEL      0x1
30755 
30756 #define WMI_DBGLOG_SET_LOG_LEVEL(val,lvl) do { \
30757         (val) |=  (lvl & 0xff);                \
30758      } while (0)
30759 
30760 #define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
30761 
30762 #define WMI_DBGLOG_SET_MODULE_ID(val,mid) do { \
30763         (val) |=  ((mid & 0xffff) << 16);        \
30764      } while (0)
30765 
30766 #define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
30767 
30768 /**
30769   * Enable the debug log for a given vdev. Value is vdev id
30770   */
30771 #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE    0x2
30772 
30773 
30774 /**
30775   * Disable the debug log for a given vdev. Value is vdev id
30776   * All the log level  for a given VDEV is disabled except the ERROR log messages
30777   */
30778 
30779 #define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE   0x3
30780 
30781 /**
30782   * set vdev enable bitmap. value is the vden enable bitmap
30783   */
30784 #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP    0x4
30785 
30786 /**
30787   * set a given log level to all the modules specified in the module bitmap.
30788   * and set the log level for all other modules to DBGLOG_ERR.
30789   *  value: log levelt to be set.
30790   *  module_id_bitmap : identifies the modules for which the log level should be set and
30791   *                      modules for which the log level should be reset to DBGLOG_ERR.
30792   */
30793 #define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP    0x5
30794 
30795 /**
30796  *  Wow mode specific logging enablement
30797  *  Wow mode module_id_bitmap : identifies the modules for which the log level
30798  *                  should be set in WOW and modules for which the log level
30799  *                  should be reset to DBGLOG_MAX_LVL.
30800  */
30801 #define WMI_DEBUG_LOG_PARAM_WOW_MOD_ENABLE_BITMAP 0x6
30802 
30803 #define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
30804 
30805 #define WMI_MODULE_ENABLE(pmid_bitmap,mod_id) \
30806     ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
30807          (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
30808 
30809 #define WMI_MODULE_DISABLE(pmid_bitmap,mod_id)     \
30810     ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &=  \
30811       (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
30812 
30813 #define WMI_MODULE_IS_ENABLED(pmid_bitmap,mod_id) \
30814     (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &  \
30815        (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
30816 
30817 #define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
30818 typedef struct {
30819         A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
30820         A_UINT32 dbg_log_param; /** param types are defined above */
30821         A_UINT32 value;
30822         /* The below array will follow this tlv ->fixed length module_id_bitmap[]
30823         A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
30824      */
30825 } wmi_debug_log_config_cmd_fixed_param;
30826 
30827 typedef struct {
30828     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param  */
30829     A_UINT32 param;     /* Reserved for future use */
30830     /** pdev_id for identifying the MAC
30831      * See macros starting with WMI_PDEV_ID_ for values.
30832      */
30833     A_UINT32 pdev_id;
30834 } wmi_pdev_get_temperature_cmd_fixed_param;
30835 
30836 typedef struct {
30837     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
30838     A_INT32  value;     /* temperature value in Celcius degree */
30839     /** pdev_id for identifying the MAC
30840      * See macros starting with WMI_PDEV_ID_ for values.
30841      */
30842     A_UINT32 pdev_id;
30843 } wmi_pdev_temperature_event_fixed_param;
30844 
30845 typedef enum {
30846     ANTDIV_HW_CFG_STATUS,
30847     ANTDIV_SW_CFG_STATUS,
30848     ANTDIV_MAX_STATUS_TYPE_NUM
30849 } ANTDIV_STATUS_TYPE;
30850 
30851 typedef struct {
30852     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_antdiv_status_cmd_fixed_param  */
30853     A_UINT32 status_event_id; /* Status event ID - see ANTDIV_STATUS_TYPE */
30854     /** pdev_id for identifying the MAC
30855      * See macros starting with WMI_PDEV_ID_ for values.
30856      */
30857     A_UINT32 pdev_id;
30858 } wmi_pdev_get_antdiv_status_cmd_fixed_param;
30859 
30860 typedef struct {
30861     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_antdiv_status_event_fixed_param */
30862     A_UINT32 support;   /* ANT DIV feature enabled or not */
30863     A_UINT32 chain_num; /* how many chain supported */
30864     A_UINT32 ant_num;   /* how many ANT supported, 32 max */
30865     /*
30866      * Each entry is for a tx/rx chain, and contains a bitmap identifying
30867      * the antennas attached to that tx/rx chain.
30868      */
30869     A_UINT32 selectable_ant_mask[8];
30870     /** pdev_id for identifying the MAC
30871      * See macros starting with WMI_PDEV_ID_ for values.
30872      */
30873     A_UINT32 pdev_id;
30874 } wmi_pdev_antdiv_status_event_fixed_param;
30875 
30876 typedef struct {
30877     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
30878     A_UINT32 vdev_id;
30879     A_UINT32 enable;
30880     A_UINT32 srv_ipv4; /* server IP */
30881     A_UINT32 start_lsb; /* starting address assigned to client */
30882     A_UINT32 num_client; /* number of clients we support */
30883 } wmi_set_dhcp_server_offload_cmd_fixed_param;
30884 
30885 typedef enum {
30886     AP_RX_DATA_OFFLOAD             = 0x00,
30887     STA_RX_DATA_OFFLOAD            = 0x01,
30888 } wmi_ipa_offload_types;
30889 
30890 /**
30891  * This command is sent from WLAN host driver to firmware for
30892  * enabling/disabling IPA data-path offload features.
30893  *
30894  *
30895  * Enabling data path offload to IPA(based on host INI configuration), example:
30896  *    when STA interface comes up,
30897  *    host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
30898  *                  (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
30899  *
30900  * Disabling data path offload to IPA, example:
30901  *    host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
30902  *                  (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
30903  *
30904  *
30905  * This command is applicable only on the PCIE LL systems
30906  *
30907  */
30908 typedef struct {
30909     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
30910     A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
30911     A_UINT32 vdev_id;
30912     A_UINT32 enable; /* 1 == enable, 0 == disable */
30913 } wmi_ipa_offload_enable_disable_cmd_fixed_param;
30914 
30915 typedef enum {
30916     WMI_LED_FLASHING_PATTERN_NOT_CONNECTED    = 0,
30917     WMI_LED_FLASHING_PATTERN_CONNECTED   = 1,
30918     WMI_LED_FLASHING_PATTERN_RESERVED    = 2,
30919 } wmi_set_led_flashing_type;
30920 
30921 /**
30922 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.
30923 Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
30924 remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
30925 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
30926 pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval  alternates from Low to
30927 High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
30928 Zero is reached, it is skipped and moves on to the next interval.
30929 */
30930 typedef struct {
30931     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param  */
30932     A_UINT32    pattern_id; /* pattern identifier */
30933     A_UINT32    led_x0; /* led flashing parameter0 */
30934     A_UINT32    led_x1; /* led flashing parameter1 */
30935     A_UINT32    gpio_num; /* GPIO number */
30936 } wmi_set_led_flashing_cmd_fixed_param;
30937 
30938 /**
30939  * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
30940  * within small networks that do not include a local name server.
30941  * It utilizes essentially the same programming interfaces, packet formats and operating semantics
30942  * as the unicast DNS, and the advantage is zero configuration service while no need for central or
30943  * global server.
30944  * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
30945  * by type in a specified domain using standard DNS queries.
30946  * Here, we provide the ability to advertise the available services by responding to mDNS queries.
30947  */
30948 typedef struct {
30949     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
30950     A_UINT32 vdev_id;
30951     A_UINT32 enable;
30952 } wmi_mdns_offload_cmd_fixed_param;
30953 
30954 #define WMI_MAX_MDNS_FQDN_LEN         64
30955 #define WMI_MAX_MDNS_RESP_LEN         512
30956 #define WMI_MDNS_FQDN_TYPE_GENERAL    0
30957 #define WMI_MDNS_FQDN_TYPE_UNIQUE     1
30958 
30959 typedef struct {
30960     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
30961     A_UINT32 vdev_id;
30962     /** type of fqdn, general or unique */
30963     A_UINT32 type;
30964     /** length of fqdn */
30965     A_UINT32 fqdn_len;
30966     /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
30967      * A_UINT8  fqdn_data[]; <-- fully-qualified domain name to check if match with the received queries
30968      */
30969 } wmi_mdns_set_fqdn_cmd_fixed_param;
30970 
30971 typedef struct {
30972     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
30973     A_UINT32 vdev_id;
30974     /** Answer Resource Record count */
30975     A_UINT32 AR_count;
30976     /** length of response */
30977     A_UINT32 resp_len;
30978     /* Following this structure is the TLV byte stream of resp data of length resp_len
30979      * A_UINT8  resp_data[]; <-- responses consisits of Resource Records
30980      */
30981 } wmi_mdns_set_resp_cmd_fixed_param;
30982 
30983 typedef struct {
30984     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_staIP_cmd_fixed_param */
30985     A_UINT32 vdev_id;
30986     A_UINT32 staIP; /* IPv4 address for STA mode */
30987 } wmi_mdns_set_staIP_cmd_fixed_param;
30988 
30989 typedef struct {
30990     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
30991     A_UINT32 vdev_id;
30992 } wmi_mdns_get_stats_cmd_fixed_param;
30993 
30994 typedef struct {
30995     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
30996     A_UINT32 vdev_id;
30997     /** curTimestamp in milliseconds */
30998     A_UINT32 curTimestamp;
30999     /** last received Query in milliseconds */
31000     A_UINT32 lastQueryTimestamp;
31001     /** last sent Response in milliseconds */
31002     A_UINT32 lastResponseTimestamp;
31003     /** stats of received queries */
31004     A_UINT32 totalQueries;
31005     /** stats of macth queries */
31006     A_UINT32 totalMatches;
31007     /** stats of responses */
31008     A_UINT32 totalResponses;
31009     /** indicate the current status of mDNS offload */
31010     A_UINT32 status;
31011 } wmi_mdns_stats_event_fixed_param;
31012 
31013 /**
31014  * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
31015  * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
31016  * request and create/remove connection even host is suspended.
31017  * 3 major components are offloaded:
31018  *     1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
31019  *     2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
31020  *     3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
31021  * Current implementation only supports WPA2 CCMP.
31022  */
31023 
31024 typedef struct {
31025     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
31026     /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
31027     A_UINT32 vdev_id;
31028     /** enable/disable sap auth offload */
31029     A_UINT32 enable;
31030     /** sap ssid */
31031     wmi_ssid ap_ssid;
31032     /** authentication mode (defined above) */
31033     A_UINT32 rsn_authmode;
31034     /** unicast cipher set */
31035     A_UINT32 rsn_ucastcipherset;
31036     /** mcast/group cipher set */
31037     A_UINT32 rsn_mcastcipherset;
31038     /** mcast/group management frames cipher set */
31039     A_UINT32 rsn_mcastmgmtcipherset;
31040     /** sap channel */
31041     A_UINT32 channel;
31042     /** length of psk */
31043     A_UINT32 psk_len;
31044     /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
31045      * A_UINT8  psk[];
31046      */
31047 } wmi_sap_ofl_enable_cmd_fixed_param;
31048 
31049 typedef struct {
31050     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
31051     /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
31052     A_UINT32 vdev_id;
31053     /** aid (association id) of this station */
31054     A_UINT32 assoc_id;
31055     /** peer station's mac addr */
31056     wmi_mac_addr peer_macaddr;
31057     /** length of association request frame */
31058     A_UINT32 data_len;
31059     /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
31060      * A_UINT8 bufp[];
31061      */
31062 } wmi_sap_ofl_add_sta_event_fixed_param;
31063 
31064 typedef enum {
31065     SAP_OFL_DEL_STA_FLAG_NONE       = 0x00,
31066     SAP_OFL_DEL_STA_FLAG_RECONNECT  = 0x01,
31067 } wmi_sap_ofl_del_sta_flags;
31068 
31069 typedef struct {
31070     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
31071     /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
31072     A_UINT32 vdev_id;
31073     /** aid (association id) of this station */
31074     A_UINT32 assoc_id;
31075     /** peer station's mac addr */
31076     wmi_mac_addr peer_macaddr;
31077     /** disassociation reason */
31078     A_UINT32 reason;
31079     /** flags - wmi_sap_ofl_del_sta_flags */
31080     A_UINT32 flags;
31081 } wmi_sap_ofl_del_sta_event_fixed_param;
31082 
31083 typedef struct {
31084     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param */
31085     A_UINT32 vdev_id;
31086     /* Number of client failure connection attempt */
31087     A_UINT32 num_retry;
31088     /* Time in milliseconds to record the client's failure connection attempts */
31089     A_UINT32 retry_allow_time_ms;
31090     /* Time in milliseconds to drop the connection request if client is blacklisted */
31091     A_UINT32 blackout_time_ms;
31092 } wmi_sap_set_blacklist_param_cmd_fixed_param;
31093 
31094 typedef struct {
31095     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
31096     A_UINT32 data_len; /** length in byte of data[]. */
31097     /** This structure is used to send REQ binary blobs
31098      * from application/service to firmware where Host drv is pass through .
31099      * Following this structure is the TLV:
31100      *     A_UINT8 data[]; <-- length in byte given by field data_len.
31101      */
31102 } wmi_apfind_cmd_param;
31103 
31104 typedef enum apfind_event_type_e {
31105     APFIND_MATCH_EVENT = 0,
31106     APFIND_WAKEUP_EVENT,
31107 } APFIND_EVENT_TYPE;
31108 
31109 typedef struct {
31110     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
31111     A_UINT32 event_type; /** APFIND_EVENT_TYPE */
31112     A_UINT32 data_len; /** length in byte of data[]. */
31113     /** This structure is used to send event binary blobs
31114      * from firmware to application/service and Host drv.
31115      * Following this structure is the TLV:
31116      *     A_UINT8 data[]; <-- length in byte given by field data_len.
31117      */
31118 } wmi_apfind_event_hdr;
31119 
31120 /* SAP obss detection offload types */
31121 typedef enum {
31122     WMI_SAP_OBSS_DETECTION_MODE_DISABLED = 0, /* fw to disable the detection */
31123     WMI_SAP_OBSS_DETECTION_MODE_PRESENT_NOTIFY = 1, /* if the matching beacon is present, notify host immediately */
31124     WMI_SAP_OBSS_DETECTION_MODE_ABSENT_TIMEOUT_NOTIFY = 2,/* if the matching beacon is absent for the timeout period, notify host */
31125 } WMI_SAP_OBSS_DETECTION_MODE;
31126 
31127 typedef struct wmi_sap_obss_detection_cfg_cmd_s {
31128     A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_cfg_cmd_fixed_param */
31129     A_UINT32 vdev_id;
31130     A_UINT32 detect_period_ms;
31131 
31132     /* detect whether there is 11b ap/ibss */
31133     A_UINT32 b_ap_detect_mode;  /* refer WMI_SAP_OBSS_DETECTION_MODE */
31134 
31135     /* detect whether there is 11b sta connected with other APs */
31136     A_UINT32 b_sta_detect_mode;
31137 
31138     /* detect whether there is 11g AP */
31139     A_UINT32 g_ap_detect_mode;
31140 
31141     /* detect whether there is legacy 11a traffic */
31142     A_UINT32 a_detect_mode;
31143 
31144     /* detect whether there is ap which is ht legacy mode  */
31145     A_UINT32 ht_legacy_detect_mode;
31146 
31147     /* detect whether there is ap which is ht mixed mode : has 11b/11g sta */
31148     A_UINT32 ht_mixed_detect_mode;
31149 
31150     /* detect whether there is ap which has 20M only station */
31151     A_UINT32 ht_20mhz_detect_mode;
31152 
31153 } wmi_sap_obss_detection_cfg_cmd_fixed_param;
31154 
31155 typedef enum {
31156     WMI_SAP_OBSS_DETECTION_EVENT_REASON_NOT_SUPPORT = 0,
31157     WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY,
31158     WMI_SAP_OBSS_DETECTION_EVENT_REASON_ABSENT_TIMEOUT,
31159 } WMI_SAP_OBSS_DETECTION_EVENT_REASON;
31160 
31161 /* WMI_SAP_OBSS_DETECTION_MATCH_MASK is one or more of the following shift bits */
31162 #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_AP_S       0
31163 #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_STA_S      1
31164 #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11G_AP_S       2
31165 #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11A_S          3
31166 #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_LEGACY_S    4
31167 #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_MIXED_S     5
31168 #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_20MHZ_S     6
31169 
31170 typedef struct wmi_sap_obss_detection_info_evt_s {
31171     A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_info_evt_fixed_param */
31172     A_UINT32 vdev_id;
31173     A_UINT32 reason;   /* refer WMI_SAP_OBSS_DETECTION_EVENT_REASON */
31174     A_UINT32 matched_detection_masks;  /* bit(s) from WMI_SAP_OBSS_DETECTION_MATCH_MASK */
31175     wmi_mac_addr matched_bssid_addr;  /* valid when reason is WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY */
31176 } wmi_sap_obss_detection_info_evt_fixed_param;
31177 
31178 /** WMI command to enable STA FW handle bss color change notification from AP */
31179 typedef struct  {
31180     A_UINT32 tlv_header; /* tag equals WMITLV_TAG_STRUC_wmi_bss_color_change_enable_fixed_param */
31181     A_UINT32 vdev_id;
31182     A_UINT32 enable;
31183 } wmi_bss_color_change_enable_fixed_param;
31184 
31185 typedef enum  {
31186     WMI_BSS_COLOR_COLLISION_DISABLE = 0,
31187     WMI_BSS_COLOR_COLLISION_DETECTION,
31188     WMI_BSS_COLOR_FREE_SLOT_TIMER_EXPIRY,
31189     WMI_BSS_COLOR_FREE_SLOT_AVAILABLE,
31190 } WMI_BSS_COLOR_COLLISION_EVT_TYPE;
31191 
31192 /** Command to enable OBSS Color collision detection for both STA and AP mode */
31193 typedef struct  {
31194     A_UINT32 tlv_header;                /* tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_det_config_fixed_param */
31195     A_UINT32 vdev_id;
31196     A_UINT32 flags;                     /* proposed for future use cases */
31197     A_UINT32 evt_type;                  /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
31198     A_UINT32 current_bss_color;
31199     A_UINT32 detection_period_ms;       /* scan interval for both AP and STA mode */
31200     A_UINT32 scan_period_ms;            /* scan period for passive scan to detect collision */
31201     A_UINT32 free_slot_expiry_time_ms;  /* FW to notify host at timer expiry after which Host disables bss color */
31202 } wmi_obss_color_collision_det_config_fixed_param;
31203 
31204 /** WMI event to notify host on OBSS Color collision detection, free slot available for AP mode */
31205 typedef struct  {
31206     A_UINT32 tlv_header;                    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_evt_fixed_param */
31207     A_UINT32 vdev_id;
31208     A_UINT32 evt_type;                      /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
31209     A_UINT32 bss_color_bitmap_bit0to31;     /* Bit set indicating BSS color present */
31210     A_UINT32 bss_color_bitmap_bit32to63;    /* Bit set indicating BSS color present */
31211 } wmi_obss_color_collision_evt_fixed_param;
31212 
31213 /*
31214  * WMI event to notify host if latency_flags/latency_level got changed
31215  * or if latency got enabled/disabled.
31216  * When latency disable is received in the beacon vendor IE and wlm
31217  * parameters are restored, latency_enable will be zero.
31218  * latency level and latency flags will be those of wlm params.
31219  * Lay out of latency flags is as follows. The field is same as flags
31220  * in wmi_wlm_config_cmd_fixed_param.
31221  *
31222  * |31 19|  18 | 17|16 14| 13 | 12| 11 | 10 |  9  |  8 |7  6|5  4|3  2| 1 | 0 |
31223  * +-----+-----+---+-----+----+---+----+----+-----+----+----+----+----+---+---+
31224  * | RSVD|SRATE|RTS| NSS |EDCA|TRY|SSLP|CSLP|DBMPS|RSVD|Roam|RSVD|DWLT|DFS|SUP|
31225  * +------------------------------+---------------+---------+-----------------+
31226  * |              WAL             |    PS         |  Roam   |     Scan        |
31227  */
31228 typedef struct  {
31229     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_latency_fixed_param */
31230     A_UINT32 vdev_id;
31231     A_UINT32 latency_enable;
31232     A_UINT32 latency_level;
31233     A_UINT32 latency_flags;
31234 } wmi_vdev_bcn_latency_fixed_param;
31235 
31236 /**
31237  * OCB DCC types and structures.
31238  */
31239 
31240 /**
31241  * DCC types as described in ETSI TS 102 687
31242  * Type                   Format            stepSize    referenceValue  numBits
31243  * -------------------------------------------------------------------------
31244  * ndlType_acPrio         INTEGER (0...7)   1           number          3
31245  * ndlType_controlLoop    INTEGER (0...7)   1           0               3
31246  * ndlType_arrivalRate    INTEGER (0..8191) 0.01 /s     0               13
31247  * ndlType_channelLoad    INTEGER (0..1000) 0.1 %       0 %             10
31248  * ndlType_channelUse     INTEGER (0..8000) 0.0125 %    0 %             13
31249  * ndlType_datarate       INTEGER (0..7)                Table 8         3
31250  * ndlType_distance       INTEGER (0..4095) 1 m         0               12
31251  * ndlType_numberElements INTEGER (0..63)               number          6
31252  * ndlType_packetDuration INTEGER (0..2047) TSYM        0               11
31253  * ndlType_packetInterval INTEGER (0..1023) 10 ms       0               10
31254  * ndlType_pathloss       INTEGER (0..31)   0.1         1.0             5
31255  * ndlType_rxPower        INTEGER (0..127)  -0.5 dB     -40 dBm         7
31256  * ndlType_snr            INTEGER (0..127)  0.5 dB      -10 dB          7
31257  * ndlType_timing         INTEGER (0..4095) 10 ms       0               12
31258  * ndlType_txPower        INTEGER (0..127)  0.5 dB      -20 dBm         7
31259  * ndlType_ratio          INTEGER (0..100)  1 %         0 %             7
31260  * ndlType_exponent       INTEGER (0..100)  0.1         0               7
31261  * ndlType_queueStatus    Enumeration                   Table A.2       1
31262  * ndlType_dccMechanism   Bitset                        Table A.2       6
31263  *
31264  * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
31265  * cannot be changed without breaking WMI compatibility.
31266  *
31267  * NOTE: For each of the types, one additional bit is allocated. This
31268  *  leftmost bit is used to indicate that the value is invalid. */
31269 #define SIZE_NDLTYPE_ACPRIO         (1 +  3)
31270 #define SIZE_NDLTYPE_CONTROLLOOP    (1 +  3)
31271 #define SIZE_NDLTYPE_ARRIVALRATE    (1 + 13)
31272 #define SIZE_NDLTYPE_CHANNELLOAD    (1 + 10)
31273 #define SIZE_NDLTYPE_CHANNELUSE     (1 + 13)
31274 #define SIZE_NDLTYPE_DATARATE       (1 +  3)
31275 #define SIZE_NDLTYPE_DISTANCE       (1 + 12)
31276 #define SIZE_NDLTYPE_NUMBERELEMENTS (1 +  6)
31277 #define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
31278 #define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
31279 #define SIZE_NDLTYPE_PATHLOSS       (1 +  5)
31280 #define SIZE_NDLTYPE_RXPOWER        (1 +  7)
31281 #define SIZE_NDLTYPE_SNR            (1 +  7)
31282 #define SIZE_NDLTYPE_TIMING         (1 + 12)
31283 #define SIZE_NDLTYPE_TXPOWER        (1 +  7)
31284 #define SIZE_NDLTYPE_RATIO          (1 +  7)
31285 #define SIZE_NDLTYPE_EXPONENT       (1 +  7)
31286 #define SIZE_NDLTYPE_QUEUESTATUS    (1 +  1)
31287 #define SIZE_NDLTYPE_DCCMECHANISM   (1 +  6)
31288 #define SIZE_BYTE                   (8)
31289 
31290 #define INVALID_ACPRIO          ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
31291 #define INVALID_CONTROLLOOP     ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
31292 #define INVALID_ARRIVALRATE     ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
31293 #define INVALID_CHANNELLOAD     ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
31294 #define INVALID_CHANNELUSE      ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
31295 #define INVALID_DATARATE        ((1 << SIZE_NDLTYPE_DATARATE) - 1)
31296 #define INVALID_DISTANCE        ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
31297 #define INVALID_NUMBERELEMENTS  ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
31298 #define INVALID_PACKETDURATION  ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
31299 #define INVALID_PACKETINTERVAL  ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
31300 #define INVALID_PATHLOSS        ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
31301 #define INVALID_RXPOWER         ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
31302 #define INVALID_SNR             ((1 << SIZE_NDLTYPE_SNR) - 1)
31303 #define INVALID_TIMING          ((1 << SIZE_NDLTYPE_TIMING) - 1)
31304 #define INVALID_TXPOWER         ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
31305 #define INVALID_RATIO           ((1 << SIZE_NDLTYPE_RATIO) - 1)
31306 #define INVALID_EXPONENT        ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
31307 #define INVALID_QUEUESTATS      ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
31308 #define INVALID_DCCMECHANISM    ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
31309 
31310 /** The MCS_COUNT macro cannot be modified without breaking
31311  *  WMI compatibility. */
31312 #define MCS_COUNT               (8)
31313 
31314 /** Flags for ndlType_dccMechanism. */
31315 typedef enum {
31316     DCC_MECHANISM_TPC = 1,
31317     DCC_MECHANISM_TRC = 2,
31318     DCC_MECHANISM_TDC = 4,
31319     DCC_MECHANISM_DSC = 8,
31320     DCC_MECHANISM_TAC = 16,
31321     DCC_MECHANISM_RESERVED = 32,
31322     DCC_MECHANISM_ALL = 0x3f,
31323 } wmi_dcc_ndl_type_dcc_mechanism;
31324 
31325 /** Values for ndlType_queueStatus. */
31326 typedef enum {
31327     DCC_QUEUE_CLOSED = 0,
31328     DCC_QUEUE_OPEN = 1,
31329 } wmi_dcc_ndl_type_queue_status;
31330 
31331 /** For ndlType_acPrio, use the values in wmi_traffic_ac. */
31332 
31333 /** Values for ndlType_datarate */
31334 typedef enum {
31335     DCC_DATARATE_3_MBPS = 0,
31336     DCC_DATARATE_4_5_MBPS = 1,
31337     DCC_DATARATE_6_MBPS = 2,
31338     DCC_DATARATE_9_MBPS = 3,
31339     DCC_DATARATE_12_MBPS = 4,
31340     DCC_DATARATE_18_MBPS = 5,
31341     DCC_DATARATE_24_MBPS = 6,
31342     DCC_DATARATE_27_MBPS = 7,
31343 } wmi_dcc_ndl_type_datarate;
31344 
31345 /** Data structure for active state configuration. */
31346 typedef struct {
31347     /** TLV tag and len; tag equals
31348      * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config */
31349     A_UINT32 tlv_header;
31350     /**
31351      * NDL_asStateId, ndlType_numberElements, 1+6 bits.
31352      * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
31353      */
31354     A_UINT32 state_info;
31355     /**
31356      * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
31357      * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
31358      * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
31359      * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
31360      */
31361     A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
31362 
31363     /**
31364      * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
31365      * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
31366      * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
31367      * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
31368      */
31369     A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
31370     /**
31371      * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
31372      * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
31373      * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
31374      * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
31375      */
31376     A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
31377     /**
31378      * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
31379      * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
31380      * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
31381      * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
31382      */
31383     A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
31384     /**
31385      * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
31386      * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
31387      * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
31388      * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
31389      */
31390     A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
31391 } wmi_dcc_ndl_active_state_config;
31392 
31393 #define WMI_NDL_AS_STATE_ID_GET(ptr)                    WMI_GET_BITS((ptr)->state_info, 0, 7)
31394 #define WMI_NDL_AS_STATE_ID_SET(ptr,val)                WMI_SET_BITS((ptr)->state_info, 0, 7, val)
31395 #define WMI_NDL_AS_CHAN_LOAD_GET(ptr)                   WMI_GET_BITS((ptr)->state_info, 7, 11)
31396 #define WMI_NDL_AS_CHAN_LOAD_SET(ptr,val)               WMI_SET_BITS((ptr)->state_info, 7, 11, val)
31397 #define WMI_NDL_AS_DCC_GET(ptr,acprio)                  wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
31398 #define WMI_NDL_AS_DCC_SET(ptr,acprio,val)              wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
31399 #define WMI_NDL_AS_TX_POWER_GET(ptr,acprio)             wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
31400 #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)
31401 #define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr,acprio)      wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
31402 #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)
31403 #define WMI_NDL_AS_DATARATE_GET(ptr,acprio)             wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
31404 #define WMI_NDL_AS_DATARATE_SET(ptr,acprio,val)         wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
31405 #define WMI_NDL_AS_CARRIER_SENSE_GET(ptr,acprio)        wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
31406 #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)
31407 
31408 /** Data structure for EDCA/QOS parameters. */
31409 typedef struct
31410 {
31411     /** TLV tag and len; tag equals
31412      * WMITLV_TAG_STRUC_wmi_qos_parameter */
31413     A_UINT32 tlv_header;
31414     /** Arbitration Inter-Frame Spacing. Range: 2-15 */
31415     A_UINT32 aifsn;
31416     /** Contention Window minimum. Range: 1 - 10 */
31417     A_UINT32 cwmin;
31418     /** Contention Window maximum. Range: 1 - 10 */
31419     A_UINT32 cwmax;
31420 } wmi_qos_parameter;
31421 
31422 /** Data structure for information specific to a channel. */
31423 typedef struct {
31424     /** TLV tag and len; tag equals
31425      * WMITLV_TAG_STRUC_wmi_ocb_channel */
31426     A_UINT32 tlv_header;
31427     A_UINT32 bandwidth; /* MHz units */
31428     wmi_mac_addr mac_address;
31429 } wmi_ocb_channel;
31430 
31431 /** Data structure for an element of the schedule array. */
31432 typedef struct {
31433     /** TLV tag and len; tag equals
31434      * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
31435     A_UINT32 tlv_header;
31436     A_UINT32 channel_freq; /* MHz units */
31437     A_UINT32 total_duration; /* ms units */
31438     A_UINT32 guard_interval; /* ms units */
31439 } wmi_ocb_schedule_element;
31440 
31441 /** Data structure for OCB configuration. */
31442 typedef struct {
31443     /** TLV tag and len; tag equals
31444      * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
31445     A_UINT32 tlv_header;
31446     /** VDEV id(interface) that is being configured */
31447     A_UINT32 vdev_id;
31448     A_UINT32 channel_count;
31449     A_UINT32 schedule_size;
31450     A_UINT32 flags;
31451     A_UINT32 ta_max_duration; /* Max duration of continuing multichannel operation without receiving a TA frame (units = seconds) */
31452 
31453     /** This is followed by a TLV array of wmi_channel. */
31454     /** This is followed by a TLV array of wmi_ocb_channel. */
31455     /** This is followed by a TLV array of wmi_qos_parameter. */
31456     /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
31457     /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
31458     /** This is followed by a TLV array of wmi_ocb_schedule_element. */
31459 } wmi_ocb_set_config_cmd_fixed_param;
31460 
31461 #define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET     0
31462 #define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK       1
31463 
31464 #define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr)     (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
31465 
31466 
31467 /** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
31468 typedef struct {
31469     /** TLV tag and len; tag equals
31470      *  WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param */
31471     A_UINT32 tlv_header;
31472     /* VDEV identifier */
31473     A_UINT32 vdev_id;
31474     A_UINT32 status;
31475 } wmi_ocb_set_config_resp_event_fixed_param;
31476 
31477 /* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
31478    WMI compatibility. */
31479 #define SIZE_UTC_TIME (10) /* The size of the utc time in bytes. */
31480 #define SIZE_UTC_TIME_ERROR (5) /* The size of the utc time error in bytes. */
31481 
31482 /** Data structure to set the UTC time. */
31483 typedef struct {
31484     /** TLV tag and len; tag equals
31485      *  WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
31486     A_UINT32 tlv_header;
31487     /* VDEV identifier */
31488     A_UINT32 vdev_id;
31489     /** 10 bytes of the utc time. */
31490     A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME,SIZE_BYTE)];
31491     /** 5 bytes of the time error. */
31492     A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR,SIZE_BYTE)];
31493 } wmi_ocb_set_utc_time_cmd_fixed_param;
31494 
31495 #define WMI_UTC_TIME_GET(ptr,byte_index)        wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
31496 #define WMI_UTC_TIME_SET(ptr,byte_index,val)    wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
31497 #define WMI_TIME_ERROR_GET(ptr,byte_index)      wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
31498 #define WMI_TIME_ERROR_SET(ptr,byte_index,val)  wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
31499 
31500 /** Data structure start the timing advertisement. The template for the
31501  *  timing advertisement frame follows this structure in the WMI command.
31502  */
31503 typedef struct {
31504     /** TLV tag and len; tag equals
31505      *  WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
31506     A_UINT32 tlv_header;
31507     /* VDEV identifier */
31508     A_UINT32 vdev_id;
31509     /** Number of times the TA is sent every 5 seconds. */
31510     A_UINT32 repeat_rate;
31511     /** The frequency on which to transmit. */
31512     A_UINT32 channel_freq; /* MHz units */
31513     /** The offset into the template of the timestamp. */
31514     A_UINT32 timestamp_offset;
31515     /** The offset into the template of the time value. */
31516     A_UINT32 time_value_offset;
31517     /** The length of the timing advertisement template. The
31518      *  template is in the TLV data. */
31519     A_UINT32 timing_advert_template_length;
31520 
31521     /** This is followed by a binary array containing the TA template. */
31522 } wmi_ocb_start_timing_advert_cmd_fixed_param;
31523 
31524 /** Data structure to stop the timing advertisement. */
31525 typedef struct {
31526     /** TLV tag and len; tag equals
31527      *  WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
31528     A_UINT32 tlv_header;
31529     /* VDEV identifier */
31530     A_UINT32 vdev_id;
31531     A_UINT32 channel_freq; /* MHz units */
31532 } wmi_ocb_stop_timing_advert_cmd_fixed_param;
31533 
31534 /** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
31535 typedef struct {
31536     /** TLV tag and len; tag equals
31537      *  WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
31538     A_UINT32 tlv_header;
31539     /* VDEV identifier */
31540     A_UINT32 vdev_id;
31541     A_UINT32 reserved;
31542 } wmi_ocb_get_tsf_timer_cmd_fixed_param;
31543 
31544 /** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
31545 typedef struct {
31546     /** TLV tag and len; tag equals
31547      *  WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
31548     A_UINT32 tlv_header;
31549     /* VDEV identifier */
31550     A_UINT32 vdev_id;
31551     A_UINT32 tsf_timer_high;
31552     A_UINT32 tsf_timer_low;
31553 } wmi_ocb_get_tsf_timer_resp_event_fixed_param;
31554 
31555 /** Data structure for DCC stats configuration per channel. */
31556 typedef struct {
31557     /** TLV tag and len; tag equals
31558      *  WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
31559     A_UINT32 tlv_header;
31560 
31561     /** The channel for which this applies, 16 bits. */
31562     /** The dcc_stats_bitmap, 8 bits. */
31563     A_UINT32 chan_info;
31564 
31565     /** Demodulation model parameters. */
31566     /**
31567      * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
31568      * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
31569      * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
31570      * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
31571      * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
31572      * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
31573      * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
31574      * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
31575      */
31576     A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
31577 
31578     /** Communication ranges. */
31579     /**
31580      * tx_power, ndlType_txPower, 1+7 bits.
31581      * datarate, ndlType_datarate, 1+3 bits.
31582      */
31583     A_UINT32 tx_power_datarate;
31584     /**
31585      * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
31586      * NDL_estCommRange, ndlType_distance, 1+12 bits.
31587      */
31588     A_UINT32 carrier_sense_est_comm_range;
31589 
31590     /** Channel load measures. */
31591     /**
31592      * dccSensitivity, ndlType_rxPower, 1+7 bits.
31593      * carrierSense, ndlType_rxPower, 1+7 bits.
31594      * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
31595      */
31596     A_UINT32 dcc_stats;
31597     /**
31598      * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
31599      * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
31600      */
31601     A_UINT32 packet_stats;
31602     /**
31603      * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
31604      */
31605     A_UINT32 channel_busy_time;
31606 
31607     /** Transmit packet statistics. */
31608     /**
31609      * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
31610      * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
31611      * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
31612      * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
31613      */
31614     A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_ARRIVALRATE)];
31615     /**
31616      * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
31617      * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
31618      * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
31619      * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
31620      */
31621     A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
31622     /**
31623      * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
31624      * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
31625      * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
31626      * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
31627      */
31628     A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_CHANNELUSE)];
31629     /**
31630      * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
31631      * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
31632      * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
31633      * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
31634      */
31635     A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
31636 } wmi_dcc_ndl_stats_per_channel;
31637 
31638 #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs)      wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
31639 #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val)  wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
31640 
31641 #define WMI_NDL_STATS_CHAN_FREQ_GET(ptr)            WMI_GET_BITS((ptr)->chan_info, 0, 16)
31642 #define WMI_NDL_STATS_CHAN_FREQ_SET(ptr,val)        WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
31643 #define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr)     WMI_GET_BITS((ptr)->chan_info, 16, 8)
31644 #define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
31645 
31646 #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs)      wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
31647 #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val)  wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
31648 
31649 #define WMI_TX_POWER_GET(ptr)                       WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
31650 #define WMI_TX_POWER_SET(ptr,val)                   WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
31651 #define WMI_TX_DATARATE_GET(ptr)                    WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
31652 #define WMI_TX_DATARATE_SET(ptr,val)                WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
31653 #define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr)        WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
31654 #define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr,val)    WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
31655 #define WMI_NDL_EST_COMM_RANGE_GET(ptr)             WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
31656 #define WMI_NDL_EST_COMM_RANGE_SET(ptr,val)         WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
31657 
31658 #define WMI_DCC_SENSITIVITY_GET(ptr)                WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
31659 #define WMI_DCC_SENSITIVITY_SET(ptr,val)            WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
31660 #define WMI_CARRIER_SENSE_GET(ptr)                  WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
31661 #define WMI_CARRIER_SENSE_SET(ptr,val)              WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
31662 #define WMI_NDL_CHANNEL_LOAD_GET(ptr)               WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
31663 #define WMI_NDL_CHANNEL_LOAD_SET(ptr,val)           WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
31664 #define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr)        WMI_GET_BITS((ptr)->packet_stats, 0, 14)
31665 #define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr,val)    WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
31666 #define WMI_NDL_PACKET_AVG_DURATION_GET(ptr)        WMI_GET_BITS((ptr)->packet_stats, 14, 12)
31667 #define WMI_NDL_PACKET_AVG_DURATION_SET(ptr,val)    WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
31668 #define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr)          WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
31669 #define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr,val)      WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
31670 
31671 #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)
31672 #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)
31673 #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)
31674 #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)
31675 #define WMI_NDL_TX_CHANNEL_USE_GET(ptr,acprio)                  wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
31676 #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)
31677 #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)
31678 #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)
31679 
31680 /** Bitmap for DCC stats. */
31681 typedef enum {
31682     DCC_STATS_DEMODULATION_MODEL = 1,
31683     DCC_STATS_COMMUNICATION_RANGES = 2,
31684     DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
31685     DCC_STATS_TRANSMIT_PACKET_STATS = 8,
31686     DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
31687     DCC_STATS_ALL = 0xff,
31688 } wmi_dcc_stats_bitmap;
31689 
31690 /** Data structure for getting the DCC stats. */
31691 typedef struct {
31692     /** TLV tag and len; tag equals
31693      *  WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param */
31694     A_UINT32 tlv_header;
31695 
31696     /* VDEV identifier */
31697     A_UINT32 vdev_id;
31698 
31699     /** The number of channels for which stats are being requested. */
31700     A_UINT32 num_channels;
31701 
31702     /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
31703 } wmi_dcc_get_stats_cmd_fixed_param;
31704 
31705 typedef struct {
31706     /** TLV tag and len; tag equals
31707      *  WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request */
31708     A_UINT32 tlv_header;
31709 
31710     /** The channel for which this applies. */
31711     A_UINT32 chan_freq; /* MHz units */
31712 
31713     /** The DCC stats being requested. */
31714     A_UINT32 dcc_stats_bitmap;
31715 } wmi_dcc_channel_stats_request;
31716 
31717 /** Data structure for the response with the DCC stats. */
31718 typedef struct {
31719     /** TLV tag and len; tag equals
31720      *  WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param */
31721     A_UINT32 tlv_header;
31722     /* VDEV identifier */
31723     A_UINT32 vdev_id;
31724     /** Number of channels in the response. */
31725     A_UINT32 num_channels;
31726     /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
31727 } wmi_dcc_get_stats_resp_event_fixed_param;
31728 
31729 /** Data structure for clearing the DCC stats. */
31730 typedef struct {
31731     /** TLV tag and len; tag equals
31732      *  WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param */
31733     A_UINT32 tlv_header;
31734     /* VDEV identifier */
31735     A_UINT32 vdev_id;
31736     A_UINT32 dcc_stats_bitmap;
31737 } wmi_dcc_clear_stats_cmd_fixed_param;
31738 
31739 /** Data structure for the pushed DCC stats */
31740 typedef struct {
31741     /** TLV tag and len; tag equals
31742      *  WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param */
31743     A_UINT32 tlv_header;
31744     /* VDEV identifier */
31745     A_UINT32 vdev_id;
31746     /** The number of channels in the response. */
31747     A_UINT32 num_channels;
31748 
31749     /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
31750 } wmi_dcc_stats_event_fixed_param;
31751 
31752 /** Data structure for updating NDL per channel. */
31753 typedef struct {
31754     /** TLV tag and len; tag equals
31755      *  WMITLV_TAG_STRUC_wmi_dcc_ndl_chan */
31756     A_UINT32 tlv_header;
31757 
31758     /**
31759      * Channel frequency, 16 bits
31760      * NDL_numActiveState, ndlType_numberElements, 1+6 bits
31761      */
31762     A_UINT32 chan_info;
31763 
31764     /**
31765      *  NDL_minDccSampling, 10 bits.
31766      *      Maximum time interval between subsequent checks of the DCC rules.
31767      */
31768     A_UINT32 ndl_min_dcc_sampling;
31769 
31770     /**
31771      * dcc_enable, 1 bit.
31772      * dcc_stats_enable, 1 bit.
31773      * dcc_stats_interval, 16 bits.
31774      */
31775     A_UINT32 dcc_flags;
31776 
31777     /** General DCC configuration. */
31778     /**
31779      * NDL_timeUp, ndlType_timing, 1+12 bits.
31780      * NDL_timeDown, ndlType_timing, 1+12 bits.
31781      */
31782     A_UINT32 general_config;
31783 
31784     /** Transmit power thresholds. */
31785     /**
31786      * NDL_minTxPower, ndlType_txPower, 1+7 bits.
31787      * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
31788      */
31789     A_UINT32 min_max_tx_power; /* see "ETSI TS 102 687" table above for units */
31790     /**
31791      * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
31792      * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
31793      * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
31794      * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
31795      */
31796     /* see "ETSI TS 102 687" table above for units */
31797     A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
31798 
31799     /** Packet timing thresholds. */
31800     /**
31801      * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
31802      * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
31803      * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
31804      * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
31805      */
31806     A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
31807     /**
31808      * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
31809      * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
31810      */
31811     A_UINT32 min_max_packet_interval;
31812     /**
31813      * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
31814      * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
31815      * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
31816      * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
31817      */
31818     A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETINTERVAL)];
31819 
31820     /** Packet datarate thresholds. */
31821     /**
31822      * NDL_minDatarate, ndlType_datarate, 1+3 bits.
31823      * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
31824      */
31825     A_UINT32 min_max_datarate;
31826     /**
31827      * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
31828      * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
31829      * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
31830      * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
31831      */
31832     A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_DATARATE)];
31833 
31834     /** Receive signal thresholds. */
31835     /**
31836      * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
31837      * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
31838      * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
31839      */
31840     A_UINT32 min_max_def_carrier_sense;
31841 
31842     /** Receive model parameter. */
31843     /**
31844      * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
31845      * NDL_maxCsRange, ndlType_distance, 1+12 bits.
31846      * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
31847      */
31848     A_UINT32 receive_model_parameter;
31849 
31850     /**
31851      * NDL_minSNR, ndlType_snr, 1+7 bits.
31852      */
31853     A_UINT32 receive_model_parameter_2;
31854 
31855     /** Demodulation model parameters. */
31856     /**
31857      * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
31858      * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
31859      * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
31860      * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
31861      * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
31862      * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
31863      * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
31864      * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
31865      */
31866     A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
31867 
31868     /** Transmit model parameters. */
31869     /**
31870      * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
31871      * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
31872      * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
31873      * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
31874      */
31875     A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
31876     /**
31877      * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
31878      * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
31879      * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
31880      * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
31881      */
31882     A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
31883     /**
31884      * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
31885      * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
31886      * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
31887      * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
31888      */
31889     A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
31890     /**
31891      * NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits.
31892      */
31893     A_UINT32 tm_max_channel_use;
31894     /**
31895      * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
31896      * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
31897      * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
31898      * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
31899      */
31900     A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
31901 
31902     /** Channel load thresholds. */
31903     /**
31904      * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
31905      * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
31906      */
31907     A_UINT32 min_max_channel_load;
31908 
31909     /** Transmit queue parameters. */
31910     /**
31911      * NDL_numQueue, ndlType_acPrio, 1+3 bits.
31912      * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
31913      * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
31914      * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
31915      * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
31916      */
31917     A_UINT32 transmit_queue_parameters;
31918 
31919     /**
31920      * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
31921      * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
31922      * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
31923      * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
31924      */
31925     A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
31926 
31927 } wmi_dcc_ndl_chan;
31928 
31929 #define WMI_CHAN_FREQ_GET(ptr)                  WMI_GET_BITS((ptr)->chan_info, 0, 16)
31930 #define WMI_CHAN_FREQ_SET(ptr,val)              WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
31931 #define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr)       WMI_GET_BITS((ptr)->chan_info, 16, 7)
31932 #define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr,val)   WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
31933 
31934 #define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr)       WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
31935 #define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr,val)   WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
31936 #define WMI_NDL_MEASURE_INTERVAL_GET(ptr)       WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
31937 #define WMI_NDL_MEASURE_INTERVAL_SET(ptr,val)   WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
31938 
31939 #define WMI_NDL_DCC_ENABLE_GET(ptr)             WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
31940 #define WMI_NDL_DCC_ENABLE_SET(ptr,val)         WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
31941 #define WMI_NDL_DCC_STATS_ENABLE_GET(ptr)       WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
31942 #define WMI_NDL_DCC_STATS_ENABLE_SET(ptr,val)   WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
31943 #define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr)     WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
31944 #define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
31945 
31946 #define WMI_NDL_TIME_UP_GET(ptr)                WMI_GET_BITS((ptr)->general_config, 0, 13)
31947 #define WMI_NDL_TIME_UP_SET(ptr,val)            WMI_SET_BITS((ptr)->general_config, 0, 13, val)
31948 #define WMI_NDL_TIME_DOWN_GET(ptr)              WMI_GET_BITS((ptr)->general_config, 13, 13)
31949 #define WMI_NDL_TIME_DOWN_SET(ptr,val)          WMI_SET_BITS((ptr)->general_config, 13, 13, val)
31950 
31951 #define WMI_NDL_MIN_TX_POWER_GET(ptr)       WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
31952 #define WMI_NDL_MIN_TX_POWER_SET(ptr,val)   WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
31953 #define WMI_NDL_MAX_TX_POWER_GET(ptr)       WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
31954 #define WMI_NDL_MAX_TX_POWER_SET(ptr,val)   WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
31955 
31956 #define WMI_NDL_DEF_TX_POWER_GET(ptr,acprio)        wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
31957 #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)
31958 
31959 #define WMI_NDL_MAX_PACKET_DURATION_GET(ptr,acprio)     wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
31960 #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)
31961 #define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr)            WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
31962 #define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr,val)        WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
31963 #define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr)            WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
31964 #define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr,val)        WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
31965 #define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr,acprio)     wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
31966 #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)
31967 
31968 #define WMI_NDL_MIN_DATARATE_GET(ptr)               WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
31969 #define WMI_NDL_MIN_DATARATE_SET(ptr,val)           WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
31970 #define WMI_NDL_MAX_DATARATE_GET(ptr)               WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
31971 #define WMI_NDL_MAX_DATARATE_SET(ptr,val)           WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
31972 #define WMI_NDL_DEF_DATARATE_GET(ptr,acprio)        wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
31973 #define WMI_NDL_DEF_DATARATE_SET(ptr,acprio,val)    wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
31974 
31975 #define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr)      WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
31976 #define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr,val)  WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
31977 #define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr)      WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
31978 #define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr,val)  WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
31979 #define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr)      WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
31980 #define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr,val)  WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
31981 
31982 #define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr)        WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
31983 #define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr,val)    WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
31984 #define WMI_NDL_MAX_CS_RANGE_GET(ptr)               WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
31985 #define WMI_NDL_MAX_CS_RANGE_SET(ptr,val)           WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
31986 #define WMI_NDL_REF_PATH_LOSS_GET(ptr)              WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
31987 #define WMI_NDL_REF_PATH_LOSS_SET(ptr,val)          WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
31988 
31989 #define WMI_NDL_MIN_SNR_GET(ptr)                    WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
31990 #define WMI_NDL_MIN_SNR_SET(ptr,val)                WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
31991 
31992 #define WMI_NDL_SNR_BACKOFF_GET(ptr,mcs)        wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
31993 #define WMI_NDL_SNR_BACKOFF_SET(ptr,mcs,val)    wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
31994 
31995 #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)
31996 #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)
31997 #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)
31998 #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)
31999 #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)
32000 #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)
32001 #define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr)                 WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
32002 #define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr,val)             WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
32003 #define WMI_NDL_TM_CHANNEL_USE_GET(ptr,acprio)              wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
32004 #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)
32005 
32006 #define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr)       WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
32007 #define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr,val)   WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
32008 #define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr)       WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
32009 #define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr,val)   WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
32010 
32011 #define WMI_NDL_NUM_QUEUE_GET(ptr)                      WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
32012 #define WMI_NDL_NUM_QUEUE_SET(ptr,val)                  WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
32013 #define WMI_NDL_REF_QUEUE_STATUS_GET(ptr,acprio)        WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
32014 #define WMI_NDL_REF_QUEUE_STATUS_SET(ptr,acprio,val)    WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
32015 #define WMI_NDL_REF_QUEUE_LEN_GET(ptr,acprio)           wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
32016 #define WMI_NDL_REF_QUEUE_LEN_SET(ptr,acprio,val)       wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
32017 
32018 /** Data structure for updating the NDL. */
32019 typedef struct {
32020     /** TLV tag and len; tag equals
32021      *  WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
32022     A_UINT32 tlv_header;
32023 
32024     /* VDEV identifier */
32025     A_UINT32 vdev_id;
32026 
32027     /** The number of channels in the request. */
32028     A_UINT32 num_channel;
32029 
32030     /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
32031     /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
32032 } wmi_dcc_update_ndl_cmd_fixed_param;
32033 
32034 typedef struct {
32035     /** TLV tag and len; tag equals
32036      *  WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param */
32037     A_UINT32 tlv_header;
32038     /* VDEV identifier */
32039     A_UINT32 vdev_id;
32040     A_UINT32 status;
32041 } wmi_dcc_update_ndl_resp_event_fixed_param;
32042 
32043 /* Actions for TSF timestamp */
32044 typedef enum {
32045     TSF_TSTAMP_CAPTURE_REQ = 1,
32046     TSF_TSTAMP_CAPTURE_RESET = 2,
32047     TSF_TSTAMP_READ_VALUE = 3,
32048     TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
32049     TSF_TSTAMP_AUTO_REPORT_ENABLE = 5,
32050     TSF_TSTAMP_AUTO_REPORT_DISABLE = 6,
32051     TSF_TSTAMP_PERIODIC_REPORT_REQ = 5,
32052 } wmi_tsf_tstamp_action;
32053 
32054 typedef enum {
32055     TSF_TSTAMP_REPORT_TTIMER = 0x1, /* bit 0: TSF Timer */
32056     TSF_TSTAMP_REPORT_QTIMER = 0x2, /* bit 1: H/T common Timer */
32057 } wmi_tsf_tstamp_report_flags;
32058 
32059 #define TSF_TSTAMP_REPORT_PERIOD_MIN   1000    /* ms units */
32060 
32061 typedef struct {
32062     /** TLV tag and len; tag equals
32063      * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
32064     A_UINT32 tlv_header;
32065     /** unique id identifying the VDEV, generated by the caller */
32066     A_UINT32 vdev_id;
32067     /* action type, refer to wmi_tsf_tstamp_action */
32068     A_UINT32 tsf_action;
32069     /*
32070      * The below fields are valid only when tsf_action is
32071      * TSF_TSTAMP_PERIODIC_REPORT_REQ.
32072      */
32073     A_UINT32 period; /* the period of report timestamp, ms units */
32074     A_UINT32 flags;  /* wmi_tsf_tstamp_report_flags */
32075 } wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
32076 
32077 typedef struct {
32078     /* TLV tag and len; tag equals
32079      * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
32080     A_UINT32 tlv_header;
32081     /* VDEV identifier */
32082     A_UINT32 vdev_id;
32083     /* low 32bit of tsf */
32084     A_UINT32 tsf_low;
32085     /* high 32 bit of tsf */
32086     A_UINT32 tsf_high;
32087     /* low 32 bits of qtimer */
32088     A_UINT32 qtimer_low;
32089     /* high 32 bits of qtimer */
32090     A_UINT32 qtimer_high;
32091     /*
32092      * tsf_id: TSF ID for the current vdev
32093      * This field should be ignored unless the tsf_id_valid flag is set.
32094      */
32095     A_UINT32 tsf_id;
32096     /*
32097      * The mac_id and tsf_id fields should be ignored unless the
32098      * tsf_id_valid flag is set.
32099      */
32100     A_UINT32 tsf_id_valid;
32101     /*
32102      * mac_id: MAC identifier
32103      * This field should be ignored unless the tsf_id_valid flag is set.
32104      */
32105     A_UINT32 mac_id;
32106     /*
32107      * The original mac_id_valid field that was originally used to specify
32108      * whether the mac_id field is valid has been repurposed to instead
32109      * specify whether this message is a TSF report or a UL delay report.
32110      */
32111     union {
32112         A_UINT32 mac_id_valid; /* original name */
32113         /* ul_delay_or_tsf_report:
32114          * New name for the field, reflecting its new purpose.
32115          * ul_delay_or_tsf_report = 1 -> UL delay
32116          * ul_delay_or_tsf_report = 0 -> TSF report
32117          */
32118         A_UINT32 ul_delay_or_tsf_report;
32119     };
32120     /* low 32 bits of wlan global tsf */
32121     A_UINT32 wlan_global_tsf_low;
32122     /* high 32 bits of wlan global tsf */
32123     A_UINT32 wlan_global_tsf_high;
32124     /* low 32 bits of tqm timer */
32125     A_UINT32 tqm_timer_low;
32126     /* high 32 bits of tqm timer */
32127     A_UINT32 tqm_timer_high;
32128     /* use tqm timer flag */
32129     A_UINT32 use_tqm_timer;
32130 } wmi_vdev_tsf_report_event_fixed_param;
32131 
32132 /* ie_id values:
32133  * 0 to 255 are used for individual IEEE802.11 Information Element types
32134  */
32135 #define WMI_SET_VDEV_IE_ID_SCAN_SET_DEFAULT_IE 256
32136 
32137 /* source values: */
32138 #define WMI_SET_VDEV_IE_SOURCE_HOST     0x0
32139 
32140 /* band values: */
32141 typedef enum {
32142     WMI_SET_VDEV_IE_BAND_ALL = 0,
32143     WMI_SET_VDEV_IE_BAND_2_4GHZ,
32144     WMI_SET_VDEV_IE_BAND_5GHZ,
32145 } wmi_set_vdev_ie_band;
32146 
32147 typedef struct {
32148     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
32149     A_UINT32 tlv_header;
32150     /** unique id identifying the VDEV, generated by the caller */
32151     A_UINT32 vdev_id;
32152     /** unique id to identify the ie_data as defined by ieee 802.11 spec */
32153     A_UINT32 ie_id;
32154     /** ie_len corresponds to num of bytes in ie_data[] */
32155     A_UINT32 ie_len;
32156     /** source of this command */
32157     A_UINT32 ie_source; /* see WMI_SET_VDEV_IE_SOURCE_ defs */
32158     /** band for this IE - se wmi_set_vdev_ie_band enum */
32159     A_UINT32 band;
32160    /**
32161     * Following this structure is the TLV byte stream of ie data of length ie_buf_len:
32162     * A_UINT8 ie_data[];
32163     *
32164     */
32165 } wmi_vdev_set_ie_cmd_fixed_param;
32166 
32167 /* DISA feature related data structures */
32168 #define MAX_MAC_HEADER_LEN 32
32169 typedef enum {
32170     WMI_ENCRYPT_DECRYPT_FLAG_INVALID,
32171     WMI_ENCRYPT = 1,
32172     WMI_DECRYPT = 2,
32173 } WMI_ENCRYPT_DECRYPT_FLAG;
32174 
32175 typedef struct {
32176     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param */
32177     /** unique id identifying the VDEV, generated by the caller */
32178     A_UINT32 vdev_id;
32179     A_UINT32 key_flag; /* WMI_ENCRYPT_DECRYPT_FLAG */
32180     A_UINT32 key_idx;
32181     A_UINT32 key_cipher;
32182     A_UINT32 key_len; /* units = bytes */
32183     A_UINT32 key_txmic_len; /* units = bytes */
32184     A_UINT32 key_rxmic_len; /* units = bytes */
32185     /** Key: This array needs to be provided in little-endian order */
32186     A_UINT8 key_data[WMI_MAX_KEY_LEN];
32187     /** Packet number: This array needs to be provided in little-endian order.
32188      *  If the PN is less than 8 bytes, the PN data shall be placed into this
32189      *  pn[] array starting at byte 0, leaving the MSBs empty.
32190      */
32191     A_UINT8 pn[8];
32192     /** 802.11 MAC header to be typecast to struct ieee80211_qosframe_addr4
32193      *  This array needs to be provided in little-endian order.
32194      */
32195     A_UINT8 mac_hdr[MAX_MAC_HEADER_LEN];
32196     A_UINT32 data_len; /** Payload length, units = bytes */
32197     /*
32198      * Following this struct are this TLV:
32199      *     A_UINT8  data[]; <-- actual data to be encrypted,
32200      *                          needs to be provided in little-endian order
32201      */
32202 } wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param;
32203 
32204 /* This event is generated in response to WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from HOST.
32205  * On receiving WMI command WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from
32206  * HOST with DISA test vectors, DISA frame will prepared and submitted to HW,
32207  * then on receiving the tx completion for the DISA frame this WMI event
32208  * will be delivered to HOST with the encrypted frame.
32209  */
32210 typedef struct {
32211     /** TLV tag and len; tag equals
32212     * WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param */
32213     A_UINT32 tlv_header;
32214     /* VDEV identifier */
32215     A_UINT32 vdev_id;
32216     A_INT32 status; /*  0: success, -1: Failure, */
32217     /* 802.11 header length + encrypted payload length (units = bytes) */
32218     A_UINT32 data_length;
32219     /*
32220      * Following this struct is this TLV:
32221      *    A_UINT8 enc80211_frame[]; <-- Encrypted 802.11 frame;
32222      *        802.11 header + encrypted payload,
32223      *        provided in little-endian order
32224      */
32225 } wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param;
32226 
32227 /* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */
32228 typedef struct {
32229     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param */
32230     /** Set Preferred Channel List  **/
32231 
32232     /** # of channels to scan */
32233     A_UINT32 num_chan;
32234 /**
32235  * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
32236  * structure. The TLV's are:
32237  *     A_UINT32 channel_list[];
32238  **/
32239 } wmi_soc_set_pcl_cmd_fixed_param;
32240 
32241 /* Values for channel_weight */
32242 typedef enum {
32243     WMI_PCL_WEIGHT_DISALLOW  = 0,
32244     WMI_PCL_WEIGHT_LOW       = 1,
32245     WMI_PCL_WEIGHT_MEDIUM    = 2,
32246     WMI_PCL_WEIGHT_HIGH      = 3,
32247     WMI_PCL_WEIGHT_VERY_HIGH = 4,
32248 } wmi_pcl_chan_weight;
32249 
32250 typedef struct {
32251     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param */
32252     /** Set Preferred Channel List  **/
32253 
32254     /** pdev_id for identifying the MAC
32255      * See macros starting with WMI_PDEV_ID_ for values.
32256      */
32257     A_UINT32 pdev_id;
32258 
32259     /** # of channels to scan */
32260     A_UINT32 num_chan;
32261 /**
32262  * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
32263  * structure. The TLV's are:
32264  *     A_UINT32 channel_weight[];  channel order & size will be as per the list provided in WMI_SCAN_CHAN_LIST_CMDID
32265  **/
32266 } wmi_pdev_set_pcl_cmd_fixed_param;
32267 
32268 /* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */
32269 typedef struct {
32270     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param */
32271     /**  Set Hardware Mode  **/
32272 
32273     /* Hardware Mode Index */
32274     A_UINT32 hw_mode_index;
32275 } wmi_soc_set_hw_mode_cmd_fixed_param;
32276 
32277 typedef struct {
32278     A_UINT32 tlv_header; /* TLV tag and len tag equals WMITLV_TAG_STRUC_wmi_pdev_band_to_mac */
32279     /** pdev_id for identifying the MAC
32280       * See macros starting with WMI_PDEV_ID_ for values.
32281       */
32282     A_UINT32 pdev_id;
32283     /* start frequency in MHz */
32284     A_UINT32 start_freq;
32285     /* end frequency in MHz */
32286     A_UINT32 end_freq;
32287 } wmi_pdev_band_to_mac;
32288 
32289 typedef struct {
32290     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param */
32291     /**  Set Hardware Mode  **/
32292 
32293     /** pdev_id for identifying the MAC
32294      * See macros starting with WMI_PDEV_ID_ for values.
32295      */
32296     A_UINT32 pdev_id;
32297 
32298     /* Hardware Mode Index */
32299     A_UINT32 hw_mode_index;
32300 
32301     /* Number of band to mac TLVs */
32302     A_UINT32 num_band_to_mac;
32303 
32304     /* Followed by TLVs of type
32305      * num_band_to_mac * wmi_pdev_band_to_mac.
32306      */
32307 } wmi_pdev_set_hw_mode_cmd_fixed_param;
32308 
32309 /* DEPRECATED - use wmi_pdev_set_dual_mac_config_cmd_fixed_param instead */
32310 typedef struct {
32311     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param */
32312     /**  Set Dual MAC Firmware Configuration  **/
32313 
32314     /* Concurrent scan configuration bits */
32315     A_UINT32 concurrent_scan_config_bits;
32316     /* Firmware mode configuration bits */
32317     A_UINT32 fw_mode_config_bits;
32318 } wmi_soc_set_dual_mac_config_cmd_fixed_param;
32319 
32320 typedef struct {
32321     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param */
32322     /**  Set Dual MAC Firmware Configuration  **/
32323 
32324     /** pdev_id for identifying the MAC
32325      * See macros starting with WMI_PDEV_ID_ for values.
32326      */
32327     A_UINT32 pdev_id;
32328 
32329     /* Concurrent scan configuration bits */
32330     A_UINT32 concurrent_scan_config_bits;
32331     /* Firmware mode configuration bits */
32332     A_UINT32 fw_mode_config_bits;
32333 } wmi_pdev_set_mac_config_cmd_fixed_param;
32334 
32335 typedef struct { /* DEPRECATED */
32336     A_UINT32 num_tx_chains;
32337     A_UINT32 num_rx_chains;
32338     A_UINT32 reserved[2];
32339 } soc_num_tx_rx_chains;
32340 
32341 typedef struct {
32342     A_UINT32 num_tx_chains_2g;
32343     A_UINT32 num_rx_chains_2g;
32344     A_UINT32 num_tx_chains_5g;
32345     A_UINT32 num_rx_chains_5g;
32346 } band_num_tx_rx_chains;
32347 
32348 typedef union { /* DEPRECATED */
32349     soc_num_tx_rx_chains soc_txrx_chain_setting;
32350     band_num_tx_rx_chains band_txrx_chain_setting;
32351 } antenna_num_tx_rx_chains;
32352 
32353 typedef enum {
32354     ANTENNA_MODE_DISABLED = 0x0,
32355     ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
32356     /* reserved */
32357 } antenna_mode_reason;
32358 
32359 /* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */
32360 typedef struct {
32361     A_UINT32 tlv_header; /* TLV tag and len;  tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param */
32362 
32363     /* the reason for setting antenna mode, refer antenna_mode_reason */
32364     A_UINT32 reason;
32365 
32366     /*
32367      * The above reason parameter will select whether the following union
32368      * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
32369      */
32370     antenna_num_tx_rx_chains num_txrx_chains_setting;
32371 } wmi_soc_set_antenna_mode_cmd_fixed_param;
32372 
32373 typedef struct {
32374     A_UINT32 tlv_header; /* TLV tag and len;  tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param */
32375 
32376     /** pdev_id for identifying the MAC
32377      * See macros starting with WMI_PDEV_ID_ for values.
32378      */
32379     A_UINT32 pdev_id;
32380 
32381     /* Bits 0-15 is the number of RX chains and 16-31 is the number of TX chains */
32382     A_UINT32 num_txrx_chains;
32383 } wmi_pdev_set_antenna_mode_cmd_fixed_param;
32384 
32385 /** Data structure for information specific to a VDEV to MAC mapping. */
32386 /* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */
32387 typedef struct {
32388     /** TLV tag and len; tag equals
32389      * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
32390     A_UINT32 tlv_header;
32391     A_UINT32 vdev_id; /* VDEV ID */
32392     A_UINT32 mac_id; /* MAC ID */
32393 } wmi_soc_set_hw_mode_response_vdev_mac_entry;
32394 
32395 /** Data structure for information specific to a VDEV to MAC mapping. */
32396 typedef struct {
32397     /** TLV tag and len; tag equals
32398      * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */
32399     A_UINT32 tlv_header;
32400 
32401     /** pdev_id for identifying the MAC
32402      * See macros starting with WMI_PDEV_ID_ for values.
32403      */
32404     A_UINT32 pdev_id;
32405 
32406     A_UINT32 vdev_id;
32407 } wmi_pdev_set_hw_mode_response_vdev_mac_entry;
32408 
32409 /* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */
32410 typedef struct {
32411     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param */
32412     /**  Set Hardware Mode Response Event  **/
32413 
32414     /* Status of set_hw_mode command */
32415     /*
32416      * Values for Status:
32417      *  0 - OK; command successful
32418      *  1 - EINVAL; Requested invalid hw_mode
32419      *  2 - ECANCELED; HW mode change canceled
32420      *  3 - ENOTSUP; HW mode not supported
32421      *  4 - EHARDWARE; HW mode change prevented by hardware
32422      *  5 - EPENDING; HW mode change is pending
32423      *  6 - ECOEX; HW mode change conflict with Coex
32424      */
32425     A_UINT32 status;
32426     /* Configured Hardware Mode */
32427     A_UINT32 cfgd_hw_mode_index;
32428     /* Number of Vdev to Mac entries */
32429     A_UINT32 num_vdev_mac_entries;
32430 
32431 /**
32432  * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
32433  * structure. The TLV's are:
32434  *      A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
32435  */
32436 } wmi_soc_set_hw_mode_response_event_fixed_param;
32437 
32438 typedef struct {
32439     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param */
32440     /**  Set Hardware Mode Response Event  **/
32441 
32442     /** pdev_id for identifying the MAC
32443      * See macros starting with WMI_PDEV_ID_ for values.
32444      */
32445     A_UINT32 pdev_id;
32446 
32447     /* Status of set_hw_mode command */
32448     /*
32449      * Values for Status:
32450      *  0 - OK; command successful
32451      *  1 - EINVAL; Requested invalid hw_mode
32452      *  2 - ECANCELED; HW mode change canceled
32453      *  3 - ENOTSUP; HW mode not supported
32454      *  4 - EHARDWARE; HW mode change prevented by hardware
32455      *  5 - EPENDING; HW mode change is pending
32456      *  6 - ECOEX; HW mode change conflict with Coex
32457      */
32458     A_UINT32 status;
32459     /* Configured Hardware Mode */
32460     A_UINT32 cfgd_hw_mode_index;
32461     /* Number of Vdev to Mac entries */
32462     A_UINT32 num_vdev_mac_entries;
32463 /**
32464  * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
32465  * structure. The TLV's are:
32466  *      A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
32467  */
32468 } wmi_pdev_set_hw_mode_response_event_fixed_param;
32469 
32470 /* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */
32471 typedef struct {
32472     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param */
32473     /**  Hardware Mode Transition Event **/
32474 
32475     /* Original or old Hardware mode */
32476     A_UINT32 old_hw_mode_index;
32477     /* New Hardware Mode */
32478     A_UINT32 new_hw_mode_index;
32479     /* Number of Vdev to Mac entries */
32480     A_UINT32 num_vdev_mac_entries;
32481 
32482 /**
32483  * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
32484  * structure. The TLV's are:
32485  *      A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
32486  */
32487 } wmi_soc_hw_mode_transition_event_fixed_param;
32488 
32489 typedef struct {
32490     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param */
32491     /**  Hardware Mode Transition Event **/
32492 
32493     /** pdev_id for identifying the MAC
32494      * See macros starting with WMI_PDEV_ID_ for values.
32495      */
32496     A_UINT32 pdev_id;
32497 
32498     /* Original or old Hardware mode */
32499     A_UINT32 old_hw_mode_index;
32500     /* New Hardware Mode */
32501     A_UINT32 new_hw_mode_index;
32502     /* Number of Vdev to Mac entries */
32503     A_UINT32 num_vdev_mac_entries;
32504 
32505 /**
32506  * TLV (tag length value) parameters follow the pdev_set_hw_mode_response_event
32507  * structure. The TLV's are:
32508  *     wmi_pdev_set_hw_mode_response_vdev_mac_entry
32509  *         wmi_pdev_set_hw_mode_response_vdev_mac_mapping[];
32510  *     wmi_pdev_band_to_mac mac_freq_mapping[];
32511  */
32512 } wmi_pdev_hw_mode_transition_event_fixed_param;
32513 
32514 /**
32515  * This command is sent from WLAN host driver to firmware for
32516  * plugging in reorder queue desc to lithium hw.
32517  *
32518  * Example: plug-in queue desc for TID 5
32519  *    host->target: WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
32520  *                  (vdev_id = PEER vdev id,
32521  *                   peer_macaddr = PEER mac addr,
32522  *                   tid = 5,
32523  *                   queue_ptr_lo = queue desc addr lower 32 bits,
32524  *                   queue_ptr_hi = queue desc addr higher 32 bits,
32525  *                   queue_no = 16-bit number assigned by host for queue,
32526  *                              stored in bits 15:0 of queue_no field)
32527  */
32528 typedef struct {
32529     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_setup_cmd_fixed_param */
32530     A_UINT32 vdev_id;
32531     wmi_mac_addr peer_macaddr; /* peer mac address */
32532     A_UINT32 tid; /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
32533     A_UINT32 queue_ptr_lo; /* lower 32 bits of queue desc address */
32534     A_UINT32 queue_ptr_hi; /* upper 32 bits of queue desc address */
32535     A_UINT32 queue_no; /* 16-bit number assigned by host for queue,
32536                           stored in bits 15:0 of queue_no field */
32537     A_UINT32 ba_window_size_valid; /* Is ba_window_size valid?
32538                                     * 0 = Invalid, 1 = Valid */
32539     A_UINT32 ba_window_size; /* Valid values: 0 to 256
32540                               * Host sends the message when BA session is
32541                               * established or terminated for the TID. */
32542 } wmi_peer_reorder_queue_setup_cmd_fixed_param;
32543 
32544 typedef struct {
32545     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_per_reorder_q_setup_params_t */
32546     A_UINT32 tid; /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
32547     A_UINT32 queue_ptr_lo; /* lower 32 bits of queue desc address */
32548     A_UINT32 queue_ptr_hi; /* upper 32 bits of queue desc address */
32549     A_UINT32 queue_no; /* 16-bit number assigned by host for queue,
32550                         * stored in bits 15:0 of queue_no field */
32551     A_UINT32 ba_window_size_valid; /* Is ba_window_size valid?
32552                                     * 0 = Invalid, 1 = Valid */
32553     A_UINT32 ba_window_size; /* Valid values: 0 to 256
32554                               * Host sends the message when BA session is
32555                               * established or terminated for the TID. */
32556 } wmi_peer_per_reorder_q_setup_params_t;
32557 
32558 /**
32559  * This command is sent from WLAN host driver to firmware for
32560  * plugging in reorder queue desc to hw for multiple TIDs in one shot.
32561  *
32562  * Example: plug-in queue desc
32563  *    host->target: WMI_PEER_MULTIPLE_REORDER_QUEUE_SETUP_CMDID,
32564  *                  (vdev_id = PEER vdev id,
32565  *                   peer_macaddr = PEER mac addr)
32566  */
32567 typedef struct {
32568     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_multiple_reorder_queue_setup_cmd_fixed_param */
32569     A_UINT32 vdev_id;
32570     wmi_mac_addr peer_macaddr; /* peer mac address */
32571 /*
32572  * This struct is followed by other TLVs:
32573  *   wmi_peer_per_reorder_q_setup_params_t q_setup_params[num_queues];
32574  */
32575 } wmi_peer_multiple_reorder_queue_setup_cmd_fixed_param;
32576 
32577 /**
32578  * This command is sent from WLAN host driver to firmware for
32579  * removing one or more reorder queue desc to lithium hw.
32580  *
32581  * Example: remove queue desc for all TIDs
32582  *    host->target: WMI_PEER_REORDER_REMOVE_CMDID,
32583  *                  (vdev_id = PEER vdev id,
32584  *                   peer_macaddr = PEER mac addr,
32585  *                   tid = 0x1FFFF,
32586  */
32587 typedef struct {
32588     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_remove_cmd_fixed_param */
32589     A_UINT32 vdev_id;
32590     wmi_mac_addr peer_macaddr; /* peer mac address */
32591     A_UINT32 tid_mask; /* bits 0 to 15 = QoS TIDs, bit 16 = non-qos TID */
32592 } wmi_peer_reorder_queue_remove_cmd_fixed_param;
32593 
32594 
32595 /* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param instead */
32596 typedef struct {
32597     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param */
32598     /**  Set Dual MAC Config Response Event  **/
32599 
32600     /* Status for set_dual_mac_config command */
32601     /*
32602      * Values for Status:
32603      *  0 - OK; command successful
32604      *  1 - EINVAL; Requested invalid hw_mode
32605      *  3 - ENOTSUP; HW mode not supported
32606      *  4 - EHARDWARE; HW mode change prevented by hardware
32607      *  6 - ECOEX; HW mode change conflict with Coex
32608      */
32609     A_UINT32 status;
32610 
32611 } wmi_soc_set_dual_mac_config_response_event_fixed_param;
32612 
32613 typedef struct {
32614     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param */
32615     /**  Set Dual MAC Config Response Event  **/
32616 
32617     /** pdev_id for identifying the MAC
32618      * See macros starting with WMI_PDEV_ID_ for values.
32619      */
32620     A_UINT32 pdev_id;
32621 
32622     /* Status for set_dual_mac_config command */
32623     /*
32624      * Values for Status:
32625      *  0 - OK; command successful
32626      *  1 - EINVAL; Requested invalid hw_mode
32627      *  3 - ENOTSUP; HW mode not supported
32628      *  4 - EHARDWARE; HW mode change prevented by hardware
32629      *  6 - ECOEX; HW mode change conflict with Coex
32630      */
32631      A_UINT32 status;
32632 } wmi_pdev_set_mac_config_response_event_fixed_param;
32633 
32634 typedef enum {
32635     MAWC_MOTION_STATE_UNKNOWN,
32636     MAWC_MOTION_STATE_STATIONARY,
32637     MAWC_MOTION_STATE_WALK,
32638     MAWC_MOTION_STATE_TRANSIT,
32639 } MAWC_MOTION_STATE;
32640 
32641 typedef enum {
32642     MAWC_SENSOR_STATUS_OK,
32643     MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
32644     MAWC_SENSOR_STATUS_SHUTDOWN,
32645 } MAWC_SENSOR_STATUS;
32646 
32647 typedef struct {
32648     /* TLV tag and len; tag equals
32649      * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
32650     A_UINT32 tlv_header;
32651     /** new motion state, MAWC_MOTION_STATE */
32652     A_UINT32 motion_state;
32653     /** status code of sensor, MAWC_SENSOR_STATUS */
32654     A_UINT32 sensor_status;
32655 } wmi_mawc_sensor_report_ind_cmd_fixed_param;
32656 
32657 /* MBO flag field definition */
32658 /* Bit 0: 0 - Allow to connect to both MBO and non-MBO AP
32659  *        1 - Allow to connect to MBO AP only
32660  * Bit 1-31 : reserved.
32661  */
32662 #define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE  (1<<0) /* DEPRECATED */
32663 
32664 typedef struct {
32665     /* TLV tag and len; tag equals
32666      * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param */
32667     A_UINT32 tlv_header;
32668     /** vdev id */
32669     A_UINT32 vdev_id;
32670     /** enable or disable MBO */
32671     A_UINT32 enable;
32672     /** MBO flags, refer to definition of MBO flags*/
32673     A_UINT32 flags;
32674 } wmi_roam_set_mbo_fixed_param; /* DEPRECATED */
32675 
32676 typedef struct {
32677     /* TLV tag and len; tag equals
32678      * WMITLV_TAG_ARRAY_STRUC */
32679     A_UINT32 tlv_header;
32680     /** Current operating class number */
32681     A_UINT32 cur_op_class;
32682     /** Country string of current reg domain,
32683      * the expected value should be same as country str defined
32684      * in country IE.
32685      * 3 octets (COUNTRY_STR) + 1 octet (always 0)
32686      * The ordering of this array must be maintained,
32687      * even when a big-endian host's WMI messages undergo
32688      * automatic byte reordering for conversion to the
32689      * little-endian ordering required by the target.
32690      * On big-endian hosts, this array may need to be byte-swapped
32691      * by the host, so the subsequent automatic byte-swap
32692      * will result in the correct final byte order.
32693      * global operating class: set country_str[0]=0
32694      */
32695     A_UINT8 country_str[4];
32696     /** Supported operating class number in current regdomain */
32697     A_UINT32 supp_op_class_num;
32698     /* The TLVs will follow. */
32699     /* A_UINT32 supp_op_class_list[] */
32700 } wmi_supported_operating_class_param;
32701 
32702 typedef struct {
32703     /* TLV tag and len; tag equals
32704      * WMITLV_TAG_ARRAY_STRUC */
32705     A_UINT32 tlv_header;
32706     /** non preferred channel attribute length */
32707     A_UINT32 non_prefer_ch_attr_len;
32708     /* The TLVs will follow. */
32709     /** A_UINT8 non_prefer_ch_attr[];*/
32710 } wmi_mbo_non_preferred_channel_report_param;
32711 
32712 typedef struct {
32713     /* TLV tag and len; tag equals
32714      * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
32715     A_UINT32 tlv_header;
32716     /* enable(1) or disable(0) */
32717     A_UINT32 enable;
32718 } wmi_mawc_enable_sensor_event_fixed_param;
32719 
32720 typedef struct {
32721     /* TLV tag and len; tag equals
32722      * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
32723     A_UINT32 tlv_header;
32724     /* Unique id identifying the VDEV */
32725     A_UINT32 vdev_id;
32726     /* enable(1) or disable(0) MAWC */
32727     A_UINT32 enable;
32728     /* ratio of skipping suppressing scan, skip one out of x */
32729     A_UINT32 suppress_ratio;
32730 } wmi_extscan_configure_mawc_cmd_fixed_param;
32731 
32732 typedef struct {
32733     /* TLV tag and len; tag equals
32734      * WMITLV_TAG_STRUC_wmi_roam_per_config_fixed_param */
32735     A_UINT32 tlv_header;
32736     /* Unique id identifying the VDEV */
32737     A_UINT32 vdev_id;
32738     /* enable(1) or disable(0) packet error rate trigger for roaming */
32739     A_UINT32 enable;
32740     /* high_rate_thresh, low_rate_thresh, pkt_err_rate_thresh_pct:
32741      * If PER monitoring as a trigger for roaming is enabled,
32742      * it is controlled by high_rate_thresh, low_rate_thresh, and
32743      * pkt_err_rate_thresh_pct.
32744      * PER monitoring is performed only when the time-averaged throughput
32745      * is less than high_rate_thresh.
32746      * During PER monitoring, the target keeps track of the PHY rate for
32747      * each of the first N PPDUs within a time window.
32748      * If the number of PPDUs with PHY rate < low_rate_thresh exceeds
32749      * N * pkt_err_rate_thresh_pct / 100, roaming will be triggered.
32750      *
32751      * This PER monitoring as a trigger for roaming is performed
32752      * concurrently but independently for rx and tx.
32753      */
32754     A_UINT32 high_rate_thresh; /* units = Kbps */
32755     A_UINT32 low_rate_thresh; /* units = Kbps */
32756     A_UINT32 pkt_err_rate_thresh_pct;
32757     /*
32758      * rest time after associating to a new AP before
32759      * starting to monitor PER as a roaming trigger,
32760      * (units are seconds)
32761      */
32762     A_UINT32 per_rest_time;
32763     /* This is the total time for which PER monitoring will be run.
32764      * After completion of time windows, the average PER over the window
32765      * will be computed.
32766      * The parameter value stores specifications for both TX and RX
32767      * monitor times.
32768      * The two least-significant bytes (0 & 1) hold the RX monitor time;
32769      * the two most-significant bytes (2 & 3) hold the TX monitor time.
32770      */
32771     A_UINT32 pkt_err_rate_mon_time; /* units = seconds */
32772     /* Minimum roamable AP RSSI for candidate selection for PER based roam */
32773     A_INT32 min_candidate_rssi; /* units = dBm */
32774 } wmi_roam_per_config_fixed_param;
32775 
32776 typedef struct {
32777     /* TLV tag and len; tag equals
32778      * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
32779     A_UINT32 tlv_header;
32780     /* Unique id identifying the VDEV */
32781     A_UINT32 vdev_id;
32782     /* enable(1) or disable(0) MAWC */
32783     A_UINT32 enable;
32784     /* ratio of exponential backoff, next = current + current*ratio/100 */
32785     A_UINT32 exp_backoff_ratio;
32786     /* initial scan interval(msec) */
32787     A_UINT32 init_scan_interval;
32788     /* max scan interval(msec) */
32789     A_UINT32 max_scan_interval;
32790 } wmi_nlo_configure_mawc_cmd_fixed_param;
32791 
32792 typedef struct {
32793     /* TLV tag and len; tag equals
32794      * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
32795     A_UINT32 tlv_header;
32796     /* Unique id identifying the VDEV */
32797     A_UINT32 vdev_id;
32798     /* enable(1) or disable(0) MAWC */
32799     A_UINT32 enable;
32800     /* data traffic load (kBps) to register CMC */
32801     A_UINT32 traffic_load_threshold;
32802     /* RSSI threshold (dBm) to scan for Best AP */
32803     A_UINT32 best_ap_rssi_threshold;
32804     /* high RSSI threshold adjustment in Stationary to suppress scan */
32805     A_UINT32 rssi_stationary_high_adjust;
32806     /* low RSSI threshold adjustment in Stationary to suppress scan */
32807     A_UINT32 rssi_stationary_low_adjust;
32808 } wmi_roam_configure_mawc_cmd_fixed_param;
32809 
32810 #define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD     2
32811 #define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER  5
32812 
32813 typedef enum {
32814     PACKET_FILTER_TYPE_INVALID = 0,
32815     PACKET_FILTER_TYPE_FILTER_PKT,
32816     PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
32817     PACKET_FILTER_TYPE_MAX_ENUM_SIZE
32818 } WMI_PACKET_FILTER_FILTER_TYPE;
32819 
32820 typedef enum {
32821     PACKET_FILTER_PROTO_TYPE_INVALID = 0,
32822 
32823     /* L2 header */
32824     PACKET_FILTER_PROTO_TYPE_MAC,
32825     PACKET_FILTER_PROTO_TYPE_SNAP,
32826 
32827     /* L3 header (EtherType) */
32828     PACKET_FILTER_PROTO_TYPE_IPV4,
32829     PACKET_FILTER_PROTO_TYPE_IPV6,
32830 
32831     /* L4 header (IP protocol) */
32832     PACKET_FILTER_PROTO_TYPE_UDP,
32833     PACKET_FILTER_PROTO_TYPE_TCP,
32834     PACKET_FILTER_PROTO_TYPE_ICMPV6,
32835 
32836     PACKET_FILTER_PROTO_TYPE_MAX
32837 } WMI_PACKET_FILTER_PROTO_TYPE;
32838 
32839 typedef enum {
32840     PACKET_FILTER_CMP_TYPE_INVALID = 0,
32841     PACKET_FILTER_CMP_TYPE_EQUAL,
32842     PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
32843     PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
32844     PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
32845     PACKET_FILTER_CMP_TYPE_ADDRTYPE,
32846     PACKET_FILTER_CMP_TYPE_MAX
32847 } WMI_PACKET_FILTER_CMP_TYPE;
32848 
32849 typedef enum {
32850     PACKET_FILTER_SET_INACTIVE = 0,
32851     PACKET_FILTER_SET_ACTIVE
32852 } WMI_PACKET_FILTER_ACTION;
32853 
32854 typedef enum {
32855     PACKET_FILTER_SET_DISABLE = 0,
32856     PACKET_FILTER_SET_ENABLE
32857 } WMI_PACKET_FILTER_RUNTIME_ENABLE;
32858 
32859 typedef struct {
32860     A_UINT32  proto_type;
32861     A_UINT32  cmp_type;
32862     A_UINT32  data_length; /* Length of the data to compare (units = bytes) */
32863     A_UINT32  data_offset; /* from start of the respective frame header (units = bytes) */
32864     A_UINT32  compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Data to compare, little-endian order */
32865     A_UINT32  dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Mask to be applied on rcvd packet data before compare, little-endian order */
32866 } WMI_PACKET_FILTER_PARAMS_TYPE;
32867 
32868 typedef struct {
32869     A_UINT32  tlv_header;
32870     A_UINT32  vdev_id;
32871     A_UINT32  filter_id;
32872     A_UINT32  filter_action; /* WMI_PACKET_FILTER_ACTION */
32873     A_UINT32  filter_type;
32874     A_UINT32  num_params; /* how many entries in paramsData are valid */
32875     A_UINT32  coalesce_time; /* not currently used - fill with 0x0 */
32876     WMI_PACKET_FILTER_PARAMS_TYPE  paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
32877     /* deprecated0:
32878      * This field simply provides filler space to retain the original message
32879      * format while reducing WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER
32880      * from 10 to 5.
32881      */
32882     WMI_PACKET_FILTER_PARAMS_TYPE  deprecated0[5];
32883 } WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
32884 
32885 /* enable / disable all filters within the specified vdev */
32886 typedef struct {
32887     A_UINT32  tlv_header;
32888     A_UINT32  vdev_id;
32889     A_UINT32  enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
32890 } WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
32891 
32892 #define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS  0
32893 #define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
32894 
32895 #define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
32896     WMI_SET_BITS(tcp_flag_u32, \
32897         WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
32898         WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
32899         tcp_flag_values)
32900 #define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
32901     WMI_GET_BITS(tcp_flag_u32, \
32902         WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
32903         WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
32904 
32905 #define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS  9
32906 #define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
32907 
32908 #define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
32909     WMI_SET_BITS(tcp_flag_u32, \
32910         WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
32911         WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
32912         tcp_flags_mask)
32913 #define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
32914     WMI_GET_BITS(tcp_flag_u32, \
32915         WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
32916         WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
32917 
32918 typedef struct {
32919     A_UINT32 tlv_header;
32920     /**
32921      * @brief lro_enable - indicates whether lro is enabled
32922      * [0] LRO Enable
32923      */
32924     A_UINT32 lro_enable;
32925     /**
32926      * @brief tcp_flag_u32 - mask of which TCP flags to check and
32927      *      values to check for
32928      * [8:0] TCP flag values - If the TCP flags from the packet do not match
32929      *       the values in this field after masking with TCP flags mask below,
32930      *       LRO eligible will not be set
32931      * [17:9] TCP flags mask - Mask field for comparing the TCP values
32932      *       provided above with the TCP flags field in the received packet
32933      * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
32934      * macros to isolate the mask field and values field that are packed
32935      * into this u32 "word".
32936      */
32937     A_UINT32 tcp_flag_u32;
32938     /**
32939      * @brief toeplitz_hash_ipv4 - contains seed needed to compute
32940      * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
32941      * bytes 0 to 3
32942      *
32943      * In this and all the below toeplitz_hash fields, the bytes are
32944      * specified in little-endian order.  For example:
32945      *     toeplitz_hash_ipv4_0_3 bits 7:0   holds seed byte 0
32946      *     toeplitz_hash_ipv4_0_3 bits 15:8  holds seed byte 1
32947      *     toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
32948      *     toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
32949      */
32950     A_UINT32 toeplitz_hash_ipv4_0_3;
32951 
32952     /**
32953      * @brief toeplitz_hash_ipv4 - contains seed needed to compute
32954      * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
32955      * bytes 4 to 7
32956      */
32957     A_UINT32 toeplitz_hash_ipv4_4_7;
32958 
32959     /**
32960      * @brief toeplitz_hash_ipv4 - contains seed needed to compute
32961      * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
32962      * bytes 8 to 11
32963      */
32964     A_UINT32 toeplitz_hash_ipv4_8_11;
32965 
32966     /**
32967      * @brief toeplitz_hash_ipv4 - contains seed needed to compute
32968      * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
32969      * bytes 12 to 15
32970      */
32971     A_UINT32 toeplitz_hash_ipv4_12_15;
32972 
32973     /**
32974      * @brief toeplitz_hash_ipv4 - contains seed needed to compute
32975      * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
32976      * byte 16
32977      */
32978     A_UINT32 toeplitz_hash_ipv4_16;
32979 
32980     /**
32981      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
32982      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
32983      * bytes 0 to 3
32984      */
32985     A_UINT32 toeplitz_hash_ipv6_0_3;
32986 
32987     /**
32988      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
32989      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
32990      * bytes 4 to 7
32991      */
32992     A_UINT32 toeplitz_hash_ipv6_4_7;
32993 
32994     /**
32995      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
32996      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
32997      * bytes 8 to 11
32998      */
32999     A_UINT32 toeplitz_hash_ipv6_8_11;
33000 
33001     /**
33002      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
33003      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
33004      * bytes 12 to 15
33005      */
33006     A_UINT32 toeplitz_hash_ipv6_12_15;
33007 
33008     /**
33009      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
33010      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
33011      * bytes 16 to 19
33012      */
33013     A_UINT32 toeplitz_hash_ipv6_16_19;
33014 
33015     /**
33016      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
33017      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
33018      * bytes 20 to 22
33019      */
33020     A_UINT32 toeplitz_hash_ipv6_20_23;
33021 
33022     /**
33023      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
33024      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
33025      * bytes 24 to 27
33026      */
33027     A_UINT32 toeplitz_hash_ipv6_24_27;
33028 
33029     /**
33030      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
33031      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
33032      * bytes 28 to 31
33033      */
33034     A_UINT32 toeplitz_hash_ipv6_28_31;
33035 
33036     /**
33037      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
33038      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
33039      * bytes 32 to 35
33040      */
33041     A_UINT32 toeplitz_hash_ipv6_32_35;
33042 
33043     /**
33044      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
33045      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
33046      * bytes 36 to 39
33047      */
33048     A_UINT32 toeplitz_hash_ipv6_36_39;
33049 
33050     /**
33051      * @brief toeplitz_hash_ipv6 - contains seed needed to compute
33052      * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
33053      * byte 40
33054      */
33055     A_UINT32 toeplitz_hash_ipv6_40;
33056 
33057     /**
33058      * @brief pdev_id - identifies the MAC
33059      * See macros starting with WMI_PDEV_ID_ for values.
33060      */
33061     A_UINT32 pdev_id;
33062 } wmi_lro_info_cmd_fixed_param;
33063 
33064 typedef struct {
33065     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param  */
33066     A_UINT32 offset; /* flash offset to write, starting from 0 */
33067     A_UINT32 length; /* valid data length in buffer, unit: byte */
33068 } wmi_transfer_data_to_flash_cmd_fixed_param;
33069 
33070 typedef struct {
33071     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param */
33072     /** Return status. 0 for success, non-zero otherwise */
33073     A_UINT32 status;
33074 } wmi_transfer_data_to_flash_complete_event_fixed_param;
33075 
33076 typedef struct {
33077     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_cmd_fixed_param  */
33078     A_UINT32 offset; /* flash offset to read, starting from 0 */
33079     A_UINT32 length; /* data length to read, unit: byte */
33080 } wmi_read_data_from_flash_cmd_fixed_param;
33081 
33082 typedef struct {
33083     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_event_fixed_param */
33084     A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */
33085     A_UINT32 offset; /* flash offset reading from, starting from 0 */
33086     A_UINT32 length; /* length of data being reported, unit: byte */
33087 } wmi_read_data_from_flash_event_fixed_param;
33088 
33089 typedef enum {
33090     ENHANCED_MCAST_FILTER_DISABLED,
33091     ENHANCED_MCAST_FILTER_ENABLED
33092 } ENHANCED_MCAST_FILTER_CONFIG;
33093 
33094 /*
33095  * Command to enable/disable filtering of multicast IP with unicast mac
33096  */
33097 typedef struct {
33098     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param */
33099     /* Unique id identifying the VDEV */
33100     A_UINT32 vdev_id;
33101     /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */
33102     A_UINT32 enable;
33103 } wmi_config_enhanced_mcast_filter_cmd_fixed_param;
33104 
33105 typedef struct {
33106     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param */
33107     A_UINT32 tlv_header;
33108     /** unique id identifying the VDEV, generated by the caller */
33109     A_UINT32 vdev_id;
33110     /** WISA enable / disable mode */
33111     A_UINT32 wisa_mode;
33112 } wmi_vdev_wisa_cmd_fixed_param;
33113 
33114 /*
33115  * This structure is used to report SMPS force mode set complete to host.
33116  */
33117 typedef struct {
33118     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param */
33119     /* Unique id identifying the VDEV */
33120     A_UINT32 vdev_id;
33121     /* Return status. 0 for success, non-zero otherwise */
33122     A_UINT32 status;
33123 } wmi_sta_smps_force_mode_complete_event_fixed_param;
33124 
33125 /*
33126  * This structure is used to report SCPC calibrated data to host.
33127  */
33128 typedef struct {
33129     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param */
33130     /** number of BDF patches. Each patch contains offset, length and data */
33131     A_UINT32 num_patch;
33132 /*  This TLV is followed by another TLV of array of bytes
33133  *  A_UINT8 data[];
33134  *  This data array contains, for example
33135  *  patch1 offset(byte3~0),   patch1 data length(byte7~4),   patch1 data(byte11~8)
33136  *  patch2 offset(byte15~12), patch2 data length(byte19~16), patch2 data(byte47~20)
33137  *
33138  */
33139 } wmi_scpc_event_fixed_param;
33140 
33141 typedef enum {
33142     FW_ACTIVE_BPF_MODE_DISABLE =         (1 << 1),
33143     FW_ACTIVE_BPF_MODE_FORCE_ENABLE =    (1 << 2),
33144     FW_ACTIVE_BPF_MODE_ADAPTIVE_ENABLE = (1 << 3),
33145 } FW_ACTIVE_BPF_MODE;
33146 
33147 /* bpf interface structure */
33148 typedef struct wmi_bpf_get_capability_cmd_s {
33149     A_UINT32 tlv_header;
33150     A_UINT32 reserved;  /* reserved for future use - must be filled with 0x0 */
33151 } wmi_bpf_get_capability_cmd_fixed_param;
33152 
33153 typedef struct wmi_bpf_capability_info_evt_s {
33154     A_UINT32 tlv_header;
33155     A_UINT32 bpf_version; /* fw's implement version */
33156     A_UINT32 max_bpf_filters; /* max filters that fw supports */
33157     A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
33158     A_UINT32 fw_active_bpf_support_mcbc_modes; /* multicast/broadcast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
33159     A_UINT32 fw_active_bpf_support_uc_modes; /* unicast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
33160 } wmi_bpf_capability_info_evt_fixed_param;
33161 
33162 /* bit 0 of flags: report counters */
33163 #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S  0
33164 #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M  0x1
33165 typedef struct wmi_bpf_get_vdev_stats_cmd_s {
33166     A_UINT32 tlv_header;
33167     A_UINT32 flags;
33168     A_UINT32 vdev_id;
33169 } wmi_bpf_get_vdev_stats_cmd_fixed_param;
33170 
33171 typedef struct wmi_bpf_vdev_stats_info_evt_s {
33172     A_UINT32 tlv_header;
33173     A_UINT32 vdev_id;
33174     A_UINT32 num_filters;
33175     A_UINT32 num_checked_pkts;
33176     A_UINT32 num_dropped_pkts;
33177 } wmi_bpf_vdev_stats_info_evt_fixed_param;
33178 
33179 typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
33180     A_UINT32 tlv_header;
33181     A_UINT32 vdev_id;
33182     A_UINT32 filter_id;
33183     A_UINT32 bpf_version;  /* host bpf version */
33184     A_UINT32 total_length;
33185     A_UINT32 current_offset;
33186     A_UINT32 current_length;
33187 /*
33188  * The TLV follows:
33189  *    A_UINT8  buf_inst[]; <-- Variable length buffer for the instuctions
33190  */
33191 } wmi_bpf_set_vdev_instructions_cmd_fixed_param;
33192 
33193 #define BPF_FILTER_ID_ALL  0xFFFFFFFF
33194 typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
33195     A_UINT32 tlv_header;
33196     A_UINT32 vdev_id;
33197     A_UINT32 filter_id;  /* BPF_FILTER_ID_ALL means delete all */
33198 } wmi_bpf_del_vdev_instructions_cmd_fixed_param;
33199 
33200 typedef struct wmi_bpf_set_vdev_active_mode_cmd_s {
33201     A_UINT32 tlv_header;
33202     A_UINT32 vdev_id;
33203     A_UINT32 mcbc_mode; /* refer to FW_ACTIVE_BPF_MODE */
33204     A_UINT32 uc_mode; /* refer to FW_ACTIVE_BPF_MODE */
33205 } wmi_bpf_set_vdev_active_mode_cmd_fixed_param;
33206 
33207 typedef struct wmi_bpf_set_vdev_enable_cmd_s {
33208     A_UINT32 tlv_header;
33209     A_UINT32 vdev_id;
33210     A_UINT32 is_enabled; /* fw assume host default enables */
33211 } wmi_bpf_set_vdev_enable_cmd_fixed_param;
33212 
33213 typedef struct wmi_bpf_set_vdev_work_memory_cmd_s {
33214     A_UINT32 tlv_header;
33215     A_UINT32 vdev_id;
33216     A_UINT32 bpf_version; /* bpf instruction version */
33217     A_UINT32 program_len; /* the program length may be changed by this command */
33218     A_UINT32 addr_offset; /* start writing addr in the working memory */
33219     A_UINT32 length;      /* the writing size of this command (byte units) */
33220 /*
33221  * The TLV follows:
33222  *  A_UINT8 buf_inst[]; <-- Variable length buffer with the data to write
33223  */
33224 } wmi_bpf_set_vdev_work_memory_cmd_fixed_param;
33225 
33226 typedef struct wmi_bpf_get_vdev_work_memory_cmd_s {
33227     A_UINT32 tlv_header;
33228     A_UINT32 vdev_id;
33229     A_UINT32 addr_offset; /* start reading addr in the working memory */
33230     A_UINT32 length;      /* reading size from addr (byte units) */
33231 } wmi_bpf_get_vdev_work_memory_cmd_fixed_param;
33232 
33233 typedef struct wmi_bpf_get_vdev_work_memory_resp_evt_s {
33234     A_UINT32 tlv_header;
33235     A_UINT32 vdev_id;
33236     A_UINT32 offset;    /* read memory offset from start_addr */
33237     A_UINT32 length;    /* read memory length of this command */
33238     A_UINT32 fragment;  /* 1 means more data will come, 0 means last fragment */
33239 /*
33240  * The TLV follows:
33241  *  A_UINT8 buf_inst[]; <-- Variable length buffer containing the read data
33242  */
33243 } wmi_bpf_get_vdev_work_memory_resp_evt_fixed_param;
33244 
33245 #define AES_BLOCK_LEN           16  /* in bytes */
33246 #define FIPS_KEY_LENGTH_128     16  /* in bytes */
33247 #define FIPS_KEY_LENGTH_256     32  /* in bytes */
33248 #define FIPS_ENCRYPT_CMD        0
33249 #define FIPS_DECRYPT_CMD        1
33250 #define FIPS_ENGINE_AES_CTR     0
33251 #define FIPS_ENGINE_AES_MIC     1
33252 #define FIPS_ERROR_OPER_TIMEOUT 1
33253 
33254 typedef enum {
33255     WMI_FIPS_KEY_CIPHER_CCM,
33256     WMI_FIPS_KEY_CIPHER_GCM
33257 } wmi_fips_key_cipher;
33258 
33259 typedef enum {
33260     WMI_FIPS_DISABLE,
33261     WMI_FIPS_ENABLE
33262 } wmi_fips_mode_set;
33263 
33264 /* WMI_PDEV_FIPS_CMDID */
33265 typedef struct {
33266     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param */
33267 
33268     union {
33269         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
33270         /** pdev_id for identifying the MAC
33271          * See macros starting with WMI_PDEV_ID_ for values.
33272          */
33273         A_UINT32 pdev_id;
33274     };
33275 
33276     A_UINT32 fips_cmd;            /* FIPS_ENCRYPT or FIPS_DECRYPT */
33277     A_UINT32 mode;                /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
33278     A_UINT32 key_len;             /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
33279     A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
33280     A_UINT32 data_len;            /* data length */
33281 /*
33282  * Following this structure is the TLV:
33283  * A_UINT32 data[1]; <-- In Data (keep this in the end)
33284  */
33285 } wmi_pdev_fips_cmd_fixed_param;
33286 
33287 #define MAX_IVNONCE_LEN_FIPS_EXTEND 16
33288 
33289 typedef struct {
33290     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_extend_cmd_init_params */
33291 
33292     A_UINT32 fips_cmd;            /* FIPS_ENCRYPT or FIPS_DECRYPT */
33293     A_UINT32 key_cipher;          /* CCM or GCM */
33294 
33295     A_UINT32 key_len;             /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256: 16/32 bytes */
33296 
33297     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). */
33298     A_UINT32 nonce_iv_len;
33299     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).*/
33300     A_UINT32 tag_len;        /* 8 or 16  */
33301     A_UINT32 aad_len;
33302     A_UINT32 payload_len;/* Plaintext length */
33303 } wmi_fips_extend_cmd_init_params;
33304 
33305 typedef struct {
33306     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_extend_cmd_fixed_param */
33307 
33308     A_UINT32 pdev_id;
33309     A_UINT32 fips_cookie;        /* Cookie value to identify test vector */
33310     A_UINT32 frag_idx;           /* Fragment Number */
33311     A_UINT32 more_bit;           /* Set to 0 for last fragment number */
33312     A_UINT32 data_len;            /* data length ()*/
33313 
33314 /*
33315  * Following this structure are the TLVs:
33316  *     wmi_fips_extend_cmd_init_params cmd_params
33317  *     A_UINT32 data[1]; <-- In Data ((aad, payload in order))
33318  */
33319 } wmi_pdev_fips_extend_cmd_fixed_param;
33320 
33321 typedef struct {
33322      A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_extend_cmd_fixed_param */
33323 
33324      A_UINT32 pdev_id;
33325      A_UINT32 fips_mode_set;        /*FIPS_MODE_ENABLE -Enable, FIPS_MODE_DISABLE -disable  */
33326 } wmi_pdev_fips_mode_set_cmd_fixed_param;
33327 
33328 typedef struct {
33329     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_featureset_cmd_fixed_param */
33330 
33331 /*
33332  * Following this structure are the TLVs:
33333  *     A_UINT32 feature_set_bitmap[];   <-- Host supported feature info,
33334  *                                          array length is equal to
33335  *                                          WMI_FEATURE_SET_BITMAP_ARRAY_LEN32.
33336  */
33337 } wmi_pdev_featureset_cmd_fixed_param;
33338 
33339 typedef struct {
33340     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param */
33341     union {
33342         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
33343         /** pdev_id for identifying the MAC
33344          * See macros starting with WMI_PDEV_ID_ for values.
33345          */
33346         A_UINT32 pdev_id;
33347     };
33348     A_UINT32 enable;              /* 1:enable, 0:disable */
33349     A_UINT32 mode;                /* 1:GPIO parallel mode, 0:GPIO serial mode */
33350     A_UINT32 rx_antenna;          /* rx antenna */
33351     A_UINT32 tx_default_antenna;  /* tx default antenna */
33352    /*
33353     * Following this structure is the TLV:
33354     * wmi_pdev_smart_ant_gpio_handle
33355     */
33356 } wmi_pdev_smart_ant_enable_cmd_fixed_param;
33357 
33358 /** GPIO pins/function values to control antennas */
33359 typedef struct {
33360     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle */
33361     A_UINT32 gpio_pin;   /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
33362     A_UINT32 gpio_func;  /* GPIO function values for Smart Antenna */
33363     /** pdev_id for identifying the MAC
33364      * See macros starting with WMI_PDEV_ID_ for values.
33365      */
33366     A_UINT32 pdev_id;
33367 } wmi_pdev_smart_ant_gpio_handle;
33368 
33369 typedef struct {
33370     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param */
33371     union {
33372         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
33373         /** pdev_id for identifying the MAC
33374          * See macros starting with WMI_PDEV_ID_ for values.
33375          */
33376         A_UINT32 pdev_id;
33377     };
33378     A_UINT32 rx_antenna;
33379 } wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
33380 
33381 typedef struct {
33382     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param */
33383     /** unique id identifying the vdev, generated by the caller */
33384     A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
33385     /** peer MAC address */
33386     wmi_mac_addr peer_macaddr;
33387    /*
33388     * Following this structure is the TLV:
33389     * wmi_peer_smart_ant_set_tx_antenna_series
33390     */
33391 } wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
33392 
33393 typedef struct {
33394     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series */
33395     /* antenna array */
33396     A_UINT32 antenna_series;
33397 } wmi_peer_smart_ant_set_tx_antenna_series;
33398 
33399 #define WMI_PER_VALID_BIT_POS     0
33400 #define WMI_PER_VALID_NUM_BITS    1
33401 
33402 #define WMI_GET_PER_VALID(per_threshold) \
33403     WMI_GET_BITS(per_threshold, WMI_PER_VALID_BIT_POS, WMI_PER_VALID_NUM_BITS)
33404 
33405 #define WMI_PER_VALID_SET(per_threshold, value) \
33406     WMI_SET_BITS(per_threshold, WMI_PER_VALID_BIT_POS, WMI_PER_VALID_NUM_BITS, value)
33407 
33408 #define WMI_PER_THRESHOLD_BIT_POS     1
33409 #define WMI_PER_THRESHOLD_NUM_BITS    8
33410 
33411 #define WMI_GET_PER_THRESHOLD(per_threshold) \
33412     WMI_GET_BITS(per_threshold, WMI_PER_THRESHOLD_BIT_POS, WMI_PER_THRESHOLD_NUM_BITS)
33413 
33414 #define WMI_PER_THRESHOLD_SET(per_threshold, value) \
33415     WMI_SET_BITS(per_threshold, WMI_PER_THRESHOLD_BIT_POS, WMI_PER_THRESHOLD_NUM_BITS, value)
33416 
33417 #define WMI_PER_MIN_TX_PKTS_BIT_POS     9
33418 #define WMI_PER_MIN_TX_PKTS_NUM_BITS    16
33419 
33420 #define WMI_GET_PER_MIN_TX_PKTS(per_threshold) \
33421     WMI_GET_BITS(per_threshold, WMI_PER_MIN_TX_PKTS_BIT_POS, WMI_PER_MIN_TX_PKTS_NUM_BITS)
33422 
33423 #define WMI_PER_MIN_TX_PKTS_SET(per_threshold, value) \
33424     WMI_SET_BITS(per_threshold, WMI_PER_MIN_TX_PKTS_BIT_POS, WMI_PER_MIN_TX_PKTS_NUM_BITS, value)
33425 
33426 #define WMI_RATE_SERIES_320_BIT_POS     0
33427 #define WMI_RATE_SERIES_320_NUM_BITS    16
33428 
33429 #define WMI_GET_RATE_SERIES_320(train_rate_series_ext) \
33430     WMI_GET_BITS(train_rate_series_ext, WMI_RATE_SERIES_320_BIT_POS, WMI_RATE_SERIES_320_NUM_BITS)
33431 
33432 #define WMI_SET_RATE_SERIES_320(train_rate_series_ext) \
33433     WMI_SET_BITS(train_rate_series_ext, WMI_RATE_SERIES_320_BIT_POS, WMI_RATE_SERIES_320_NUM_BITS, value)
33434 
33435 typedef struct {
33436     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param */
33437     /* rate array */
33438     union {
33439         /* train_rate_series:
33440          * original name, used for 8-bit rate-code implementations
33441          */
33442         A_UINT32  train_rate_series;
33443         /* train_rate_series_lo:
33444          * Contains the lower 32 bits of rate array, for larger rate-code
33445          * implementations.  This field is paired with train_rate_series_hi.
33446          */
33447         A_UINT32  train_rate_series_lo;
33448     };
33449     /* antenna array */
33450     A_UINT32 train_antenna_series;
33451     /* Rate flags */
33452     /* TODO: For future use? */
33453     A_UINT32 rc_flags;
33454     /* rate array -- continued */
33455     A_UINT32 train_rate_series_hi; /* Higher 32 bits of rate array */
33456     /* train_rate_series_ext:
33457      * 15:0 - 320Mhz rate
33458      * 31:16 - Reserved
33459      */
33460     A_UINT32 train_rate_series_ext; /* For 320Mhz and Reserved for other */
33461 } wmi_peer_smart_ant_set_train_antenna_param;
33462 
33463 typedef struct {
33464     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param */
33465     /** unique id identifying the VDEV, generated by the caller */
33466     A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
33467     /** peer MAC address */
33468     wmi_mac_addr peer_macaddr;
33469     /* num packets; 0-stop training */
33470     A_UINT32 num_pkts;
33471     /* per_threshold:
33472      * bits  | interpretation
33473      * ------+--------------------------
33474      *    0  | PER Threshold is valid
33475      *  1:8  | Per Threshold
33476      *  9:24 | min_tx_pkts Minimum number of pkts need to be checked
33477      * 25:31 | Reserved
33478      */
33479     A_UINT32 per_threshold;
33480 /*
33481  * Following this structure is the TLV:
33482  * wmi_peer_smart_ant_set_train_antenna_param
33483  */
33484 } wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
33485 
33486 typedef struct {
33487     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param */
33488     /** unique id identifying the vdev, generated by the caller */
33489     A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
33490     /** peer MAC address */
33491     wmi_mac_addr peer_macaddr;
33492     /* command id*/
33493     A_UINT32 cmd_id;
33494     /* number of arguments passed */
33495     A_UINT32 args_count;
33496 /*
33497  * Following this structure is the TLV:
33498  * A_UINT32 args[]; <-- argument list
33499  */
33500 } wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
33501 
33502 typedef struct {
33503     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain */
33504     A_UINT32 antCtrlChain;
33505     /** pdev_id for identifying the MAC
33506      * See macros starting with WMI_PDEV_ID_ for values.
33507      */
33508     A_UINT32 pdev_id;
33509 } wmi_pdev_set_ant_ctrl_chain;
33510 
33511 typedef struct {
33512     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param */
33513     A_UINT32 mac_id;     /* MAC ID */
33514     A_UINT32 antCtrlCommon1;
33515     A_UINT32 antCtrlCommon2;
33516    /*
33517     * Following this structure is the TLV:
33518     * wmi_pdev_set_ant_ctrl_chain
33519     */
33520 } wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
33521 
33522 typedef struct {
33523     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param */
33524     union {
33525         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
33526         /** pdev_id for identifying the MAC
33527          * See macros starting with WMI_PDEV_ID_ for values.
33528          */
33529         A_UINT32 pdev_id;
33530     };
33531     /** len of CTL info */
33532     A_UINT32 ctl_len;
33533     /* ctl array (len adjusted to  number of words).
33534      * Following this structure is the TLV:
33535      * A_UINT32 ctl_info[1];
33536      */
33537 } wmi_pdev_set_ctl_table_cmd_fixed_param;
33538 
33539 typedef struct {
33540     A_UINT32    tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_bios_sar_cmd_fixed_param */
33541     A_UINT32    pdev_id;    /* pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
33542     A_UINT32    sar_len;
33543     /*  sar power array are stored in TLV, which follow this structure;
33544      *  sar_len is the number of valid bytes in the sar power array;
33545      *  sar power array contains 22 elements.
33546      *  Each element stores the maximum SAR power on certain band.
33547      *  Its type is A_UINT8 and its unit is 0.25 dBm.
33548      *      sar_power[0] for chain0 2g
33549      *      sar_power[1] for chain0 5g unii-1
33550      *      ...
33551      *      sar_power[4] for chain0 5g unii-4
33552      *      sar_power[5] for chain0 6g unii-5
33553      *      ...
33554      *      sar_power[10] for chain0 6g unii-10
33555      *      sar_power[11] for chain1 2g
33556      *      ...
33557      *      sar_power[21] for chain1 6g unii-10
33558      */
33559 
33560     A_UINT32    dbs_backoff_len;
33561     /*  dbs_backoff follow sar array, its type is A_UINT8;
33562      *  dbs_backoff[0] ~ dbs_backoff[5], these six elements are based on
33563      *  maximum SAR power, and make some offset adjustment in DBS mode.
33564      *  Their unit is 0.25 dB.
33565      *      dbs_backoff[0] for chain 0 2G
33566      *      dbs_backoff[1] for chain 0 5G
33567      *      dbs_backoff[2] for chain 0 6G
33568      *      dbs_backoff[3] for chain 1 2G
33569      *      dbs_backoff[4] for chain 1 5G
33570      *      dbs_backoff[5] for chain 1 6G
33571      */
33572 } wmi_pdev_set_bios_sar_table_cmd_fixed_param;
33573 
33574 typedef struct {
33575     A_UINT32    tlv_header; /*  TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_bios_sar_cmd_fixed_param */
33576     A_UINT32    pdev_id;    /*   pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
33577     A_UINT32    geo_len;
33578     /* geo offset array is in TLV, followed this structure:
33579      * A_UINT8 Geo_offset[];
33580      * Geo_offset array has 18 elements. The meaning of each element is to
33581      * adjust offset based on maximum SAR power according to different regions.
33582      * Its unit is 0.25 dB.
33583      *     Geo_offset[0] chain 0 FCC_Offset on 2G
33584      *     Geo_offset[1] chain 0 FCC_Offset on 5G
33585      *     Geo_offset[2] chain 0 FCC_Offset on 6G
33586      *     Geo_offset[3] chain 0 CE_Offset on 2G
33587      *     Geo_offset[4] chain 0 CE_Offset on 5G
33588      *     Geo_offset[5] chain 0 CE_Offset on 6G
33589      *     Geo_offset[6] chain 0 ROW_Offset on 2G
33590      *     Geo_offset[7] chain 0 ROW_Offset on 5G
33591      *     Geo_offset[8] chain 0 ROW_Offset on 6G
33592      *     Geo_offset[9] chain 1 FCC_Offset on 2G
33593      *     ...
33594      *     Geo_offset[17] chain 1 ROW_Offset on 6G
33595      *  In actual use, FW will subtract an offset value according to the region;
33596      */
33597 } wmi_pdev_set_bios_geo_table_cmd_fixed_param;
33598 
33599 typedef struct {
33600     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_bios_interface_cmd_fixed_param */
33601     A_UINT32 pdev_id;       /* pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
33602     A_UINT32 param_type_id; /* BIOS parameters type, see bios_param_type_e */
33603     /* length:
33604      * Number of valid bytes in A_UINT8 TLV array that follows this
33605      * fixed_param TLV.
33606      * The number of bytes allocated in the A_UINT8 TLV array will be a
33607      * multiple of 4.  The "length" field indicates how many of these
33608      * byte elements contain valid data; the remainder are only for
33609      * alignment padding and should be ignored.
33610      */
33611     A_UINT32 length;
33612     /*  Following this structure is TLV, bios data array */
33613 } wmi_pdev_set_bios_interface_cmd_fixed_param;
33614 
33615 typedef enum {
33616     BIOS_PARAM_CCA_THRESHOLD_TYPE,
33617     /*  CCA THR structure has 29 bytes, it includes control flag and
33618      *  CCA THR parameters;
33619      *
33620      *  If CCA_THR_Control is set 0, FW will still use
33621      *  AGC_ENERGY_DETECT_THRESHOLD.agcEnergyDetThr in BDF, and detailed
33622      *  CCA threshold do not need to be transported.
33623      *  If CCA_THR_Control is set 1, FW needs to use CCA threshold parameters
33624      *  in BIOS, and CCA THR parameters are provided in the subsequent A_UINT8
33625      *  TLV array.
33626      *
33627      *  In CCA THR parameters, ETSI / MKK / CHN use same CCA threshold,
33628      *  and FCC / KOR use same CCA threshold. Its unit is in 1db,
33629      *  which is relative to HW NF value.
33630      *
33631      *  //control flag
33632      *  A_UINT8         CCA_THR_Control
33633      *
33634      *  //5G
33635      *  A_UINT8     agcEnergyDetThr5G_thrCcaPri20dB_ETSI_MKK_CHN
33636      *  A_UINT8     agcEnergyDetThr5G_thrCcaExt20dB_ETSI_MKK_CHN
33637      *  A_UINT8     agcEnergyDetThr5G_thrCcaExt40dB_ETSI_MKK_CHN
33638      *  A_UINT8     agcEnergyDetThr5G_thrCcaExt80dB_ETSI_MKK_CHN
33639      *  A_UINT8     agcEnergyDetThr5G_thrCcaPri20dB_FCC_KOR
33640      *  A_UINT8     agcEnergyDetThr5G_thrCcaExt20dB_FCC_KOR
33641      *  A_UINT8     agcEnergyDetThr5G_thrCcaExt40dB_FCC_KOR
33642      *  A_UINT8     agcEnergyDetThr5G_thrCcaExt80dB_FCC_KOR
33643      *
33644      *  //2G
33645      *  A_UINT8     agcEnergyDetThr2G_thrCcaPri20dB_ETSI_MKK_CHN
33646      *  A_UINT8     agcEnergyDetThr2G_thrCcaExt20dB_ETSI_MKK_CHN
33647      *  A_UINT8     agcEnergyDetThr2G_thrCcaExt40dB_ETSI_MKK_CHN
33648      *  A_UINT8     agcEnergyDetThr2G_thrCcaExt80dB_ETSI_MKK_CHN
33649      *  A_UINT8     agcEnergyDetThr2G_thrCcaPri20dB_FCC_KOR
33650      *  A_UINT8     agcEnergyDetThr2G_thrCcaExt20dB_FCC_KOR
33651      *  A_UINT8     agcEnergyDetThr2G_hrCcaExt40dB_FCC_KOR
33652      *  A_UINT8     agcEnergyDetThr2G_hrCcaExt80dB_FCC_KOR
33653      *
33654      *  //6G
33655      *  A_UINT8     agcEnergyDetThr6G_thrCcaPri20dB_FCC_KOR
33656      *  A_UINT8     agcEnergyDetThr6G_thrCcaExt20dB_FCC_KOR
33657      *  A_UINT8     agcEnergyDetThr6G_thrCcaExt40dB_FCC_KOR
33658      *  A_UINT8     agcEnergyDetThr6G_thrCcaExt80dB_FCC_KOR
33659      *
33660      *  //6G-LPI/VLP
33661      *  A_UINT8     agcEnergyDetThr6GLPI.thrCcaPri20dB_ETSI_MKK_CHN
33662      *  A_UINT8     agcEnergyDetThr6GLPI thrCcaExt20dB_ETSI_MKK_CHN
33663      *  A_UINT8     agcEnergyDetThr6GLPI thrCcaExt40dB_ETSI_MKK_CHN
33664      *  A_UINT8     agcEnergyDetThr6GLPI.thrCcaExt80dB_ETSI_MKK_CHN
33665      *  A_UINT8     agcEnergyDetThr6GVLP.thrCcaPri20dB_ETSI_MKK_CHN
33666      *  A_UINT8     agcEnergyDetThr6GVLP thrCcaExt20dB_ETSI_MKK_CHN
33667      *  A_UINT8     agcEnergyDetThr6GVLP thrCcaExt40dB_ETSI_MKK_CHN
33668      *  A_UINT8     agcEnergyDetThr6GVLP.thrCcaExt80dB_ETSI_MKK_CHN
33669      */
33670 
33671     BIOS_PARAM_TAS_CONFIG_TYPE,
33672     /*
33673      *  BIOS_PARAM_TAS_CONFIG_TYPE Structure has 108 bytes. Please Note these fields of A_UINT32 or A_INT32.
33674      *  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.
33675      *  PowerLimitIndicator points out which region(FCC OR ICNIRP) power limit value should be used.
33676      *  A bit of PowerLimitIndicator maps a country. bit value 0: ICNIRP 1: FCC
33677      *
33678      *  A_UINT8       Version
33679      *  A_UINT8       TASIsPairWith3rdPartyWwan
33680      *  A_UINT8       SARAntennaGroupingExt[6]  (6 Bytes)
33681      *  A_UINT32      TASPeakModeIndicator[8]  (32 Bytes)
33682      *  A_UINT32      TAS_FCC_ICNIRP_Indicator[8] (32 Bytes)
33683      *  A_UINT32      PowerLimitIndicator[8] (32 Bytes)
33684      *  A_UINT8       reserveMarginDb (1 Bytes)
33685      *  A_UINT8       reserved[3] (3 Bytes)
33686      */
33687 
33688     BIOS_PARAM_TAS_DATA_TYPE,
33689     /*
33690      *  BIOS_PARAM_TAS_DATA_TYPE Structure has 69 bytes as below, power limit value unit is 0.25 dBm.
33691      *  If Enable flag is 0, FW will not use power limit value of bios.
33692      *
33693      *  A_UINT8 Version
33694      *  A_UINT8 Enable Flag
33695      *  A_UINT8 Power Table Index
33696      *  ====================FCC POWER LIMIT VALUE======================
33697      *  A_INT8  FCC 2 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm)
33698      *  A_INT8  FCC 2 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm)
33699      *  A_INT8  FCC 2 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm)
33700      *  A_INT8  FCC 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
33701      *  A_INT8  FCC 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
33702      *  A_INT8  FCC 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
33703      *  A_INT8  FCC 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
33704      *  A_INT8  FCC 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
33705      *  A_INT8  FCC 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
33706      *  A_INT8  FCC 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
33707      *  A_INT8  FCC 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
33708      *  A_INT8  FCC 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
33709      *  A_INT8  FCC 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
33710      *  A_INT8  FCC 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
33711      *  A_INT8  FCC 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
33712      *  A_INT8  FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
33713      *  A_INT8  FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
33714      *  A_INT8  FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
33715      *  A_INT8  FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
33716      *  A_INT8  FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
33717      *  A_INT8  FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
33718      *  A_INT8  FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
33719      *  A_INT8  FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
33720      *  A_INT8  FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
33721      *  A_INT8  FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33722      *  A_INT8  FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33723      *  A_INT8  FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33724      *  A_INT8  FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33725      *  A_INT8  FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33726      *  A_INT8  FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33727      *  A_INT8  FCC 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
33728      *  A_INT8  FCC 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
33729      *  A_INT8  FCC 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
33730      *  ====================ICNIRP POWER LIMIT VALUE======================
33731      *  A_INT8  ICNIRP 2 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm)
33732      *  A_INT8  ICNIRP 2 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm)
33733      *  A_INT8  ICNIRP 2 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm)
33734      *  A_INT8  ICNIRP 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
33735      *  A_INT8  ICNIRP 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
33736      *  A_INT8  ICNIRP 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-1, Ch32 ~ Ch48)
33737      *  A_INT8  ICNIRP 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
33738      *  A_INT8  ICNIRP 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
33739      *  A_INT8  ICNIRP 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-2, Ch50 ~ Ch144)
33740      *  A_INT8  ICNIRP 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
33741      *  A_INT8  ICNIRP 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
33742      *  A_INT8  ICNIRP 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-3, Ch149 ~ Ch161)
33743      *  A_INT8  ICNIRP 5 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
33744      *  A_INT8  ICNIRP 5 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
33745      *  A_INT8  ICNIRP 5 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-4, Ch163 ~ Ch177)
33746      *  A_INT8  ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
33747      *  A_INT8  ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
33748      *  A_INT8  ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch1, Ch2 ~ Ch41)
33749      *  A_INT8  ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
33750      *  A_INT8  ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
33751      *  A_INT8  ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-5) (Ch45 ~ Ch93)
33752      *  A_INT8  ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
33753      *  A_INT8  ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
33754      *  A_INT8  ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-6) (Ch97~ Ch113)
33755      *  A_INT8  ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33756      *  A_INT8  ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33757      *  A_INT8  ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33758      *  A_INT8  ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33759      *  A_INT8  ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33760      *  A_INT8  ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-7) (Ch117~Ch149)
33761      *  A_INT8  ICNIRP 6 GHz SISO (Chain0) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
33762      *  A_INT8  ICNIRP 6 GHz SISO (Chain1) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
33763      *  A_INT8  ICNIRP 6 GHz MIMO (Chain0 + Chain1) Power Limit Value(unit: 0.25dBm) (UNII-8) (Ch117~Ch149)
33764      */
33765 
33766     BIOS_PARAM_TYPE_BANDEDGE_CTL_POWER,
33767      /*
33768       *  BIOS_PARAM_TYPE_BANDEDGE_CTL_POWER Structure has 100 bytes as below, CTL limit power unit is 0.25 dBm.
33769       *  If Enable flag is 0, FW will not use power limit value of bios.
33770       *
33771       *  A_UINT8 version
33772       *  A_UINT8 enableFlag  (always 1)
33773       *  A_UINT8 reserved[2]  for 4 byte alignment,
33774 
33775       *  ====================2G CTL POWER LIMIT ======================
33776       *  A_INT8 2G 20M Channel Center Freq 2412 CTL Limit Power SU
33777       *  A_INT8 2G 20M Channel Center Freq 2412 CTL Limit Power OFDMA
33778       *  A_INT8 2G 20M Channel Center Freq 2417 CTL Limit Power SU
33779       *  A_INT8 2G 20M Channel Center Freq 2417 CTL Limit Power OFDMA
33780       *  A_INT8 2G 20M Channel Center Freq 2462 CTL Limit Power SU
33781       *  A_INT8 2G 20M Channel Center Freq 2462 CTL Limit Power OFDMA
33782       *  A_INT8 2G 20M Channel Center Freq 2467 CTL Limit Power SU
33783       *  A_INT8 2G 20M Channel Center Freq 2467 CTL Limit Power OFDMA
33784       *  A_INT8 2G 20M Channel Center Freq 2472 CTL Limit Power SU
33785       *  A_INT8 2G 20M Channel Center Freq 2472 CTL Limit Power OFDMA
33786 
33787       *  A_INT8 2G 40M Channel Center Freq 2422 CTL Limit Power SU
33788       *  A_INT8 2G 40M Channel Center Freq 2422 CTL Limit Power OFDMA
33789       *  A_INT8 2G 40M Channel Center Freq 2427 CTL Limit Power SU
33790       *  A_INT8 2G 40M Channel Center Freq 2427 CTL Limit Power OFDMA
33791       *  A_INT8 2G 40M Channel Center Freq 2452 CTL Limit Power SU
33792       *  A_INT8 2G 40M Channel Center Freq 2452 CTL Limit Power OFDMA
33793       *  A_INT8 2G 40M Channel Center Freq 2457 CTL Limit Power SU
33794       *  A_INT8 2G 40M Channel Center Freq 2457 CTL Limit Power OFDMA
33795       *  A_INT8 2G 40M Channel Center Freq 2462 CTL Limit Power SU
33796       *  A_INT8 2G 40M Channel Center Freq 2462 CTL Limit Power OFDMA
33797 
33798       *  ====================5G CTL POWER LIMIT ======================
33799       *  A_INT8 5G 20M Channel Center Freq 5180 CTL Limit Power SU
33800       *  A_INT8 5G 20M Channel Center Freq 5180 CTL Limit Power OFDMA
33801       *  A_INT8 5G 20M Channel Center Freq 5320 CTL Limit Power SU
33802       *  A_INT8 5G 20M Channel Center Freq 5320 CTL Limit Power OFDMA
33803       *  A_INT8 5G 20M Channel Center Freq 5500 CTL Limit Power SU
33804       *  A_INT8 5G 20M Channel Center Freq 5500 CTL Limit Power OFDMA
33805       *  A_INT8 5G 20M Channel Center Freq 5700 CTL Limit Power SU
33806       *  A_INT8 5G 20M Channel Center Freq 5700 CTL Limit Power OFDMA
33807       *  A_INT8 5G 20M Channel Center Freq 5745 CTL Limit Power SU
33808       *  A_INT8 5G 20M Channel Center Freq 5745 CTL Limit Power OFDMA
33809       *  A_INT8 5G 20M Channel Center Freq 5825 CTL Limit Power SU
33810       *  A_INT8 5G 20M Channel Center Freq 5825 CTL Limit Power OFDMA
33811       *  A_INT8 5G 20M Channel Center Freq 5845 CTL Limit Power SU
33812       *  A_INT8 5G 20M Channel Center Freq 5845 CTL Limit Power OFDMA
33813       *  A_INT8 5G 20M Channel Center Freq 5885 CTL Limit Power SU
33814       *  A_INT8 5G 20M Channel Center Freq 5885 CTL Limit Power OFDMA
33815 
33816       *  A_INT8 5G 40M Channel Center Freq 5190 CTL Limit Power SU
33817       *  A_INT8 5G 40M Channel Center Freq 5190 CTL Limit Power OFDMA
33818       *  A_INT8 5G 40M Channel Center Freq 5310 CTL Limit Power SU
33819       *  A_INT8 5G 40M Channel Center Freq 5310 CTL Limit Power OFDMA
33820       *  A_INT8 5G 40M Channel Center Freq 5510 CTL Limit Power SU
33821       *  A_INT8 5G 40M Channel Center Freq 5510 CTL Limit Power OFDMA
33822       *  A_INT8 5G 40M Channel Center Freq 5670 CTL Limit Power SU
33823       *  A_INT8 5G 40M Channel Center Freq 5670 CTL Limit Power OFDMA
33824       *  A_INT8 5G 40M Channel Center Freq 5755 CTL Limit Power SU
33825       *  A_INT8 5G 40M Channel Center Freq 5755 CTL Limit Power OFDMA
33826       *  A_INT8 5G 40M Channel Center Freq 5795 CTL Limit Power SU
33827       *  A_INT8 5G 40M Channel Center Freq 5795 CTL Limit Power OFDMA
33828       *  A_INT8 5G 40M Channel Center Freq 5835 CTL Limit Power SU
33829       *  A_INT8 5G 40M Channel Center Freq 5835 CTL Limit Power OFDMA
33830       *  A_INT8 5G 40M Channel Center Freq 5875 CTL Limit Power SU
33831       *  A_INT8 5G 40M Channel Center Freq 5875 CTL Limit Power OFDMA
33832 
33833       *  A_INT8 5G 80M Channel Center Freq 5210 CTL Limit Power SU
33834       *  A_INT8 5G 80M Channel Center Freq 5210 CTL Limit Power OFDMA
33835       *  A_INT8 5G 80M Channel Center Freq 5290 CTL Limit Power SU
33836       *  A_INT8 5G 80M Channel Center Freq 5290 CTL Limit Power OFDMA
33837       *  A_INT8 5G 80M Channel Center Freq 5530 CTL Limit Power SU
33838       *  A_INT8 5G 80M Channel Center Freq 5530 CTL Limit Power OFDMA
33839       *  A_INT8 5G 80M Channel Center Freq 5610 CTL Limit Power SU
33840       *  A_INT8 5G 80M Channel Center Freq 5610 CTL Limit Power OFDMA
33841       *  A_INT8 5G 80M Channel Center Freq 5775 CTL Limit Power SU
33842       *  A_INT8 5G 80M Channel Center Freq 5775 CTL Limit Power OFDMA
33843       *  A_INT8 5G 80M Channel Center Freq 5855 CTL Limit Power SU
33844       *  A_INT8 5G 80M Channel Center Freq 5855 CTL Limit Power OFDMA
33845 
33846       *  A_INT8 5G 160M Channel Center Freq 5250 CTL Limit Power SU
33847       *  A_INT8 5G 160M Channel Center Freq 5250 CTL Limit Power OFDMA
33848       *  A_INT8 5G 160M Channel Center Freq 5570 CTL Limit Power SU
33849       *  A_INT8 5G 160M Channel Center Freq 5570 CTL Limit Power OFDMA
33850       *  A_INT8 5G 160M Channel Center Freq 5815 CTL Limit Power SU
33851       *  A_INT8 5G 160M Channel Center Freq 5815 CTL Limit Power OFDMA
33852 
33853       *  A_INT8 5G 320M Channel Center Freq 5650 CTL Limit Power SU (5650 Punctured 1111_1111_1111_0000)
33854       *  A_INT8 5G 320M Channel Center Freq 5650 CTL Limit Power OFDMA (5650 Punctured 1111_1111_1111_0000)
33855 
33856       *  ====================6G CTL POWER LIMIT ======================
33857       *  A_INT8 6G 20M Channel Center Freq 5935 CTL Limit Power SU
33858       *  A_INT8 6G 20M Channel Center Freq 5935 CTL Limit Power OFDMA
33859       *  A_INT8 6G 20M Channel Center Freq 5955 CTL Limit Power SU
33860       *  A_INT8 6G 20M Channel Center Freq 5955 CTL Limit Power OFDMA
33861       *  A_INT8 6G 20M Channel Center Freq 6415 CTL Limit Power SU
33862       *  A_INT8 6G 20M Channel Center Freq 6415 CTL Limit Power OFDMA
33863       *  A_INT8 6G 20M Channel Center Freq 7115 CTL Limit Power SU
33864       *  A_INT8 6G 20M Channel Center Freq 7115 CTL Limit Power OFDMA
33865 
33866       *  A_INT8 6G 40M Channel Center Freq 5965 CTL Limit Power SU
33867       *  A_INT8 6G 40M Channel Center Freq 5965 CTL Limit Power OFDMA
33868       *  A_INT8 6G 40M Channel Center Freq 6405 CTL Limit Power SU
33869       *  A_INT8 6G 40M Channel Center Freq 6405 CTL Limit Power OFDMA
33870 
33871       *  A_INT8 6G 80M Channel Center Freq 5985 CTL Limit Power SU
33872       *  A_INT8 6G 80M Channel Center Freq 5985 CTL Limit Power OFDMA
33873       *  A_INT8 6G 80M Channel Center Freq 6385 CTL Limit Power SU
33874       *  A_INT8 6G 80M Channel Center Freq 6385 CTL Limit Power OFDMA
33875 
33876       *  A_INT8 6G 160M Channel Center Freq 6025 CTL Limit Power SU
33877       *  A_INT8 6G 160M Channel Center Freq 6025 CTL Limit Power OFDMA
33878       *  A_INT8 6G 160M Channel Center Freq 6345 CTL Limit Power SU
33879       *  A_INT8 6G 160M Channel Center Freq 6345 CTL Limit Power OFDMA
33880 
33881       *  A_INT8 6G 320M Channel Center Freq 6105 CTL Limit Power SU
33882       *  A_INT8 6G 320M Channel Center Freq 6105 CTL Limit Power OFDMA
33883       *  A_INT8 6G 320M Channel Center Freq 6265 CTL Limit Power SU
33884       *  A_INT8 6G 320M Channel Center Freq 6265 CTL Limit Power OFDMA
33885       */
33886 
33887 
33888     BIOS_PARAM_TYPE_MAX,
33889 } bios_param_type_e;
33890 
33891 typedef struct {
33892     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param */
33893     union {
33894         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
33895         /** pdev_id for identifying the MAC
33896          * See macros starting with WMI_PDEV_ID_ for values.
33897          */
33898         A_UINT32 pdev_id;
33899     };
33900     A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
33901     /*
33902      * Bit 7:0 len of array gain table
33903      * Bit 8   bypass multi chain gain or not
33904      */
33905     /* array gain table(s) (len adjusted to number of words).
33906      * Following this structure is the TLV:
33907      * A_UINT32 arraygain_tbl[1];
33908      */
33909 } wmi_pdev_set_mimogain_table_cmd_fixed_param;
33910 
33911 #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
33912 #define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
33913 #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
33914 #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
33915 
33916 #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
33917 #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
33918 #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
33919 #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
33920 
33921 
33922 typedef struct {
33923     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param */
33924     /** parameter id   */
33925     A_UINT32 param_id;
33926     /** parameter value */
33927     A_UINT32 param_value;
33928 } wmi_fwtest_set_param_cmd_fixed_param;
33929 
33930 #define WMI_ATF_DENOMINATION   1000 /* Expressed in 1 part in 1000 (permille) */
33931 
33932 #define WMI_ATF_SSID_FAIR_SCHED         0 /** fair ATF scheduling for vdev */
33933 #define WMI_ATF_SSID_STRICT_SCHED       1 /** strict ATF scheduling for vdev */
33934 #define WMI_ATF_SSID_FAIR_SCHED_WITH_UB 2 /** fair ATF scheduling with upper bound for VDEV */
33935 
33936 typedef struct {
33937     /** TLV tag and len; tag equals
33938      *  WMITLV_TAG_STRUC_wmi_atf_peer_info */
33939     A_UINT32 tlv_header;
33940     wmi_mac_addr peer_macaddr;
33941     A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
33942     A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
33943     A_UINT32 atf_units_reserved; /* Peer congestion threshold for future use */
33944     A_UINT32 vdev_id;
33945     A_UINT32 pdev_id;
33946 } wmi_atf_peer_info;
33947 
33948 #define WMI_ATF_PEER_UNITS_BIT_POS        0
33949 #define WMI_ATF_PEER_UNITS_NUM_BITS       16
33950 
33951 #define WMI_ATF_GET_PEER_UNITS(atf_peer_info)  \
33952     WMI_GET_BITS(atf_peer_info,WMI_ATF_PEER_UNITS_BIT_POS,WMI_ATF_PEER_UNITS_NUM_BITS)
33953 
33954 #define WMI_ATF_SET_PEER_UNITS(atf_peer_info,val)  \
33955     WMI_SET_BITS(atf_peer_info,WMI_ATF_PEER_UNITS_BIT_POS,WMI_ATF_PEER_UNITS_NUM_BITS, val)
33956 
33957 #define WMI_ATF_GROUP_ID_BIT_POS        16
33958 #define WMI_ATF_GROUP_ID_NUM_BITS       8
33959 
33960 #define WMI_ATF_GET_GROUP_ID(atf_peer_info)  \
33961     WMI_GET_BITS(atf_peer_info,WMI_ATF_GROUP_ID_BIT_POS,WMI_ATF_GROUP_ID_NUM_BITS)
33962 
33963 #define WMI_ATF_SET_GROUP_ID(atf_peer_info,val)  \
33964     WMI_SET_BITS(atf_peer_info,WMI_ATF_GROUP_ID_BIT_POS,WMI_ATF_GROUP_ID_NUM_BITS, val)
33965 
33966 #define WMI_ATF_EXPLICIT_PEER_FLAG_BIT_POS        24
33967 #define WMI_ATF_EXPLICIT_PEER_FLAG_NUM_BITS       1
33968 
33969 #define WMI_ATF_GET_EXPLICIT_PEER_FLAG(atf_peer_info)  \
33970     WMI_GET_BITS(atf_peer_info,WMI_ATF_EXPLICIT_PEER_FLAG_BIT_POS,WMI_ATF_EXPLICIT_PEER_FLAG_NUM_BITS)
33971 
33972 #define WMI_ATF_SET_EXPLICIT_PEER_FLAG(atf_peer_info,val)  \
33973     WMI_SET_BITS(atf_peer_info,WMI_ATF_EXPLICIT_PEER_FLAG_BIT_POS,WMI_ATF_EXPLICIT_PEER_FLAG_NUM_BITS, val)
33974 
33975 typedef struct {
33976     /* The new structure is an optimized version of wmi_atf_peer_info & wmi_atf_peer_ext_info combined */
33977     A_UINT32 tlv_header;
33978     wmi_mac_addr peer_macaddr;
33979     /* atf_peer_info
33980      * Bits 0-15  - atf_units (based on 1 part in 1000 (per mille))
33981      * Bits 16-23 - atf_groupid
33982      * Bit  24    - Configured Peer Indication (0/1), this bit would be set by
33983      *              host to indicate that the peer has airtime % configured
33984      *              explicitly by user
33985      * Bits 25-31 - Reserved (Shall be zero)
33986      */
33987     A_UINT32 atf_peer_info;
33988 } wmi_atf_peer_info_v2;
33989 
33990 #define WMI_ATF_PEER_FULL_UPDATE_BIT_POS        0
33991 #define WMI_ATF_PEER_FULL_UPDATE_NUM_BITS       1
33992 
33993 #define WMI_ATF_GET_PEER_FULL_UPDATE(atf_flags)  \
33994     WMI_GET_BITS(atf_flags,WMI_ATF_PEER_FULL_UPDATE_BIT_POS,WMI_ATF_PEER_FULL_UPDATE_NUM_BITS)
33995 
33996 #define WMI_ATF_SET_PEER_FULL_UPDATE(atf_flags,val)  \
33997     WMI_SET_BITS(atf_flags,WMI_ATF_PEER_FULL_UPDATE_BIT_POS,WMI_ATF_PEER_FULL_UPDATE_NUM_BITS,val)
33998 
33999 #define WMI_ATF_PEER_PENDING_WMI_CMDS_BIT_POS        1
34000 #define WMI_ATF_PEER_PENDING_WMI_CMDS_NUM_BITS       1
34001 
34002 #define WMI_ATF_GET_PEER_PENDING_WMI_CMDS(atf_flags)  \
34003     WMI_GET_BITS(atf_flags,WMI_ATF_PEER_PENDING_WMI_CMDS_BIT_POS, WMI_ATF_PEER_PENDING_WMI_CMDS_NUM_BITS)
34004 
34005 #define WMI_ATF_SET_PEER_PENDING_WMI_CMDS(atf_flags,val)  \
34006     WMI_SET_BITS(atf_flags,WMI_ATF_PEER_PENDING_WMI_CMDS_BIT_POS, WMI_ATF_PEER_PENDING_WMI_CMDS_NUM_BITS, val)
34007 
34008 #define WMI_ATF_PEER_PDEV_ID_VALID_BIT_POS          2
34009 #define WMI_ATF_PEER_PDEV_ID_VALID_NUM_BITS         1
34010 
34011 #define WMI_ATF_GET_PEER_PDEV_ID_VALID(atf_flags)   \
34012     WMI_GET_BITS(atf_flags,WMI_ATF_PEER_PDEV_ID_VALID_BIT_POS, WMI_ATF_PEER_PDEV_ID_VALID_NUM_BITS)
34013 
34014 #define WMI_ATF_SET_PEER_PDEV_ID_VALID(atf_flags,val)   \
34015     WMI_SET_BITS(atf_flags,WMI_ATF_PEER_PDEV_ID_VALID_BIT_POS, WMI_ATF_PEER_PDEV_ID_VALID_NUM_BITS, val)
34016 
34017 typedef struct {
34018     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param */
34019     A_UINT32 num_peers;
34020     A_UINT32 pdev_id;
34021     /* atf_flags
34022      * Bit 0 - full or partial update;
34023      *         full update -
34024      *             indicates that this is done for all the connected peers
34025      *         partial update -
34026      *             indicates update for only the newly connected peers
34027      *             (whenever some peers gets connected/disconnected)
34028      * Bit 1 - indicates whether there are more iterations of WMI command
34029      *         incoming after the current set of cmds
34030      *         Example : If there are 500 peers present and tlv can accomodate
34031      *         only 50 peers at a time, then this will be set for all the
34032      *         instances of the WMI commands except the last one.
34033      * Bit 2 - indicates if pdev_id is valid or not
34034      * Bits 3-31 - Reserved (Shall be zero)
34035      */
34036     A_UINT32 atf_flags;
34037     /*
34038      * Following this structure is one of the following TLVs
34039      * (only one of them will have valid data in a particular message)
34040      *   - struct wmi_atf_peer_info peer_info[num_peers];
34041      *   - struct wmi_atf_peer_info_v2 peer_info_v2[num_peers];
34042      */
34043 } wmi_peer_atf_request_fixed_param;
34044 
34045 #define WMI_ATF_GROUP_SCHED_POLICY_BIT_POS        0
34046 #define WMI_ATF_GROUP_SCHED_POLICY_NUM_BITS       4
34047 
34048 #define WMI_ATF_GROUP_GET_GROUP_SCHED_POLICY(atf_group_flags)  \
34049     WMI_GET_BITS(atf_group_flags,WMI_ATF_GROUP_SCHED_POLICY_BIT_POS,WMI_ATF_GROUP_SCHED_POLICY_NUM_BITS)
34050 
34051 #define WMI_ATF_GROUP_SET_GROUP_SCHED_POLICY(atf_group_flags,val)  \
34052     WMI_SET_BITS(atf_group_flags,WMI_ATF_GROUP_SCHED_POLICY_BIT_POS,WMI_ATF_GROUP_SCHED_POLICY_NUM_BITS,val)
34053 
34054 typedef struct {
34055     /** TLV tag and len; tag equals
34056      *  WMITLV_TAG_STRUC_wmi_atf_group_info */
34057     A_UINT32 tlv_header;
34058     A_UINT32 atf_group_id; /* ID of the Air Time Management group */
34059     /* atf_group_units
34060      * Fraction of air time allowed for the group, in per mille units
34061      * (from 0-1000).
34062      * For example, to indicate that the group can use 12.3% of the air time,
34063      * the atf_group_units setting would be 123.
34064      */
34065     A_UINT32 atf_group_units;
34066     /* atf_group_flags
34067      *  Bits 4-31  - Reserved (Shall be zero)
34068      *  Bits 0-3   - Group Schedule Policy (Fair/Strict/Fair with upper bound)
34069      *               Refer to WMI_ATF_SSID_ definitions
34070      */
34071     A_UINT32 atf_group_flags;
34072 } wmi_atf_group_info;
34073 
34074 #define WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_BIT_POS    0
34075 #define WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_NUM_BITS   16
34076 
34077 #define WMI_ATF_GROUP_GET_NUM_EXPLICIT_PEERS(atf_total_num_peers)  \
34078     WMI_GET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_NUM_BITS)
34079 
34080 #define WMI_ATF_GROUP_SET_NUM_EXPLICIT_PEERS(atf_total_num_peers, val)  \
34081     WMI_SET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_NUM_BITS, val)
34082 
34083 #define WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_BIT_POS    16
34084 #define WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_NUM_BITS   16
34085 
34086 #define WMI_ATF_GROUP_GET_NUM_IMPLICIT_PEERS(atf_total_num_peers)  \
34087     WMI_GET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_NUM_BITS)
34088 
34089 #define WMI_ATF_GROUP_SET_NUM_IMPLICIT_PEERS(atf_total_num_peers, val)  \
34090     WMI_SET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_NUM_BITS, val)
34091 
34092 typedef struct {
34093     /** TLV tag and len; tag equals
34094      *  WMITLV_TAG_STRUC_wmi_atf_group_info_v2 */
34095     A_UINT32 tlv_header;
34096     A_UINT32 atf_group_id; /* ID of the Air Time Management group */
34097     /* atf_group_units
34098      * Fraction of air time allowed for the group, in per mille units
34099      * (from 0-1000).
34100      * For example, to indicate that the group can use 12.3% of the air time,
34101      * the atf_group_units setting would be 123.
34102      */
34103     A_UINT32 atf_group_units;
34104     /* atf_group_flags
34105      *  Bits 0-3  - Group Schedule Policy (Fair/Strict/Fair with upper bound)
34106      *              Refer to WMI_ATF_SSID_ definitions
34107      *  Bit  4-31 - Reserved (Shall be zero)
34108      */
34109     A_UINT32 atf_group_flags;
34110     /* atf_total_num_peers
34111      *
34112      *  Bits 0-15  - total number of explicit peers
34113      *  Bits 16-31 - total number of implicit peers
34114      *  An explicit peer has an ATF % configured by the user.
34115      *  An implicit peer has an ATF % =
34116      *      (Group_ATF_percent - Total_Explicit_Peers_ATF_Percent) /
34117      *      number of implicit peers
34118      *  This computation can be done in FW based on atf_total_num_peers.
34119      */
34120     A_UINT32 atf_total_num_peers;
34121     /* atf_total_implicit_peer_units
34122      *
34123      * Air time allocated for all the implicit peers
34124      * (from 0-1000, in per mille units)
34125      */
34126     A_UINT32 atf_total_implicit_peer_units;
34127 } wmi_atf_group_info_v2;
34128 
34129 typedef struct {
34130     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_atf_ssid_grp_request_fixed_param */
34131     A_UINT32 pdev_id;
34132     /*
34133      * Following this structure is the one of the following TLVs
34134      * (only one of them will have valid data in a particular message)
34135      *   - struct wmi_atf_group_info group_info[];
34136      *   - struct wmi_atf_group_info_v2 group_info[];
34137      */
34138 } wmi_atf_ssid_grp_request_fixed_param;
34139 
34140 /* ATF Configurations for WMM ACs of a group, value for each AC shall be in
34141  * percentage (0-100).
34142  * This perecentage is relative to the residual airtime (derived by FW)
34143  * configured for the group.
34144  * When WMM ATF is not configured for a peer all values shall be 0.
34145  */
34146 typedef struct {
34147     /** TLV tag and len; tag equals
34148      *  WMITLV_TAG_STRUC_wmi_atf_group_wmm_ac_info
34149      */
34150     A_UINT32 tlv_header;
34151     A_UINT32 atf_group_id; /* ID of the Air Time Management group */
34152     A_UINT32 atf_units_be;
34153     A_UINT32 atf_units_bk;
34154     A_UINT32 atf_units_vi;
34155     A_UINT32 atf_units_vo;
34156 } wmi_atf_group_wmm_ac_info;
34157 
34158 typedef struct {
34159     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_atf_grp_wmm_ac_cfg_request_fixed_param */
34160     A_UINT32 pdev_id;
34161     /*
34162      * Following this structure is the TLV:
34163      * struct wmi_atf_group_wmm_ac_info group_info[];
34164      */
34165 } wmi_atf_grp_wmm_ac_cfg_request_fixed_param;
34166 
34167 #define WMI_VDEV_LATENCY_TIDNUM_BIT_POS     0
34168 #define WMI_VDEV_LATENCY_TIDNUM_NUM_BITS    8
34169 
34170 #define WMI_VDEV_LATENCY_GET_TIDNUM(vdev_latency_info) \
34171     WMI_GET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_TIDNUM_BIT_POS, WMI_VDEV_LATENCY_TIDNUM_NUM_BITS)
34172 
34173 #define WMI_VDEV_LATENCY_SET_TIDNUM(vdev_latency_info,val) \
34174     WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_TIDNUM_BIT_POS, WMI_VDEV_LATENCY_TIDNUM_NUM_BITS, val)
34175 
34176 #define WMI_VDEV_LATENCY_AC_BIT_POS     8
34177 #define WMI_VDEV_LATENCY_AC_NUM_BITS    2
34178 
34179 #define WMI_VDEV_LATENCY_GET_AC(vdev_latency_info) \
34180     WMI_GET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_AC_BIT_POS, WMI_VDEV_LATENCY_AC_NUM_BITS)
34181 
34182 #define WMI_VDEV_LATENCY_SET_AC(vdev_latency_info,val) \
34183     WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_AC_BIT_POS, WMI_VDEV_LATENCY_AC_NUM_BITS, val)
34184 
34185 #define WMI_VDEV_LATENCY_DL_VALID_BIT_POS     10
34186 #define WMI_VDEV_LATENCY_DL_VALID_NUM_BITS    1
34187 
34188 #define WMI_VDEV_LATENCY_GET_DL_VALID(vdev_latency_info) \
34189     WMI_GET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_DL_VALID_BIT_POS, WMI_VDEV_LATENCY_DL_VALID_NUM_BITS)
34190 
34191 #define WMI_VDEV_LATENCY_SET_DL_VALID(vdev_latency_info,val) \
34192     WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_DL_VALID_BIT_POS, WMI_VDEV_LATENCY_DL_VALID_NUM_BITS, val)
34193 
34194 #define WMI_VDEV_LATENCY_UL_VALID_BIT_POS     11
34195 #define WMI_VDEV_LATENCY_UL_VALID_NUM_BITS    1
34196 
34197 #define WMI_VDEV_LATENCY_GET_UL_VALID(vdev_latency_info) \
34198     WMI_GET_BITS(vdev_latency_info,WMI_VDEV_LATENCY_UL_VALID_BIT_POS, WMI_VDEV_LATENCY_UL_VALID_NUM_BITS)
34199 
34200 #define WMI_VDEV_LATENCY_SET_UL_VALID(vdev_latency_info,val) \
34201     WMI_SET_BITS(vdev_latency_info, WMI_VDEV_LATENCY_UL_VALID_BIT_POS, WMI_VDEV_LATENCY_UL_VALID_NUM_BITS, val)
34202 
34203 typedef struct {
34204     /** TLV tag and len; tag equals
34205      *  WMITLV_TAG_STRUC_wmi_vdev_latency_info
34206      */
34207     A_UINT32 tlv_header;
34208     /*
34209      * Maximum expected average delay between 2 schedules in milliseconds
34210      * of given TID type when it has active traffic.
34211      * 0x0 is considered as invalid service interval.
34212      */
34213     A_UINT32 service_interval;
34214     /* burst_size:
34215      * The number of bytes transmitted (in DL TIDs) / received (in UL ACs)
34216      * in service interval.
34217      */
34218     A_UINT32 burst_size;
34219     /* max_latency:
34220      * The maximum end to end latency expectation, in milliseconds.
34221      * If this value is 0x0, it shall be ignored.
34222      */
34223     A_UINT32 max_latency;
34224     /* max_per:
34225      * The maximum PER (as a percent) for the peer-TID, in range 1 - 100.
34226      * If this value is 0x0, it shall be ignored.
34227      */
34228     A_UINT32 max_per;
34229     /* min_tput:
34230      * The minimum guaranteed throughput to the peer-TID, in Kbps.
34231      * If this value is 0x0, it shall be ignored.
34232      */
34233     A_UINT32 min_tput;
34234     /* vdev_latency_info
34235      *  Bits  12 - 31   - Reserved (Shall be zero)
34236      *  Bit   11        - UL latency config indication.
34237      *                    If this bit is set then this latency info will
34238      *                    be used when triggering UL traffic.  Until the
34239      *                    AC specified in bits 8-9 has transferred at least
34240      *                    burst_size amount of UL data within the service
34241      *                    period, the AP will continue sending UL triggers
34242      *                    when the STA has data of the specified access
34243      *                    category ready to transmit.
34244      *                    Note that the TID specified in bits 0-7 does not
34245      *                    apply to UL; the TID-to-AC mapping applied to DL
34246      *                    data that can be adjusted by the TID specified
34247      *                    in bits 0-7 and the AC specified in bits 8-9 is
34248      *                    distinct from the TID-to-AC mapping applied to
34249      *                    UL data.
34250      *  Bit   10        - DL latency config indication. If the bit is set
34251      *                    then DL TID will use this latency config.
34252      *  Bits  8 - 9     - This bit has info on the custom AC of DL TID.
34253      *                    Also if bit 11 is set, the AP will apply some
34254      *                    of these latency specs (in particular, burst_size)
34255      *                    to UL traffic for this AC, by sending UL triggers
34256      *                    until the desired amount of data has been received
34257      *                    within the service period.
34258      *  Bits  0 - 7     - Specifies the TID of interest that corresponds
34259      *                    to the AC specified in bits 8-9.  This can be
34260      *                    used to adjust the TID-to-AC mapping applied to
34261      *                    DL data (if bit 10 is set).
34262      */
34263     A_UINT32 vdev_latency_info;
34264 } wmi_vdev_latency_info;
34265 
34266 /*
34267  * Currently wmi_vdev_tid_latency_config_fixed_param will be sent per
34268  * data tid to map the AC.
34269  * Also to configure VDEV level latency config to be used by all TIDs
34270  * based on the mapping.
34271  * VDEV restart is expected during this command
34272  */
34273 
34274 typedef struct {
34275     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_tid_latency_config_fixed_param  */
34276     A_UINT32 pdev_id;
34277     A_UINT32 vdev_id;
34278     /*
34279      * Following this structure is the TLV:
34280      * struct wmi_vdev_latency_info vdev_latency_info[];
34281      */
34282 } wmi_vdev_tid_latency_config_fixed_param;
34283 
34284 #define WMI_TID_LATENCY_TIDNUM_BIT_POS     0
34285 #define WMI_TID_LATENCY_TIDNUM_NUM_BITS    8
34286 
34287 #define WMI_TID_LATENCY_GET_TIDNUM(latency_tid_info) \
34288     WMI_GET_BITS(latency_tid_info, WMI_TID_LATENCY_TIDNUM_BIT_POS, WMI_TID_LATENCY_TIDNUM_NUM_BITS)
34289 
34290 #define WMI_TID_LATENCY_SET_TIDNUM(latency_tid_info,val) \
34291     WMI_SET_BITS(latency_tid_info, WMI_TID_LATENCY_TIDNUM_BIT_POS, WMI_TID_LATENCY_TIDNUM_NUM_BITS, val)
34292 
34293 #define WMI_TID_LATENCY_AC_BIT_POS     8
34294 #define WMI_TID_LATENCY_AC_NUM_BITS    2
34295 
34296 #define WMI_TID_LATENCY_GET_AC(latency_tid_info) \
34297     WMI_GET_BITS(latency_tid_info, WMI_TID_LATENCY_AC_BIT_POS ,  WMI_TID_LATENCY_AC_NUM_BITS)
34298 
34299 #define WMI_TID_LATENCY_SET_AC(latency_tid_info,val) \
34300     WMI_SET_BITS(latency_tid_info, WMI_TID_LATENCY_AC_BIT_POS ,   WMI_TID_LATENCY_AC_NUM_BITS, val)
34301 
34302 #define WMI_TID_LATENCY_DL_ENABLE_BIT_POS     10
34303 #define WMI_TID_LATENCY_DL_ENABLE_NUM_BITS    1
34304 
34305 #define WMI_TID_LATENCY_GET_DL_ENABLE(latency_tid_info) \
34306     WMI_GET_BITS(latency_tid_info,WMI_TID_LATENCY_DL_ENABLE_BIT_POS, WMI_TID_LATENCY_DL_ENABLE_NUM_BITS)
34307 
34308 #define WMI_TID_LATENCY_SET_DL_ENABLE(latency_tid_info,val) \
34309     WMI_SET_BITS(latency_tid_info,WMI_TID_LATENCY_DL_ENABLE_BIT_POS, WMI_TID_LATENCY_DL_ENABLE_NUM_BITS, val)
34310 
34311 #define WMI_TID_LATENCY_UL_ENABLE_BIT_POS     11
34312 #define WMI_TID_LATENCY_UL_ENABLE_NUM_BITS    1
34313 
34314 #define WMI_TID_LATENCY_GET_UL_ENABLE(latency_tid_info) \
34315     WMI_GET_BITS(latency_tid_info,WMI_TID_LATENCY_UL_ENABLE_BIT_POS, WMI_TID_LATENCY_UL_ENABLE_NUM_BITS)
34316 
34317 #define WMI_TID_LATENCY_SET_UL_ENABLE(latency_tid_info,val) \
34318     WMI_SET_BITS(latency_tid_info,WMI_TID_LATENCY_UL_ENABLE_BIT_POS, WMI_TID_LATENCY_UL_ENABLE_NUM_BITS, val)
34319 
34320 #define WMI_LATENCY_BURST_SIZE_SUM_BIT_POS     12
34321 #define WMI_LATENCY_BURST_SIZE_SUM_NUM_BITS    2
34322 
34323 #define WMI_LATENCY_GET_BURST_SIZE_SUM(latency_tid_info) \
34324     WMI_GET_BITS(latency_tid_info, WMI_LATENCY_BURST_SIZE_SUM_BIT_POS, WMI_LATENCY_BURST_SIZE_SUM_NUM_BITS)
34325 
34326 #define WMI_LATENCY_SET_BURST_SIZE_SUM(latency_tid_info,val) \
34327     WMI_SET_BITS(latency_tid_info, WMI_LATENCY_BURST_SIZE_SUM_BIT_POS, WMI_LATENCY_BURST_SIZE_SUM_NUM_BITS, val)
34328 
34329 #define WMI_LATENCY_MSDUQ_ID_BIT_POS     14
34330 #define WMI_LATENCY_MSDUQ_ID_NUM_BITS    4
34331 
34332 #define WMI_LATENCY_GET_MSDUQ_ID(latency_tid_info) \
34333     WMI_GET_BITS(latency_tid_info, WMI_LATENCY_MSDUQ_ID_BIT_POS, WMI_LATENCY_MSDUQ_ID_NUM_BITS)
34334 
34335 #define WMI_LATENCY_SET_MSDUQ_ID(latency_tid_info,val) \
34336     WMI_SET_BITS(latency_tid_info, WMI_LATENCY_MSDUQ_ID_BIT_POS, WMI_LATENCY_MSDUQ_ID_NUM_BITS, val)
34337 
34338 #define WMI_LATENCY_DISABLE_UL_OFDMA_BIT_POS     18
34339 #define WMI_LATENCY_DISABLE_UL_OFDMA_NUM_BITS    1
34340 
34341 #define WMI_LATENCY_GET_DISABLE_UL_OFDMA(latency_tid_info) \
34342     WMI_GET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_OFDMA_BIT_POS, WMI_LATENCY_DISABLE_UL_OFDMA_NUM_BITS)
34343 
34344 #define WMI_LATENCY_SET_DISABLE_UL_OFDMA(latency_tid_info,val) \
34345     WMI_SET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_OFDMA_BIT_POS, WMI_LATENCY_DISABLE_UL_OFDMA_NUM_BITS, val)
34346 
34347 #define WMI_LATENCY_DISABLE_UL_MU_MIMO_BIT_POS     19
34348 #define WMI_LATENCY_DISABLE_UL_MU_MIMO_NUM_BITS    1
34349 
34350 #define WMI_LATENCY_GET_DISABLE_UL_MU_MIMO(latency_tid_info) \
34351     WMI_GET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_MU_MIMO_BIT_POS, WMI_LATENCY_DISABLE_UL_MU_MIMO_NUM_BITS)
34352 
34353 #define WMI_LATENCY_SET_DISABLE_UL_MU_MIMO(latency_tid_info,val) \
34354     WMI_SET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_MU_MIMO_BIT_POS, WMI_LATENCY_DISABLE_UL_MU_MIMO_NUM_BITS, val)
34355 
34356 #define WMI_LATENCY_SAWF_UL_PARAMS_FLAG_POS         20
34357 #define WMI_LATENCY_SAWF_UL_PARAMS_FLAG_NUM_BITS    1
34358 
34359 #define WMI_LATENCY_GET_SAWF_UL_PARAMS_BIT(latency_tid_info) \
34360     WMI_GET_BITS(latency_tid_info, WMI_LATENCY_SAWF_UL_PARAMS_FLAG_POS, WMI_LATENCY_SAWF_UL_PARAMS_FLAG_NUM_BITS)
34361 
34362 #define WMI_LATENCY_SET_SAWF_UL_PARAMS_BIT(latency_tid_info, val) \
34363     WMI_SET_BITS(latency_tid_info, WMI_LATENCY_SAWF_UL_PARAMS_FLAG_POS, WMI_LATENCY_SAWF_UL_PARAMS_FLAG_NUM_BITS, val)
34364 
34365 
34366 typedef struct {
34367     /** TLV tag and len; tag equals
34368      *  WMITLV_TAG_STRUC_wmi_tid_latency_info
34369      */
34370     A_UINT32 tlv_header;
34371     wmi_mac_addr dest_macaddr; /* Mac address of end client */
34372     /*
34373      * Maximum expected average delay between 2 schedules in milliseconds
34374      * of given TID type when it has active traffic.
34375      * 0x0 is considered as invalid service interval.
34376      */
34377     A_UINT32 service_interval;
34378     /*
34379      * Cumulative number of bytes are expected to be transmitted or
34380      * received in the service interval when this specific Peer-TID
34381      * has active traffic.
34382      * If cumulative number of bytes is 0x0, it is considered as
34383      * invalid burst size.  In that case, firmware would try to transmit
34384      * and receive as many bytes as it can for this specific Peer-TID.
34385      * This burst size will be added or subtracted from vdev burst size
34386      * based on burst size sum bit in latency tid info.
34387      * The VDEV burst size will be considered to be 0 when no VDEV latency
34388      * command is received.
34389      * If host needs to set burst size for a peer then they can use the
34390      * peer cmd and set burst size sum bit to 1.
34391      */
34392     A_UINT32 burst_size_diff;
34393     /* max_latency:
34394      * The maximum end to end latency expectation, in milliseconds.
34395      * If this value is 0x0, it shall be ignored.
34396      */
34397     A_UINT32 max_latency;
34398     /* max_per:
34399      * The maximum PER (as a percent) for the peer-TID, in range 1 - 100
34400      * If this value is 0x0, it shall be ignored.
34401      */
34402     A_UINT32 max_per;
34403     /* min_tput:
34404      * The minimum guaranteed throughput to the peer-TID, in Kbps.
34405      * If this value is 0x0, it shall be ignored.
34406      */
34407     A_UINT32 min_tput;
34408     /* latency_tid_info
34409      *  Bits 21-31      - Reserved (Shall be zero)
34410      *  Bit  20         - Flag to indicate SAWF UL params (and not mesh latency)
34411      *  Bit  19         - Disable UL MU-MIMO. If set, UL MU-MIMO is disabled
34412      *                    for the specified AC. Note that TID level control is
34413      *                    not possible for UL MU-MIMO (the granularity is AC).
34414      *  Bit  18         - Disable UL OFDMA. If set, UL OFDMA is disabled for
34415      *                    the specified AC. Note that TID level control is not
34416      *                    possible for UL OFDMA (the granularity is AC).
34417      *  Bits 14-17      - MSDU queue flow id within the TID for configuring
34418      *                    latency info per MSDU flow queue
34419      *  Bit  12-13      - burst size sum. Bit to indicate whether to add or
34420      *                    subtract burst_size_diff from vdev cmd burst size:
34421      *                    1 -> addition
34422      *                    2 -> subtraction
34423      *  Bit   11        - UL latency config indication.
34424      *                    If this bit is set then this latency info will
34425      *                    be used when triggering UL traffic.  Until the
34426      *                    AC specified in bits 8-9 has transferred at least
34427      *                    burst_size amount of UL data within the service
34428      *                    period, the AP will continue sending UL triggers
34429      *                    when the STA has data of the specified access
34430      *                    category ready to transmit.
34431      *                    Note that the TID specified in bits 0-7 does not
34432      *                    apply to UL; the TID-to-AC mapping applied to DL
34433      *                    data that can be adjusted by the TID specified
34434      *                    in bits 0-7 and the AC specified in bits 8-9 is
34435      *                    distinct from the TID-to-AC mapping applied to
34436      *                    UL data.
34437      *  Bit   10        - DL latency config indication. If the bit is set
34438      *                    then DL TID will use this latency config.
34439      *  Bits  8 - 9     - This bit has info on the custom AC of DL TID.
34440      *                    Also if bit 11 is set, the AP will apply some
34441      *                    of these latency specs (in particular, burst_size)
34442      *                    to UL traffic for this AC, by sending UL triggers
34443      *                    until the desired amount of data has been received
34444      *                    within the service period.
34445      *  Bits  0 - 7     - Specifies the TID of interest that corresponds
34446      *                    to the AC specified in bits 8-9.  This can be
34447      *                    used to adjust the TID-to-AC mapping applied to
34448      *                    DL data (if bit 10 is set).
34449      */
34450     A_UINT32 latency_tid_info;
34451 } wmi_tid_latency_info;
34452 
34453 /*
34454  * Currently wmi_peer_tid_set_latency_request_fixed_param will be sent
34455  * per TID per latency configured client.
34456  * In future this command might come for multiple latency configured
34457  * clients together.
34458  * The clients are expected to be associated while receiving this command.
34459  */
34460 
34461 typedef struct {
34462     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_latency_config_fixed_param */
34463     A_UINT32 pdev_id;
34464     /*
34465      * Following this structure is the TLV:
34466      * struct wmi_tid_latency_info latency_info[];
34467      */
34468 } wmi_peer_tid_latency_config_fixed_param;
34469 
34470 #define WMI_ATF_GROUP_CFG_PEER_BIT_POS     0
34471 #define WMI_ATF_GROUP_CFG_PEER_NUM_BITS    1
34472 
34473 #define WMI_ATF_GROUP_GET_CFG_PEER_BIT(atf_peer_flags) \
34474     WMI_GET_BITS(atf_peer_flags,WMI_ATF_GROUP_CFG_PEER_BIT_POS,WMI_ATF_GROUP_CFG_PEER_NUM_BITS)
34475 
34476 #define WMI_ATF_GROUP_SET_CFG_PEER_BIT(atf_peer_flags,val) \
34477     WMI_SET_BITS(atf_peer_flags,WMI_ATF_GROUP_CFG_PEER_BIT_POS,WMI_ATF_GROUP_CFG_PEER_NUM_BITS,val)
34478 
34479 typedef struct {
34480     /** TLV tag and len; tag equals
34481      *  WMITLV_TAG_STRUC_wmi_peer_atf_ext_info */
34482     A_UINT32 tlv_header;
34483     wmi_mac_addr peer_macaddr;
34484     A_UINT32 atf_group_id; /* Group Id of the peers for ATF SSID grouping */
34485     /* atf_peer_flags
34486      *  Bits 1-31  - Reserved (Shall be zero)
34487      *  Bit  0     - Configured Peer Indication (0/1), this bit would be set by
34488      *               host to indicate that the peer has airtime % configured
34489      *               explicitly by user.
34490      */
34491     A_UINT32 atf_peer_flags;
34492 } wmi_peer_atf_ext_info;
34493 
34494 typedef struct {
34495     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_atf_ext_request_fixed_param */
34496     A_UINT32 pdev_id;
34497     /*
34498      * Following this structure is the TLV:
34499      * struct wmi_peer_atf_ext_info peer_ext_info[];
34500      */
34501 } wmi_peer_atf_ext_request_fixed_param;
34502 
34503 /* Structure for Bandwidth Fairness peer information */
34504 typedef struct {
34505     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bwf_peer_info */
34506     A_UINT32 tlv_header;
34507     wmi_mac_addr peer_macaddr;
34508     A_UINT32 bwf_guaranteed_bandwidth; /* BWF guaranteed_bandwidth for the peers in mbps */
34509     A_UINT32 bwf_max_airtime; /* BWF Maximum airtime percentage that can be allocated to the peer to meet the guaranteed_bandwidth */
34510     A_UINT32 bwf_peer_priority; /* BWF priority of the peer to allocate the tokens dynamically */
34511     A_UINT32 vdev_id;
34512     A_UINT32 pdev_id;
34513 } wmi_bwf_peer_info;
34514 
34515 /* Structure for Bandwidth Fairness peer request */
34516 typedef struct {
34517     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param */
34518     A_UINT32 num_peers;
34519     /*
34520      * Following this structure is the TLV:
34521      * struct wmi_bwf_peer_info peer_info[num_peers];
34522      */
34523 } wmi_peer_bwf_request_fixed_param;
34524 
34525 /* Equal distribution of ATF air time within an VDEV. */
34526 typedef struct {
34527     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param */
34528     A_UINT32 vdev_id;
34529     A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
34530     A_UINT32 pdev_id;
34531 } wmi_vdev_atf_request_fixed_param;
34532 
34533 typedef struct {
34534     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param */
34535     /** pdev_id for identifying the MAC
34536      * See macros starting with WMI_PDEV_ID_ for values.
34537      */
34538     A_UINT32 pdev_id;
34539     /** parameter   */
34540     A_UINT32 param;
34541 } wmi_pdev_get_ani_cck_config_cmd_fixed_param;
34542 
34543 typedef struct {
34544     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param */
34545     /** pdev_id for identifying the MAC
34546      * See macros starting with WMI_PDEV_ID_ for values.
34547      */
34548     A_UINT32 pdev_id;
34549     /** parameter   */
34550     A_UINT32 param;
34551 } wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
34552 
34553 typedef struct {
34554     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param */
34555     A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
34556     A_UINT32 qb_enable;
34557     wmi_mac_addr peer_macaddr;
34558 } WMI_QBOOST_CFG_CMD_fixed_param;
34559 
34560 #define WMI_INST_STATS_INVALID_RSSI 0
34561 
34562 typedef struct {
34563     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param */
34564     A_UINT32 iRSSI; /* dB above the noise floor */
34565     /* peer MAC address */
34566     wmi_mac_addr peer_macaddr;
34567     A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
34568 } wmi_inst_rssi_stats_resp_fixed_param;
34569 
34570 typedef struct {
34571     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info */
34572     A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
34573 } wmi_peer_cck_ofdm_rate_info;
34574 
34575 typedef struct {
34576     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info */
34577     A_UINT32 ratecode_20;  /* Rate code for 20MHz BW */
34578     A_UINT32 ratecode_40;  /* Rate code for 40MHz BW */
34579     A_UINT32 ratecode_80;  /* Rate code for 80MHz BW */
34580     A_UINT32 ratecode_160; /* Rate code for 160MHz BW */
34581     A_UINT32 ratecode_320; /* Rate code for 320MHz BW */
34582 } wmi_peer_mcs_rate_info;
34583 
34584 typedef struct {
34585     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param */
34586     wmi_mac_addr peer_macaddr;
34587     A_UINT32 ratecount; /* Max Rate count for each mode */
34588     A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
34589     A_UINT32 pdev_id; /* ID of the pdev this peer belongs to */
34590     A_UINT32 ratecount_ext; /* Max Rate count for 160, 320MHz */
34591     /*
34592      * Following this structure are the TLV:
34593      * struct wmi_peer_cck_ofdm_rate_info;
34594      * struct wmi_peer_mcs_rate_info;
34595      */
34596 } wmi_peer_ratecode_list_event_fixed_param;
34597 
34598 typedef struct wmi_wds_addr_event {
34599     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param */
34600     A_UINT32 event_type[4];
34601     wmi_mac_addr peer_mac;
34602     wmi_mac_addr dest_mac;
34603     A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
34604 } wmi_wds_addr_event_fixed_param;
34605 
34606 /*
34607  * Enum values for WMI_PEER_PS_SUPPORTED_BITMAP field,
34608  * in wmi_peer_sta_ps_statechange_event structure.
34609  */
34610 typedef enum {
34611    /* Used to indicate that peer_ps_valid is valid */
34612    WMI_PEER_PS_VALID_SUPPORTED =     0x00000001,
34613    /* Used to indicate that peer_ps_timestamp field is valid */
34614    WMI_PEER_PS_TIMESTAMP_SUPPORTED = 0x00000002,
34615 } WMI_PEER_PS_SUPPORTED_BITMAP;
34616 
34617 typedef struct {
34618     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param */
34619     wmi_mac_addr peer_macaddr;
34620     A_UINT32 peer_ps_state;
34621     /* Start of extended structure */
34622     /* Bitmap to indicate which fields in the extended structure are valid.
34623      * Bitmap values correspond to enum WMI_PEER_PS_SUPPORTED_BITMAP
34624      */
34625     A_UINT32 peer_ps_supported_bitmap;
34626     /* This field is used to indicate host of a valid PS state change.
34627      * 1 - indicates a valid PS state change.
34628      * 0 - indicates an invalid PS state change.
34629      * Host to ignore the power save duration calculation when peer_ps_valid = 0
34630      */
34631     A_UINT32 peer_ps_valid;
34632     /* This field indicates the time since target boot-up in MilliSeconds. */
34633     A_UINT32 peer_ps_timestamp;
34634     /* Indicates the vdev id for MLO case */
34635     wmi_vdev_id_info vdev_id_info;
34636 } wmi_peer_sta_ps_statechange_event_fixed_param;
34637 
34638 /* WMI_PDEV_FIPS_EVENTID */
34639 typedef struct {
34640     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param */
34641     union {
34642         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
34643         /** pdev_id for identifying the MAC
34644          * See macros starting with WMI_PDEV_ID_ for values.
34645          */
34646         A_UINT32 pdev_id;
34647     };
34648     A_UINT32 error_status; /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
34649     A_UINT32 data_len;     /* Data length */
34650 /*
34651  * Following this structure is the TLV:
34652  *    A_UINT32 data[1]; <-- Out Data (keep this in the end)
34653  */
34654 } wmi_pdev_fips_event_fixed_param;
34655 
34656 typedef struct {
34657     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param */
34658     A_UINT32 pdev_id;
34659     A_UINT32 fips_cookie;    /* Cookie value to identify test vector */
34660     A_UINT32 cmd_frag_idx;   /* Fragment Number */
34661     A_UINT32 more_bit;
34662     A_UINT32 error_status; /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
34663     A_UINT32 data_len;     /* Data length CTlen+ TAGlen*/
34664 /*
34665  * Following this structure is the TLV:
34666  *    A_UINT32 data[1]; <-- Out Data (ciphertext+tag)
34667  */
34668 } wmi_pdev_fips_extend_event_fixed_param;
34669 
34670 typedef struct {
34671     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param */
34672     union {
34673         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
34674         /** pdev_id for identifying the MAC
34675          * See macros starting with WMI_PDEV_ID_ for values.
34676          */
34677         A_UINT32 pdev_id;
34678     };
34679     /* Noise threshold iterations with high values */
34680     A_UINT32 noise_floor_report_iter;
34681     /* Total noise threshold iterations */
34682     A_UINT32 noise_floor_total_iter;
34683 } wmi_pdev_channel_hopping_event_fixed_param;
34684 
34685 enum {
34686     WMI_PDEV_RESERVE_AST_ENTRY_OK,
34687     WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
34688     WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
34689 };
34690 
34691 typedef struct {
34692     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param */
34693     union {
34694         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
34695         /** pdev_id for identifying the MAC
34696          * See macros starting with WMI_PDEV_ID_ for values.
34697          */
34698         A_UINT32 pdev_id;
34699     };
34700     A_UINT32 rate_flags;
34701     /**
34702     * FLAG_ONE_CHAIN     0x00000001  - one chain mask
34703     * FLAG_TWO_CHAIN     0x00000003  - two chain mask
34704     * FLAG_THREE_CHAIN   0x00000007  - three chain mask
34705     * FLAG_FOUR_CHAIN    0x0000000F  - four chain mask
34706     * FLAG_FIVE_CHAIN    0x0000001F  - five chain mask
34707     * FLAG_SIX_CHAIN     0x0000003F  - six chain mask
34708     * FLAG_SEVEN_CHAIN   0x0000007F  - seven chain mask
34709     * FLAG_EIGHT_CHAIN   0x000000FF  - eight chain mask
34710     * FLAG_STBC          0x00000100  - STBC is set
34711     * FLAG_40MHZ         0x00000200  - bits 9-10 used for BW:
34712     * FLAG_80MHZ         0x00000400    (bw >> 9) & 3 will give
34713     * FLAG_160MHZ        0x00000600    1 -> 40 MHz, 2 -> 80 MHz, 3 -> 160 MHz
34714     * FLAG_TXBF          0x00000800 - Tx Bf enabled
34715     * FLAG_RTSENA        0x00001000 - RTS enabled
34716     * FLAG_CTSENA        0x00002000 - CTS enabled
34717     * FLAG_LDPC          0x00004000 - LDPC set
34718     * FLAG_SGI           0x00008000 - Short guard interval
34719     *                   (0x00010000-0x00080000 unused)
34720     *------------------
34721     * 0x00100000-0x00700000 used for SU/MU/OFDMA tx mode
34722     * FLAG_SU            0x00100000 - SU Data
34723     * FLAG_DL_MU_MIMO_AC 0x00200000 - DL AC MU data
34724     * FLAG_DL_MU_MIMO_AX 0x00300000 - DL AX MU data
34725     * FLAG_DL_OFDMA      0x00400000 - DL OFDMA data
34726     * FLAG_UL_OFDMA      0x00500000 - UL OFDMA data
34727     * FLAG_UL_MU_MIMO    0x00600000 - UL MU data
34728     *------------------
34729     * */
34730     A_UINT32 nss;
34731     /**
34732     * NSS 0x0 - 0x7
34733     * */
34734     A_UINT32 preamble;
34735     /**
34736     * PREAM_OFDM - 0x0
34737     * PREAM_CCK  - 0x1
34738     * PREAM_HT   - 0x2
34739     * PREAM_VHT  - 0x3
34740     * PREAM_HE   - 0x4
34741     * */
34742     A_UINT32 hw_rate;
34743     /**
34744      * *** HW_OFDM_RATE ***
34745      * OFDM_48_MBPS - 0x0
34746      * OFDM_24_MBPS - 0x1
34747      * OFDM_12_MBPS - 0x2
34748      * OFDM_6_MBPS  - 0x3
34749      * OFDM_54_MBPS - 0x4
34750      * OFDM_36_MBPS - 0x5
34751      * OFDM_18_MBPS - 0x6
34752      * OFDM_9_MBPS  - 0x7
34753      *
34754      * *** HW_CCK_RATE ***
34755      * CCK_11_LONG_MBPS   - 0x0
34756      * CCK_5_5_LONG_MBPS  - 0x1
34757      * CCK_2_LONG_MBPS    - 0x2
34758      * CCK_1_LONG_MBPS    - 0x3
34759      * CCK_11_SHORT_MBPS  - 0x4
34760      * CCK_5_5_SHORT_MBPS - 0x5
34761      * CCK_2_SHORT_MBPS   - 0x6
34762      *
34763      * *** HW_HT / VHT_RATE ***
34764      * MCS 0x0 - 0xb
34765      * */
34766 } wmi_pdev_get_tpc_cmd_fixed_param;
34767 
34768 typedef struct {
34769     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_chip_power_stats_cmd_fixed_param */
34770     /** pdev_id for identifying the MAC
34771      * See macros starting with WMI_PDEV_ID_ for values.
34772      */
34773     A_UINT32 pdev_id;
34774 } wmi_pdev_get_chip_power_stats_cmd_fixed_param;
34775 
34776 typedef struct {
34777     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_bcn_recv_stats_cmd_fixed_param */
34778     /** VDEV identifier */
34779     A_UINT32 vdev_id;
34780 } wmi_vdev_get_bcn_recv_stats_cmd_fixed_param;
34781 
34782 typedef struct {
34783     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_xgap_enable_cmd_fixed_param */
34784     A_UINT32 beacon_interval; /* in TU */
34785     A_UINT32 sap_lp_flag;     /* bit 0 : set/unset for enter/exit XGAP */
34786     A_UINT32 dialog_token;
34787     A_UINT32 duration;        /* in us : sap LP enter/exit duration, 0 for permanent exit */
34788 } wmi_xgap_enable_cmd_fixed_param;
34789 
34790 typedef struct {
34791     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_xgap_enable_complete_event_fixed_param */
34792     A_UINT32 dialog_token;
34793     A_UINT32 next_tsf_low32;
34794     A_UINT32 next_tsf_high32;
34795 } wmi_xgap_enable_complete_event_fixed_param;
34796 
34797 /*
34798  * wmi mws-coex command IDs
34799  */
34800 typedef enum {
34801     WMI_MWS_COEX_STATE = 0x01,
34802     WMI_MWS_COEX_DPWB_STATE,
34803     WMI_MWS_COEX_TDM_STATE,
34804     WMI_MWS_COEX_IDRX_STATE,
34805     WMI_MWS_COEX_ANTENNA_SHARING_STATE,
34806 } wmi_mws_coex_cmd_id;
34807 
34808 typedef struct {
34809     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_cmd_fixed_param */
34810     /** VDEV identifier */
34811     A_UINT32 vdev_id;
34812     /** Command ID (type: wmi_mws_coex_cmd_id) */
34813     A_UINT32 cmd_id;
34814 } wmi_vdev_get_mws_coex_info_cmd_fixed_param;
34815 
34816 typedef struct {
34817     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param */
34818     /** pdev_id for identifying the MAC
34819      * See macros starting with WMI_PDEV_ID_ for values.
34820      */
34821     A_UINT32 pdev_id;
34822    /*
34823     * Following this structure is the TLV:
34824     *    A_UINT32 tpc[2];
34825     *    tpc[0] - maximum power per rate
34826     *    tpc[1] - minimum power per rate
34827     *    Currently this event only provides max and min power limits
34828     *    for a single rate.  In the future this event may be expanded
34829     *    to provide the information for multiple rates.
34830     *    At that time, the format of the data will be provided.
34831     */
34832 } wmi_pdev_tpc_event_fixed_param;
34833 
34834 typedef struct {
34835     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param */
34836     union {
34837         A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
34838         /** pdev_id for identifying the MAC
34839          * See macros starting with WMI_PDEV_ID_ for values.
34840          */
34841         A_UINT32 pdev_id;
34842     };
34843     A_UINT32 nfdBr_len;
34844     A_UINT32 nfdBm_len;
34845     A_UINT32 freqNum_len;
34846    /*
34847     * Following this structure is the TLV:
34848     * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
34849     * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
34850     * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
34851     */
34852 } wmi_pdev_nfcal_power_all_channels_event_fixed_param;
34853 
34854 typedef struct {
34855     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr */
34856     A_UINT32 nfdBr;
34857 } wmi_pdev_nfcal_power_all_channels_nfdBr;
34858 
34859 typedef struct {
34860     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm */
34861     A_UINT32 nfdBm;
34862 } wmi_pdev_nfcal_power_all_channels_nfdBm;
34863 
34864 typedef struct {
34865     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum */
34866     A_UINT32 freqNum;
34867 } wmi_pdev_nfcal_power_all_channels_freqNum;
34868 
34869 /* Bit set/unset definitions for valid_bitmap field in ani_cck_event */
34870 #define WMI_ANI_CCK_EVENT_PDEV_ID_SET(bitmap, val) \
34871     WMI_SET_BITS(bitmap, 0, 8, val)
34872 #define WMI_ANI_CCK_EVENT_PDEV_ID_GET(bitmap) \
34873     WMI_GET_BITS(bitmap, 0, 8)
34874 
34875 #define WMI_ANI_CCK_EVENT_PDEV_ID_VALID_BIT_SET(bitmap, val) \
34876     WMI_SET_BITS(bitmap, 31, 1, val)
34877 #define WMI_ANI_CCK_EVENT_PDEV_ID_VALID_BIT_GET(bitmap) \
34878     WMI_GET_BITS(bitmap, 31, 1)
34879 
34880 typedef struct {
34881     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param */
34882     A_UINT32 cck_level;
34883     union {
34884         A_UINT32 pdev_id_valid__pdev_id__word;
34885         struct {
34886             /**
34887              * word containng the pdev_id for identifying the MAC
34888              * Contents:
34889              *     bits  7:0 - pdev ID
34890              *     bits 30:8 - reserved
34891              *     bit  31   - pdev ID valid flag
34892              * See macros starting with WMI_ANI_CCK_EVENT_PDEV_ID_ for values.
34893              * pdev_id is valid when pdev_id_valid is set.
34894              */
34895             A_UINT32 pdev_id: 8,
34896                      reserved: 23,
34897                      pdev_id_valid: 1;
34898         };
34899     };
34900 } wmi_ani_cck_event_fixed_param;
34901 
34902 typedef enum wmi_power_debug_reg_fmt_type {
34903     /* WMI_POWER_DEBUG_REG_FMT_TYPE_ROME -> Dumps following 12 Registers
34904      *     SOC_SYSTEM_SLEEP
34905      *     WLAN_SYSTEM_SLEEP
34906      *     RTC_SYNC_FORCE_WAKE
34907      *     MAC_DMA_ISR
34908      *     MAC_DMA_TXRX_ISR
34909      *     MAC_DMA_ISR_S1
34910      *     MAC_DMA_ISR_S2
34911      *     MAC_DMA_ISR_S3
34912      *     MAC_DMA_ISR_S4
34913      *     MAC_DMA_ISR_S5
34914      *     MAC_DMA_ISR_S6
34915      *     MAC_DMA_ISR_S7
34916      */
34917     WMI_POWER_DEBUG_REG_FMT_TYPE_ROME,
34918 
34919     WMI_POWER_DEBUG_REG_FMT_TYPE_MAX = 0xf,
34920 } WMI_POWER_DEBUG_REG_FMT_TYPE;
34921 
34922 typedef struct {
34923     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_stats_event_fixed_param */
34924     A_UINT32 cumulative_sleep_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
34925     A_UINT32 cumulative_total_on_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
34926     A_UINT32 deep_sleep_enter_counter; /* count of number of times chip enterred deep sleep */
34927     A_UINT32 last_deep_sleep_enter_tstamp_ms; /* Last Timestamp when Chip went to deep sleep */
34928     A_UINT32 debug_register_fmt; /* WMI_POWER_DEBUG_REG_FMT_TYPE enum, describes debug registers being dumped as part of the event */
34929     A_UINT32 num_debug_register; /* number of debug registers being sent to host */
34930     /*
34931      * Following this structure is the TLV:
34932      *    A_UINT32 debug_registers[num_debug_registers];
34933      */
34934 } wmi_pdev_chip_power_stats_event_fixed_param;
34935 
34936 typedef struct {
34937     A_UINT32 tlv_header;  /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_bcn_recv_stats_fixed_param */
34938     A_UINT32 vdev_id;
34939     /* total_bcn_cnt
34940      * total beacon count (tbtt instances)
34941      * After this value reaches 255 it saturates and stays at 255.
34942      * This field is used to determine which of the 256 bits in the
34943      * bmiss_bitmap field are valid.
34944      */
34945     A_UINT32 total_bcn_cnt;
34946     /* total_bmiss_cnt
34947      * Total beacon miss count in last 255 beacons, max value is 255.
34948      * This value is the number of bits set within bmiss_bitmap.
34949      */
34950     A_UINT32 total_bmiss_cnt;
34951     /* bmiss_bitmap
34952      * This bitmap indicates the status of the last 255 beacons.
34953      * If a bit is set, that means the corresponding beacon was missed.
34954      * Bit 0 of bmiss_bitmap[0] represents the most recent beacon.
34955      * The total_bcn_cnt field indicates how many bits within bmiss_bitmap
34956      * are valid.
34957      */
34958     A_UINT32 bmiss_bitmap[8];
34959 } wmi_vdev_bcn_recv_stats_fixed_param;
34960 
34961 typedef struct {
34962     A_UINT32 tlv_header;  /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_fixed_param */
34963     A_UINT32 vdev_id;
34964 
34965     /* LTE-WLAN coexistence scheme bitmap
34966      * Indicates the final schemes applied for the current Coex scenario.
34967      * Bit 0 - TDM policy
34968      * Bit 1 - Forced TDM policy
34969      * Bit 2 - Dynamic Power Back-off policy
34970      * Bit 3 - Channel Avoidance policy
34971      * Bit 4 - Static Power Back-off policy
34972      */
34973     A_UINT32 coex_scheme_bitmap;
34974 
34975     /* Active conflict count
34976      * Indicates the number of Active conflicts for the current WLAN and LTE frequency combinations.
34977      */
34978     A_UINT32 active_conflict_count;
34979 
34980     /* Potential conflict count
34981      * Indicates the number of Potential conflicts for the current WLAN and LTE frequency combinations.
34982      */
34983     A_UINT32 potential_conflict_count;
34984 
34985     /* Bitmap of the group-0 WLAN channels to be avoided during LTE-WLAN coex operation.
34986      * Indicates the WLAN channels to be avoided in b/w WLAN CH-1 and WLAN CH-14.
34987      */
34988     A_UINT32 chavd_group0_bitmap;
34989 
34990     /* Bitmap of the group-1 WLAN channels to be avoided during LTE-WLAN coex operation.
34991      * Indicates the WLAN channels to be avoided in b/w WLAN CH-36 and WLAN CH-64.
34992      */
34993     A_UINT32 chavd_group1_bitmap;
34994 
34995     /* Bitmap of the group-2 WLAN channels to be avoided during LTE-WLAN coex operation.
34996      * Indicates the WLAN channels to be avoided in b/w WLAN CH-100 and WLAN CH-140.
34997      */
34998     A_UINT32 chavd_group2_bitmap;
34999 
35000     /* Bitmap of the group-3 WLAN channels to be avoided during LTE-WLAN coex operation.
35001      * Indicates the WLAN channels to be avoided in b/w WLAN CH-149 and WLAN CH-165.
35002      */
35003     A_UINT32 chavd_group3_bitmap;
35004 } wmi_vdev_get_mws_coex_state_fixed_param;
35005 
35006 typedef struct {
35007     A_UINT32 tlv_header;  /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_dpwb_state_fixed_param */
35008     A_UINT32 vdev_id;
35009 
35010     /* Current state of the Dynamic Power Back-off state machine
35011      * MWSCOEX_PWB_UNINIT_STATE                        = 0, PWB state machine is in un-intialized state.
35012      * MWSCOEX_PWB_WLAN_ON_SINR_START_STATE            = 1, SINR measurement starts when WLAN is on
35013      * MWSCOEX_PWB_WLAN_ON_WAIT_RESP_STATE             = 2, Waiting for SINR response when WLAN is on
35014      * MWSCOEX_PWB_WLAN_OFF_AWAIT_STATE                = 3, WLAN off state for buffer between SINR on/off measurement.
35015      * MWSCOEX_PWB_WLAN_OFF_SINR_START_STATE           = 4, SINR measurement starts when WLAN is off
35016      * MWSCOEX_PWB_WLAN_OFF_WAIT_RESP_STATE            = 5, Waiting for SINR response when WLAN is off
35017      * MWSCOEX_PWB_WLAN_OFF_SINR_STOP_STATE            = 6, SINR measurement stops when WLAN is off
35018      * MWSCOEX_PWB_FORCED_TDM_STATE                    = 7, Entered Forced TDM state.
35019      * MWSCOEX_PWB_HALTED_STATE                        = 8, Power back-off algorithm halted.
35020      * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_START_STATE     = 9, SINR measurement starts in WLAN always on state.
35021      * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_STOP_STATE      = 10, SINR measurement stops in WLAN always on state.
35022      */
35023     A_UINT32 current_dpwb_state;
35024 
35025     /* P(N+1) value in dBm i.e. Tx power to be applied in the next Dynamic Power Back-off cycle,
35026      * where P(N) is the power applied during current cycle.
35027      * ranges from 3dBm to 21 dBM
35028      */
35029     A_INT32 pnp1_value;
35030 
35031     /* Indicates the duty cycle of current LTE frame.
35032      * Duty cycle: Number of UL slots with uplink data and allocated RBs.
35033      */
35034     A_UINT32 lte_dutycycle;
35035 
35036     /* LTE SINR value in dB, when WLAN is ON. */
35037     A_INT32 sinr_wlan_on;
35038 
35039     /* LTE SINR value in dB, when WLAN is OFF. */
35040     A_INT32 sinr_wlan_off;
35041 
35042     /* LTE blocks with error for the current bler report.
35043      * Number of LTE blocks with error for a given number (block_count)  of LTE blocks.
35044      */
35045     A_UINT32 bler_count;
35046 
35047     /* Number of LTE blocks considered for bler count report.
35048      * Bler repot will be generated after the reception of every "block_count" number of blocks.
35049      */
35050     A_UINT32 block_count;
35051 
35052     /* WLAN RSSI level
35053      * WLAN RSSI is divided in to 3 levels i.e. Good/Moderate/Low (configurable inside f/w)
35054      * 0-Good, 1-Moderate, 2-Low
35055      */
35056     A_UINT32 wlan_rssi_level;
35057 
35058     /* WLAN RSSI value in dBm considered in Dynamic Power back-off algorithm
35059      * Dynamic power back-off algorithm considers either Rx data frame RSSI/Beacon RSSI based on some constraints.
35060      */
35061     A_INT32 wlan_rssi;
35062 
35063     /* Indicates whether any TDM policy triggered from Dynamic power back-off policy.
35064      * 1 - TDM triggered.
35065      * 0 - TDM not triggered.
35066      */
35067     A_UINT32 is_tdm_running;
35068 } wmi_vdev_get_mws_coex_dpwb_state_fixed_param;
35069 
35070 typedef struct {
35071     A_UINT32 tlv_header;  /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_tdm_state_fixed_param */
35072     A_UINT32 vdev_id;
35073     /* Time Division Multiplexing (TDM) LTE-Coex Policy type.
35074      * There are totally 4 types of TDM policies(1-SINR TDM, 2-RSSI TDM, 3-LOW RX RATE TDM, 4-STICKY TDM)
35075      * Bit 0 - SINR TDM policy.
35076      * Bit 1 - RSSI TDM policy.
35077      * Bit 2 - Low Rx rate TDM policy
35078      * Bit 3 - Sticky TDM policy
35079      */
35080     A_UINT32 tdm_policy_bitmap;
35081 
35082     /* TDM LTE/WLAN sub-frame bitmap
35083      * Indicates the bitmap of LTE/WLAN sub-frames.
35084      * value 0: WLAN slot.
35085      * value 1: LTE slot.
35086      */
35087     A_UINT32 tdm_sf_bitmap;
35088 } wmi_vdev_get_mws_coex_tdm_state_fixed_param;
35089 
35090 typedef struct {
35091     A_UINT32 tlv_header;  /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_idrx_state_fixed_param */
35092     A_UINT32 vdev_id;
35093 
35094     /* SUB0 LTE-coex tech.
35095      *------------------------
35096      * TECH          TECH_ID
35097      *------------------------
35098      * LTE              0
35099      * TDSCDMA          1
35100      * GSM1             2
35101      * ONEX             3
35102      * HDR              4
35103      * WCDMA            5
35104      * GSM2             6
35105      * GSM3             7
35106      * WCDMA2           8
35107      * LTE2             9
35108      * Indicates the type of WWAN technology used as SUB0 i.e. SIM slot 1
35109      */
35110     A_UINT32 sub0_techid;
35111 
35112     /* SUB0 mitigation policy.
35113      * Indicates the mitigation policy used to coexist with WLAN.
35114      * 1 - Tx blanking
35115      * 2 - Static power back-off
35116      */
35117     A_UINT32 sub0_policy;
35118 
35119     /* Set if SUB0 is in link critical state.
35120      * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side.
35121      */
35122     A_UINT32 sub0_is_link_critical;
35123 
35124     /* LTE SUB0 imposed static power applied to WLAN due to LTE-WLAN coex.
35125      * Value of static power applied during LTE page cycle ranges from 3-21 dBm.
35126      */
35127     A_INT32 sub0_static_power;
35128 
35129     /* LTE SUB0 RSSI value in dBm */
35130     A_INT32 sub0_rssi;
35131 
35132     /* SUB1 LTE-coex tech.
35133      *------------------------
35134      * TECH          TECH_ID
35135      *------------------------
35136      * LTE              0
35137      * TDSCDMA          1
35138      * GSM1             2
35139      * ONEX             3
35140      * HDR              4
35141      * WCDMA            5
35142      * GSM2             6
35143      * GSM3             7
35144      * WCDMA2           8
35145      * LTE2             9
35146      * Indicates the type of WWAN technology used as SUB1 i.e. SIM slot 2
35147      */
35148     A_UINT32 sub1_techid;
35149 
35150     /* SUB1 mitigation policy.
35151      * Indicates the mitigation policy used to coexist with WLAN.
35152      * 1 - Tx blanking
35153      * 2 - Static power back-off
35154      */
35155     A_UINT32 sub1_policy;
35156 
35157     /* Set if SUB1 is in link critical state.
35158      * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side.
35159      */
35160     A_UINT32 sub1_is_link_critical;
35161 
35162     /* LTE SUB1 imposed static power applied to WLAN due to LTE-WLAN coex.
35163      * Value of static power applied during LTE page cycle ranges from 3-21 dBm.
35164      */
35165     A_INT32 sub1_static_power;
35166 
35167     /* LTE SUB1 RSSI value in dBm */
35168     A_INT32 sub1_rssi;
35169 } wmi_vdev_get_mws_coex_idrx_state_fixed_param;
35170 
35171 typedef struct {
35172     A_UINT32 tlv_header;  /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param */
35173     A_UINT32 vdev_id;
35174 
35175     /* BDF values of Coex flags.
35176      * coexflag 0x1 = MWS Coex enabled
35177      * coexflag 0x3 = MWS Coex enabled + Antenna sharing enabled for WLAN operating in 2.4GHz band.
35178      */
35179     A_UINT32 coex_flags;
35180 
35181     /* BDF values of Coex Antenna sharing config
35182      * coex_config 0x0 = no Antenna sharing
35183      * coexconfig 0x1 = switched based Antenna sharing
35184      * coexconfig 0x2 = splitter based Antenna sharing
35185      */
35186     A_UINT32 coex_config;
35187 
35188     /* Tx Chain mask value
35189      * Bit 0: Tx chain-0
35190      * Bit 1: Tx Chain-1
35191      * value: 0x1 - Operating in 1X1
35192      * value: 0x3 - Operating in 2X2
35193      */
35194     A_UINT32 tx_chain_mask;
35195 
35196     /* Rx Chain mask value
35197      * Bit 0: Rx chain-0
35198      * Bit 1: Rx Chain-1
35199      * value: 0x1 - Operating in 1X1
35200      * value: 0x3 - Operating in 2X2
35201      */
35202     A_UINT32 rx_chain_mask;
35203 
35204     /* Currently active Rx Spatial streams
35205      * Bit 0: Rx Spatial Stream-0
35206      * Bit 1: Rx Spatial Stream-1
35207      */
35208     A_UINT32 rx_nss;
35209 
35210     /* Forced MRC policy type
35211      * BTC_FORCED              (0x01)
35212      * RSSI_FORCED             (0x02)
35213      * MODEM_ACQ_FORCED        (0x04)
35214      */
35215     A_UINT32 force_mrc;
35216 
35217     /* RSSI value considered for MRC
35218      * 1: Data RSSI
35219      * 2: Beacon RSSI
35220      */
35221     A_UINT32 rssi_type;
35222 
35223     /* RSSI value measured at Chain-0 in dBm */
35224     A_INT32 chain0_rssi;
35225 
35226     /* RSSI value measured at Chain-1 in dBm */
35227     A_INT32 chain1_rssi;
35228 
35229     /* RSSI value of two chains combined in dBm */
35230     A_INT32 combined_rssi;
35231 
35232     /* Absolute imbalance between two Rx chains in dB */
35233     A_UINT32 imbalance;
35234 
35235     /* RSSI threshold defined for the above imbalance value in dBm.
35236      * Based on the degree of imbalance between the rx chains, different
35237      * RSSI thresholds are used to determine whether MRC (Maximum-Ratio
35238      * Combining) use of multiple rx chains is suitable.
35239      * This field shows the RSSI threshold below which MRC is used.
35240      */
35241     A_INT32 mrc_threshold;
35242 
35243     /* Antenna grant duration to WLAN, in milliseconds */
35244     A_UINT32 grant_duration;
35245 } wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param;
35246 
35247 typedef enum wmi_chip_power_save_failure_reason_code_type {
35248     WMI_PROTOCOL_POWER_SAVE_FAILURE_REASON,
35249     WMI_HW_POWER_SAVE_FAILURE_REASON,
35250     WMI_CSS_LOCKED_POWER_FAILURE_REASON,
35251     WMI_MAC0_LOCKED_POWER_FAILURE_REASON,
35252     WMI_MAC1_LOCKED_POWER_FAILURE_REASON,
35253     WMI_POWER_SAVE_FAILURE_REASON_MAX = 0xf,
35254 } WMI_POWER_SAVE_FAILURE_REASON_TYPE;
35255 
35256 typedef struct {
35257     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_save_failure_detected_fixed_param */
35258     A_UINT32 power_save_failure_reason_code; /* Chip power save failuire reason as defined in WMI_POWER_SAVE_FAILURE_REASON_TYPE */
35259     A_UINT32 protocol_wake_lock_bitmap[4]; /* bitmap with bits set for modules (from WLAN_MODULE_ID enum) voting against sleep for prolonged duration */
35260 } wmi_chip_power_save_failure_detected_fixed_param;
35261 
35262 /* Bit set/unset definitions for valid_bitmap field in ani_ofdm_event */
35263 #define WMI_ANI_OFDM_EVENT_PDEV_ID_BIT_SET(bitmap, val) \
35264     WMI_SET_BITS(bitmap, 0, 8, val)
35265 #define WMI_ANI_OFDM_EVENT_PDEV_ID_BIT_GET(bitmap) \
35266     WMI_GET_BITS(bitmap, 0, 8)
35267 
35268 #define WMI_ANI_OFDM_EVENT_PDEV_ID_VALID_BIT_SET(bitmap, val) \
35269     WMI_SET_BITS(bitmap, 31, 1, val)
35270 #define WMI_ANI_OFDM_EVENT_PDEV_ID_VALID_BIT_GET(bitmap) \
35271     WMI_GET_BITS(bitmap, 31, 1)
35272 
35273 typedef struct {
35274     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param */
35275     A_UINT32 ofdm_level;
35276     union {
35277         A_UINT32 pdev_id_valid__pdev_id__word;
35278         struct {
35279             /**
35280              * word containng the pdev_id for identifying the MAC
35281              * Contents:
35282              *     bits  7:0 - pdev ID
35283              *     bits 30:8 - reserved
35284              *     bit  31   - pdev ID valid flag
35285              * See macros starting with WMI_ANI_OFDM_EVENT_PDEV_ID_ for values.
35286              * pdev_id is valid when pdev_id_valid is set.
35287              */
35288             A_UINT32 pdev_id: 8,
35289                      reserved: 23,
35290                      pdev_id_valid: 1;
35291         };
35292     };
35293 } wmi_ani_ofdm_event_fixed_param;
35294 
35295 /* When a bit is set it specifies the particular WLAN traffic type is high priority.
35296  * BT low priority traffic has higher priority than WLAN low priority traffic and has
35297  * lower priority when compared to WLAN high priority traffic.
35298  * BT high priority traffic has higher priority than WLAN low/high priority traffic.
35299  */
35300 #define WMI_PDEV_BE_PRIORITY_BIT     (1<<0)
35301 #define WMI_PDEV_BK_PRIORITY_BIT     (1<<1)
35302 #define WMI_PDEV_VI_PRIORITY_BIT     (1<<2)
35303 #define WMI_PDEV_VO_PRIORITY_BIT     (1<<3)
35304 #define WMI_PDEV_BEACON_PRIORITY_BIT (1<<4)
35305 #define WMI_PDEV_MGMT_PRIORITY_BIT   (1<<5)
35306 #define WMI_PDEV_IS_BE_PRIORITY_SET(val) ((val) & WMI_PDEV_BE_PRIORITY_BIT)
35307 #define WMI_PDEV_IS_BK_PRIORITY_SET(val) ((val) & WMI_PDEV_BK_PRIORITY_BIT)
35308 #define WMI_PDEV_IS_VI_PRIORITY_SET(val) ((val) & WMI_PDEV_VI_PRIORITY_BIT)
35309 #define WMI_PDEV_IS_VO_PRIORITY_SET(val) ((val) & WMI_PDEV_VO_PRIORITY_BIT)
35310 #define WMI_PDEV_IS_BEACON_PRIORITY_SET(val) ((val) & WMI_PDEV_BEACON_PRIORITY_BIT)
35311 #define WMI_PDEV_IS_MGMT_PRIORITY_SET(val) ((val) & WMI_PDEV_MGMT_PRIORITY_BIT)
35312 
35313 /*
35314  * For Maple 3-way coex, The interface will have following configurable
35315  * priority bits to set relative priorities of WLAN/BT/3-radio PTA.
35316  * To send below config host will use WMI_COEX_CONFIG_CMD command with
35317  * config type WMI_COEX_CONFIG_THREE_WAY_COEX_START
35318  * WMI_COEX_CONFIG_THREE_WAY_COEX_RESET
35319  *
35320  ** Bits 0 to 7 corresponds to Wifi
35321  * Bit - 0: QCA_WIFI_BE
35322  * Bit - 1: QCA_WIFI_BK
35323  * Bit - 2: QCA_WIFI_VI
35324  * Bit - 3: QCA_WIFI_VO
35325  * Bit - 4: QCA_WIFI_BEACON
35326  * Bit - 5: QCA_WIFI_MGMT
35327  * Bits 6 - 7: Reserved
35328  *
35329  ** Bits 8 to 15 corresponds to BT
35330  * Bit - 8: QCA_BT_ADVERTISER
35331  * Bit - 9: QCA_BT_SCANNER
35332  * Bit - 10: QCA_BT_BLE_CONNECTION
35333  * Bits 11 to 15: Reserved
35334  *
35335  ** Bits 16 to 24 corresponds to 3-radio PTA,
35336  * It can be anything BT/ZigBee connected to 802.15.4 radio
35337  * Bit - 16: QCA_PTA_THIRD_RADIO_LOW
35338  * Bit - 17: QCA_PTA_THIRD_RADIO_HIGH
35339  * Bits 18 to 24: Reserved
35340  *
35341  ** Bits 25 to 31 Reserved for future use
35342  */
35343 #define WMI_PDEV_BT_ADVERTISER_PRIORITY_BIT      (1 <<  8)
35344 #define WMI_PDEV_BT_SCANNER_PRIORITY_BIT         (1 <<  9)
35345 #define WMI_PDEV_BT_BLE_CONNECTION_PRIORITY_BIT  (1 << 10)
35346 #define WMI_PDEV_IS_BT_ADVERTISER_PRIORITY_SET(val) \
35347     ((val) & WMI_PDEV_BT_ADVERTISER_PRIORITY_BIT)
35348 #define WMI_PDEV_IS_BT_SCANNER_PRIORITY_SET(val) \
35349     ((val) & WMI_PDEV_BT_SCANNER_PRIORITY_BIT)
35350 #define WMI_PDEV_IS_BT_BLE_CONNECTION_PRIORITY_SET(val) \
35351     ((val) & WMI_PDEV_BT_BLE_CONNECTION_PRIORITY_BIT)
35352 
35353 #define WMI_PDEV_PTA_THIRD_RADIO_LOW_PRIORITY_BIT  (1 << 16)
35354 #define WMI_PDEV_PTA_THIRD_RADIO_HIGH_PRIORITY_BIT (1 << 17)
35355 #define WMI_PDEV_IS_PTA_THIRD_RADIO_LOW_PRIORITY_SET(val) \
35356     ((val) & WMI_PDEV_PTA_THIRD_RADIO_LOW_PRIORITY_BIT)
35357 #define WMI_PDEV_IS_PTA_THIRD_RADIO_HIGH_PRIORITY_SET(val) \
35358     ((val) & WMI_PDEV_PTA_THIRD_RADIO_HIGH_PRIORITY_BIT)
35359 
35360 typedef enum wmi_coex_algo_type  {
35361     WMI_COEX_ALGO_UNCONS_FREERUN  = 0,
35362     WMI_COEX_ALGO_FREERUN         = 1,
35363     WMI_COEX_ALGO_OCS             = 2,
35364 } WMI_COEX_ALGO_TYPE;
35365 
35366 typedef enum wmi_coex_config_type {
35367     WMI_COEX_CONFIG_PAGE_P2P_TDM        =  1, /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */
35368     WMI_COEX_CONFIG_PAGE_STA_TDM        =  2, /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */
35369     WMI_COEX_CONFIG_PAGE_SAP_TDM        =  3, /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */
35370     WMI_COEX_CONFIG_DURING_WLAN_CONN    =  4, /* config during WLAN connection */
35371     WMI_COEX_CONFIG_BTC_ENABLE          =  5, /* config to enable/disable BTC */
35372     WMI_COEX_CONFIG_COEX_DBG            =  6, /* config of COEX debug setting */
35373     WMI_COEX_CONFIG_PAGE_P2P_STA_TDM    =  7, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + PAGE */
35374     WMI_COEX_CONFIG_INQUIRY_P2P_TDM     =  8, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + INQUIRY */
35375     WMI_COEX_CONFIG_INQUIRY_STA_TDM     =  9, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + INQUIRY */
35376     WMI_COEX_CONFIG_INQUIRY_SAP_TDM     = 10, /* config interval (ms units) (arg1 BT, arg2 WLAN) for SAP + INQUIRY */
35377     WMI_COEX_CONFIG_INQUIRY_P2P_STA_TDM = 11, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + INQUIRY */
35378     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) */
35379     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) */
35380     WMI_COEX_CONFIG_AP_TDM              = 14, /* config interval (arg1 duty cycle in ms, arg2 WLAN duration in ms) for AP */
35381     WMI_COEX_CONFIG_WLAN_SCAN_PRIORITY  = 15, /* config to set WLAN priority during Off Channel Scan */
35382     WMI_COEX_CONFIG_WLAN_PKT_PRIORITY   = 16, /* config to set WLAN priority for BE/BK/VO/VI/Beacon/Management frame */
35383     WMI_COEX_CONFIG_PTA_INTERFACE       = 17, /* config PTA interface,
35384                                                  arg1 PTA num,
35385                                                  arg2 mode (2-wire/3-wire/PTA),
35386                                                  arg3 first slot time in microsec,
35387                                                  arg4 BT priority time in microsec,
35388                                                  arg5 PTA algorithm (WMI_COEX_ALGO_TYPE),
35389                                                  arg6 PTA priority */
35390     WMI_COEX_CONFIG_BTC_DUTYCYCLE       = 18, /* config interval (ms units) (arg1 WLAN pause duration, arg2 WLAN unpause duration) for WLAN UL + BT Rx */
35391     WMI_COEX_CONFIG_HANDOVER_RSSI       = 19, /* config to set WLAN RSSI (dBm units) at which device switches from Hybrid to TDD coex mode */
35392     WMI_COEX_CONFIG_PTA_BT_INFO         = 20, /* get BT information,
35393                                                  arg1 BT info type: WMI_COEX_PTA_BT_INFO_TYPE_T, scan/advertise/connection info,
35394                                                  arg2-arg5: BT information parameters */
35395     WMI_COEX_CONFIG_SINK_WLAN_TDM       = 21, /* config interval (ms units) (arg1 BT, arg2 WLAN) for A2DP SINK + WLAN */
35396     WMI_COEX_CONFIG_COEX_ENABLE_MCC_TDM = 22, /* config disable/enable COEX TDM for MCC */
35397     WMI_COEX_CONFIG_LOWRSSI_A2DPOPP_TDM = 23, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + A2dp + OPP + LOWRSSI */
35398     WMI_COEX_CONFIG_BTC_MODE            = 24, /* config BTC mode, arg1 mode: 0 TDD/1 FDD/2 Hybrid*/
35399     WMI_COEX_CONFIG_ANTENNA_ISOLATION   = 25, /* config isolation between BT and WLAN chains
35400                                                * The arguments are interpreted differently
35401                                                * depending on whether the target supports
35402                                                * WMI_SERVICE_COEX_SUPPORT_UNEQUAL_ISOLATION
35403                                                * If (not COEX_SUPPORT_UNEQUAL_ISOLATION) or arg2 == 0:
35404                                                *     arg1 => isolation between BT and WLAN chains,
35405                                                *             dB units,
35406                                                *             same isolation for all chains
35407                                                * Else:
35408                                                *     arg1 bits  7:0  - chain 0 isolation, in dB
35409                                                *     arg1 bits 15:8  - chain 1 isolation, in dB
35410                                                *     arg1 bits 23:16 - chain 2 isolation, in dB
35411                                                *     arg1 bits 31:24 - chain 3 isolation, in dB
35412                                                * arg2 - 0 => Equal isolation b/w BT and each WLAN chain (default)
35413                                                *        1 => Different isolation b/w BT and each WLAN chain
35414                                                */
35415     WMI_COEX_CONFIG_BT_LOW_RSSI_THRESHOLD = 26, /* config BT low RSSI threshold (dBm units) */
35416     WMI_COEX_CONFIG_BT_INTERFERENCE_LEVEL = 27, /* config BT interference level (dBm units)
35417                                                  arg1 low - lower limit
35418                                                  arg2 low - upper limit
35419                                                  arg3 medium - lower limit
35420                                                  arg4 medium - upper limit
35421                                                  arg5 high - lower limit
35422                                                  arg6 high - upper limit */
35423     WMI_COEX_CONFIG_WLAN_OVER_ZBLOW        = 28, /* config to boost WiFi traffic over 15.4 Low prio traffic */
35424     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 */
35425     WMI_COEX_CONFIG_WLAN_CONN_OVER_LE      = 30, /* config to elevate Wifi priority over BLE during WLAN association */
35426     WMI_COEX_CONFIG_LE_OVER_WLAN_TRAFFIC   = 31, /* config to elevate BLE traffic over WiFi traffic */
35427     WMI_COEX_CONFIG_THREE_WAY_COEX_RESET   = 32, /* config to reset the weights to default  */
35428     /* WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA
35429      * config to T_PRIO T_DELAY parameter for each case
35430      *   arg1 - wlan/bt state
35431      *       0: beacon tx
35432      *       1: wlan connecting
35433      *       2: wlan in dhcp
35434      *       3: a2dp critical
35435      *       4: eSCO
35436      *   arg2 - t_prio for low priority traffic (microsecond units)
35437      *   arg3 - t_delay for low priority traffic (microsecond units)
35438      *   arg4 - t_prio for high priority traffic (microsecond units)
35439      *   arg5 - t_delay for high priority traffic (microsecond units)
35440      */
35441     WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA   = 33,
35442     /* WMI_COEX_CONFIG_THREE_WAY_COEX_START
35443      * config to set coex parameters from WLAN host to adjust priorities
35444      * among wlan/bt/zb
35445      * arg1 - priority level 1, the serialized coex scenorio ID will be put here
35446      * arg2 - priority level 2, same parameters rules as arg1
35447      * arg3 - priority level 3, same parameters rules as arg1
35448      * arg4 - priority level 4, same parameters rules as arg1
35449      */
35450     WMI_COEX_CONFIG_THREE_WAY_COEX_START   = 34,
35451     /* WMI_COEX_CONFIG_MPTA_HELPER_ENABLE
35452      * config to enable(1)/disable(0) mpta-helper function
35453      */
35454     WMI_COEX_CONFIG_MPTA_HELPER_ENABLE     = 35,
35455     /* WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_STATE
35456      * config zigbee state
35457      * arg1: zigbee state
35458      *       (idle form-network wait-join join-network network-up HMI)
35459      */
35460     WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_STATE = 36,
35461     /* WMI_COEX_CONFIG_MPTA_HELPER_INT_OCS_PARAMS
35462      * config ocs wlan/nonwlan params after MPTA interrupt fired
35463      * arg1: wlan duration (ms units) in Shape-OCS
35464      * arg2: nonwlan duration (ms units) in Shape-OCS
35465      */
35466     WMI_COEX_CONFIG_MPTA_HELPER_INT_OCS_PARAMS = 37,
35467     /* WMI_COEX_CONFIG_MPTA_HELPER_MON_OCS_PARAMS
35468      * config ocs wlan/nonwlan params during monitor period after
35469      * interrupt period finished
35470      * arg1: wlan duration (ms units) in Shape-OCS
35471      * arg2: nonwlan duration (ms units) in Shape-OCS
35472      */
35473     WMI_COEX_CONFIG_MPTA_HELPER_MON_OCS_PARAMS   = 38,
35474     /* WMI_COEX_CONFIG_MPTA_HELPER_INT_MON_DURATION
35475      * config ocs duration in interrupt period and monitor period
35476      * arg1: duration (ms units) in interrupt period
35477      * arg2: duration (ms units) in monitor period
35478      */
35479     WMI_COEX_CONFIG_MPTA_HELPER_INT_MON_DURATION = 39,
35480     /* WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_CHANNEL
35481      * config zigbee channel 11 - 26
35482      */
35483     WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_CHANNEL   = 40,
35484     /* WMI_COEX_CONFIG_MPTA_HELPER_WLAN_MUTE_DURATION
35485      * config msw mute duration (ms units) after MPTA interrupt fired
35486      */
35487     WMI_COEX_CONFIG_MPTA_HELPER_WLAN_MUTE_DURATION   = 41,
35488     /* WMI_COEX_CONFIG_BT_SCO_ALLOW_WLAN_2G_SCAN
35489      * allow WLAN scan on 2.4G channel when BT SCO connectivity is alive
35490      */
35491     WMI_COEX_CONFIG_BT_SCO_ALLOW_WLAN_2G_SCAN   = 42,
35492     /* WMI_COEX_CONFIG_ENABLE_2ND_HARMONIC_WAR
35493      * config to enable(1)/disable(0) WAR of BT 2nd harmonic issue function
35494      */
35495     WMI_COEX_CONFIG_ENABLE_2ND_HARMONIC_WAR     = 43,
35496     /* WMI_COEX_CONFIG_BTCOEX_SEPARATE_CHAIN_MODE
35497      * config BTC separate chain mode or shared mode
35498      */
35499     WMI_COEX_CONFIG_BTCOEX_SEPARATE_CHAIN_MODE  = 44,
35500     /* WMI_COEX_CONFIG_ENABLE_TPUT_SHAPING
35501      * enable WLAN throughput shaping while BT scanning
35502      */
35503     WMI_COEX_CONFIG_ENABLE_TPUT_SHAPING = 45,
35504     /* WMI_COEX_CONFIG_ENABLE_TXBF
35505      * enable WLAN tx beamforming during coex case
35506      */
35507     WMI_COEX_CONFIG_ENABLE_TXBF = 46,
35508     /* WMI_COEX_CONFIG_FORCED_ALGO
35509      * config to select coex algorithm
35510      * arg1: select fixed coex algorithm
35511      */
35512     WMI_COEX_CONFIG_FORCED_ALGO = 47,
35513     /* WMI_COEX_CONFIG_LE_SCAN_POLICY
35514      * BLE scan Coex policy hint
35515      * 0 to place more emphasis on BLE Scan results
35516      * 1 to place more emphasis on WLAN performance
35517      */
35518     WMI_COEX_CONFIG_LE_SCAN_POLICY = 48,
35519     /* WMI_COEX_CONFIG_BT_RX_PER_THRESHOLD
35520      * config BT RX PER threshold
35521      */
35522     WMI_COEX_CONFIG_BT_RX_PER_THRESHOLD = 49,
35523     /* WMI_COEX_SET_TRAFFIC_SHAPING_MODE
35524      * arg1: 0 (WMI_COEX_TRAFFIC_SHAPING_MODE_DISABLED)
35525      *         Disable coex policies and set fixed arbitration config.
35526      *       1 (WMI_COEX_TRAFFIC_SHAPING_MODE_ENABLED)
35527      *         Enable all coex policies.
35528      */
35529     WMI_COEX_SET_TRAFFIC_SHAPING_MODE = 50,
35530     /* WMI_COEX_CONFIG_ENABLE_CONT_INFO
35531      * enable contention info log
35532      * arg1:
35533      *     0: disable both cont/sched log
35534      *     1: enable cont log
35535      *     2: enable sched log
35536      *     3: enable both cont and sched log
35537      */
35538     WMI_COEX_CONFIG_ENABLE_CONT_INFO = 51,
35539 } WMI_COEX_CONFIG_TYPE;
35540 
35541 typedef struct {
35542     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_COEX_CONFIG_CMD_fixed_param */
35543     A_UINT32 vdev_id;
35544     A_UINT32 config_type; /* wmi_coex_config_type enum */
35545     A_UINT32 config_arg1;
35546     A_UINT32 config_arg2;
35547     A_UINT32 config_arg3;
35548     A_UINT32 config_arg4;
35549     A_UINT32 config_arg5;
35550     A_UINT32 config_arg6;
35551 } WMI_COEX_CONFIG_CMD_fixed_param;
35552 
35553 typedef struct {
35554     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_coex_multiple_config_cmd_fixed_param */
35555     /*
35556      * This struct is followed by other TLVs:
35557      *   WMI_COEX_CONFIG_CMD_fixed_param config_list[num_config];
35558      */
35559 } wmi_coex_multiple_config_cmd_fixed_param;
35560 
35561 typedef enum wmi_coex_dbam_mode_type {
35562     WMI_COEX_DBAM_DISABLE = 0,
35563     WMI_COEX_DBAM_ENABLE = 1,
35564     WMI_COEX_DBAM_FORCED = 2,
35565 } WMI_COEX_DBAM_MODE_TYPE;
35566 
35567 typedef enum {
35568     WMI_COEX_TRAFFIC_SHAPING_MODE_DISABLED = 0,
35569     WMI_COEX_TRAFFIC_SHAPING_MODE_ENABLED = 1,
35570 } WMI_COEX_TRAFFIC_SHAPING_MODE;
35571 
35572 typedef struct {
35573     A_UINT32 tlv_header;
35574     A_UINT32 vdev_id;
35575     A_UINT32 dbam_mode; /* wmi_coex_dbam_mode_type enum */
35576 } wmi_coex_dbam_cmd_fixed_param;
35577 
35578 /**
35579  * Host get current TAS buffer from FW or set last TAS buffer to FW
35580  */
35581 typedef enum wmi_tas_power_history_cmd_type {
35582     WMI_TAS_POWER_HISTORY_CMD_GET = 0, /* before WLAN off, host trigger this cmd to get power history */
35583     WMI_TAS_POWER_HISTORY_CMD_SET = 1, /* after WLAN reboot, host trigger this cmd to set power history of last life cycle */
35584 } WMI_TAS_POWER_HISTORY_CMD_TYPE;
35585 
35586 typedef struct {
35587     A_UINT32    tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tas_power_history_cmd_fixed_param */
35588     A_UINT32    sub_type;       /* refer to WMI_TAS_POWER_HISTORY_TYPE */
35589     A_UINT32    time_diff;      /* time of wlan on - time of wlan off after wlan reboot. unit: millisecond*/
35590 } wmi_tas_power_history_cmd_fixed_param;
35591 
35592 /**
35593  * This command is sent from WLAN host driver to firmware to
35594  * request firmware to enable/disable channel avoidance report
35595  * to host.
35596  *
35597  */
35598 enum {
35599     WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0,
35600     WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1
35601 };
35602 
35603 typedef struct {
35604     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param */
35605     /** Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */
35606     A_UINT32 rpt_allow;
35607 } WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param;
35608 
35609 /*
35610  * Periodic channel stats WMI command structure
35611  * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID
35612  */
35613 typedef struct {
35614     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param */
35615     /** 1 = enable, 0 = disable */
35616     A_UINT32 enable;
35617     /** periodic stats duration (units are milliseconds) */
35618     A_UINT32 stats_period;
35619     /** pdev_id for identifying the MAC
35620      * See macros starting with WMI_PDEV_ID_ for values.
35621      */
35622     A_UINT32 pdev_id;
35623 } wmi_set_periodic_channel_stats_config_fixed_param;
35624 
35625 typedef struct {
35626     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param */
35627     /** pdev_id for identifying the MAC
35628      * See macros starting with WMI_PDEV_ID_ for values.
35629      */
35630     A_UINT32 pdev_id;
35631     /* Identify the wlan module */
35632     A_UINT32 module_id;
35633     /* Num of elements in the following args[] array */
35634     A_UINT32 num_args;
35635 /**
35636  * Following this structure are the TLVs:
35637  *   A_UINT32 args[];
35638  **/
35639 } wmi_pdev_wal_power_debug_cmd_fixed_param;
35640 
35641 typedef struct {
35642     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param */
35643     /**
35644      * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
35645      * @details
35646      *     Each WMM access category (voice, video, best-effort, background)
35647      *     will have its own timeout value to dictate how long to wait for
35648      *     missing rx MPDUs to arrive before releasing subsequent MPDUs that
35649      *     have already been received.
35650      *     This parameter specifies the timeout in milliseconds for each
35651      *     access category.
35652      *     The array elements are indexed by the WMI_AC enum to identify
35653      *     which array element corresponds to which AC / traffic type.
35654      */
35655     A_UINT32 rx_timeout_pri[WMI_AC_MAX];
35656 } wmi_pdev_set_reorder_timeout_val_cmd_fixed_param;
35657 
35658 /**
35659  * wlan stats shall be understood as per period.
35660  * Generally, it is reported periodically based on the period specified by host.
35661  * But if the variation of one stats of compared to the
35662  * previous notification exceeds a threshold,
35663  * FW will report the wlan stats immediately.
35664  * The values of the stats becomes the new reference to compute variations.
35665  * This threshold can be a global setting or per category.
35666  * Host can enable/disable the mechanism for any stats per bitmap.
35667  * TX/RX thresholds (percentage value) are shared across ACs,
35668  * and TX/RX stats comprisons are processed per AC of each peer.
35669  * For example, if bit 0 (stand for tx_mpdus) of tx_thresh_bitmap is set to 1,
35670  * and the detailed tx_mpdus threshold value is set to 10%,
35671  * suppose tx_mpdus value of BE of peer 0 is 100 in first period,
35672  * and it reaches 110 during the second period,
35673  * FW will generate and send out a wlan stats event immediately.
35674  */
35675 typedef struct {
35676     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_stats_threshold_cmd_fixed_param */
35677     /** Indicate if threshold mechanism is enabled or disabled.
35678      *  It is disabled by default.
35679      *  Host can enable and disable it dynamically.
35680      */
35681     A_UINT32 enable_thresh;
35682     /** use_thresh_bitmap equals 0 means gbl_thresh is used.
35683      *  when use_thresh_bitmap equals 1, ignore gbl_thresh and use stats bitmap indicated thresholds.
35684      */
35685     A_UINT32 use_thresh_bitmap;
35686     /** global threshold, valid when use_thresh_bitmap equals 0.
35687      *  It takes effect for all counters.
35688      *  If use_thresh_bitmap ==0 && gbl_thresh == 0, disable threshold mechanism.
35689      */
35690     A_UINT32 gbl_thresh;
35691     /** Enable/disable bitmap for threshold mechanism of CCA stats */
35692     A_UINT32 cca_thresh_enable_bitmap;
35693     /** Enable/disable bitmap for threshold mechanism of signal stats */
35694     A_UINT32 signal_thresh_enable_bitmap;
35695     /** Enable/disable bitmap for threshold mechanism of TX stats */
35696     A_UINT32 tx_thresh_enable_bitmap;
35697     /** Enable/disable bitmap for threshold mechanism of RX stats */
35698     A_UINT32 rx_thresh_enable_bitmap;
35699     /* This TLV is followed by TLVs below:
35700      *    wmi_chan_cca_stats_thresh     cca_thresh;
35701      *    wmi_peer_signal_stats_thresh  signal_thresh;
35702      *    wmi_tx_stats_thresh           tx_thresh;
35703      *    wmi_rx_stats_thresh           rx_thresh;
35704      */
35705 } wmi_pdev_set_stats_threshold_cmd_fixed_param;
35706 
35707 typedef enum {
35708     WMI_REQUEST_WLAN_TX_STAT     = 0x01,
35709     WMI_REQUEST_WLAN_RX_STAT     = 0x02,
35710     WMI_REQUEST_WLAN_CCA_STAT    = 0x04,
35711     WMI_REQUEST_WLAN_SIGNAL_STAT = 0x08,
35712 } wmi_wlan_stats_id;
35713 
35714 typedef struct {
35715     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlan_stats_cmd_fixed_param */
35716     wmi_wlan_stats_id stats_id;
35717 } wmi_request_wlan_stats_cmd_fixed_param;
35718 
35719 typedef enum {
35720     WMI_REQUEST_ONE_PEER_STATS_INFO = 0x01, /* request stats of one specified peer */
35721     WMI_REQUEST_VDEV_ALL_PEER_STATS_INFO = 0x02, /* request stats of all peers belong to specified VDEV */
35722 } wmi_peer_stats_info_request_type;
35723 
35724 /** It is required to issue WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE
35725  *  (with a non-zero value) before issuing the first REQUEST_PEER_STATS_INFO.
35726  */
35727 typedef struct {
35728     /** TLV tag and len; tag equals
35729      * WMITLV_TAG_STRUC_wmi_request_peer_stats_info_cmd_fixed_param */
35730     A_UINT32 tlv_header;
35731     /** request_type to indicate if only stats of
35732      *  one peer or all peers of the VDEV are requested,
35733      *  see wmi_peer_stats_info_request_type.
35734      */
35735     A_UINT32 request_type;
35736     /** VDEV identifier */
35737     A_UINT32 vdev_id;
35738     /** this peer_macaddr is only used if request_type == ONE_PEER_STATS_INFO */
35739     wmi_mac_addr peer_macaddr;
35740     /** flag to indicate if FW needs to reset requested peers stats */
35741     A_UINT32 reset_after_request;
35742 } wmi_request_peer_stats_info_cmd_fixed_param;
35743 
35744 typedef enum {
35745     /*
35746      * Multiple stats type can be requested together, so each value
35747      * within this enum represents a bit position within a stats bitmap.
35748      */
35749     /* bit 0 is currently unused / reserved */
35750     WMI_REQUEST_CTRL_PATH_PDEV_TX_STAT      = 1,
35751     WMI_REQUEST_CTRL_PATH_VDEV_EXTD_STAT    = 2,
35752     WMI_REQUEST_CTRL_PATH_MEM_STAT          = 3,
35753     WMI_REQUEST_CTRL_PATH_TWT_STAT          = 4,
35754     WMI_REQUEST_CTRL_PATH_CALIBRATION_STAT  = 5,
35755     WMI_REQUEST_CTRL_PATH_DFS_CHANNEL_STAT  = 6,
35756     WMI_REQUEST_CTRL_PATH_AWGN_STAT         = 7,
35757     WMI_REQUEST_CTRL_PATH_BTCOEX_STAT       = 8,
35758     WMI_REQUEST_CTRL_PATH_BMISS_STAT        = 9,
35759     WMI_REQUEST_CTRL_PATH_ODD_ADDR_READ     = 10,
35760     WMI_REQUEST_CTRL_PATH_AFC_STAT          = 11,
35761     WMI_REQUEST_CTRL_PATH_PMLO_STAT         = 12,
35762     WMI_REQUEST_CTRL_PATH_CFR_STAT          = 13,
35763     WMI_REQUEST_CTRL_PATH_T2LM_STAT         = 14,
35764     WMI_REQUEST_CTRL_PATH_BLANKING_STAT     = 15,
35765     WMI_REQUEST_CTRL_PATH_PEER_STAT         = 16,
35766     WMI_REQUEST_CTRL_PATH_VDEV_DEBUG_STAT   = 17,
35767     WMI_REQUEST_CTRL_STA_RRM_STAT           = 18,
35768     WMI_REQUEST_CTRL_PATH_VDEV_BCN_TX_STAT  = 19,
35769     WMI_REQUEST_CTRL_PATH_PDEV_BCN_TX_STAT  = 20,
35770 } wmi_ctrl_path_stats_id;
35771 
35772 typedef enum {
35773     /* bit 0 is currently unused / reserved */
35774     WMI_HALPHY_CTRL_PATH_PDEV_TX_STAT = 1,
35775 } wmi_halphy_ctrl_path_stats_id;
35776 
35777 typedef enum {
35778     /*
35779      * The following stats actions are mutually exclusive.
35780      * A single stats request message can only specify one action.
35781      */
35782     WMI_REQUEST_CTRL_PATH_STAT_GET              = 1,
35783     WMI_REQUEST_CTRL_PATH_STAT_RESET            = 2,
35784     WMI_REQUEST_CTRL_PATH_STAT_START            = 3,
35785     WMI_REQUEST_CTRL_PATH_STAT_STOP             = 4,
35786     WMI_REQUEST_CTRL_PATH_STAT_PERIODIC_PUBLISH = 5,
35787 } wmi_ctrl_path_stats_action;
35788 
35789 typedef enum {
35790     WMI_HALPHY_CTRL_PATH_SU_STATS = 0,
35791     WMI_HALPHY_CTRL_PATH_SUTXBF_STATS,
35792     WMI_HALPHY_CTRL_PATH_MU_STATS,
35793     WMI_HALPHY_CTRL_PATH_MUTXBF_STATS,
35794 } wmi_halphy_ctrl_path_subid;
35795 
35796 typedef struct {
35797     /** TLV tag and len; tag equals
35798      *  WMITLV_TAG_STRUC_wmi_request_ctrl_path_stats_cmd_fixed_param */
35799     A_UINT32 tlv_header;
35800     /** Bitmask showing which of stats IDs 0-31 have been requested.
35801      *  These stats ids are defined in enum wmi_ctrl_path_stats_id.
35802      */
35803     A_UINT32 stats_id_mask;
35804     /** request ID to store the cookies in wifistats */
35805     A_UINT32 request_id;
35806     /** action
35807      *  get/reset/start/stop based on stats id
35808      *  defined as a part of wmi_ctrl_path_stats_action
35809      **/
35810     A_UINT32 action; /* refer to wmi_ctrl_path_stats_action */
35811 
35812     /**
35813      * The stat_periodicity field is relevant only when action is set to
35814      * WMI_REQUEST_CTRL_PATH_STAT_PERIODIC_PUBLISH.
35815      * The units of this periodicity are milliseconds.
35816      * Periodically send WMI ctrl-path stats event with the specified stats
35817      * periodicity for the stats whose IDs are set in stats_id_mask.
35818      * Periodic WMI ctrl-path stats events are enabled by setting value > 0,
35819      * Previously onngoing periodic WMI ctrl-path stats events become
35820      * disabled when action is WMI_REQUEST_CTRL_PATH_STAT_PERIODIC_PUBLISH
35821      * and stat_periodicity = 0.
35822      */
35823     A_UINT32 stat_periodicity;
35824 
35825     /** The below TLV arrays optionally follow this fixed_param TLV structure:
35826      *  1.  A_UINT32 pdev_ids[];
35827      *      If this array is present and non-zero length, stats should only
35828      *      be provided from the pdevs identified in the array.
35829      *  2.  A_UINT32 vdev_ids[];
35830      *      If this array is present and non-zero length, stats should only
35831      *      be provided from the vdevs identified in the array.
35832      *  3.  wmi_mac_addr peer_macaddr[];
35833      *      If this array is present and non-zero length, stats should only
35834      *      be provided from the peers with the MAC addresses specified
35835      *      in the array.
35836      */
35837 } wmi_request_ctrl_path_stats_cmd_fixed_param;
35838 
35839 typedef struct {
35840     /** TLV tag and len; tag equals
35841      *  WMITLV_TAG_STRUC_wmi_request_halphy_ctrl_path_stats_cmd_fixed_param */
35842     A_UINT32 tlv_header;
35843 
35844     /** Bitmask showing which of stats IDs 0-31 have been requested.
35845      *  These stats ids are defined in enum wmi_halphy_ctrl_path_stats_id.
35846      */
35847     A_UINT32 stats_id_mask;
35848     /** process id requested */
35849     A_UINT32 request_id;
35850     /** action
35851      *  get/reset based on stats id
35852      *  defined as a part of wmi_ctrl_path_stats_action
35853      **/
35854     A_UINT32 action; /* refer to wmi_ctrl_path_stats_action */
35855 
35856     /** Request Halphy subid stats
35857      * According to the requested stats_id_mask this halphy_subid varies
35858      * For stats_id = 1, the possible values could be enum
35859      * wmi_halphy_ctrl_path_halphyid
35860      */
35861     A_UINT32 halphy_subid;
35862 
35863     /** The below TLV arrays optionally follow this fixed_param TLV structure:
35864      *  1.  A_UINT32 pdev_ids[];
35865      *      If this array is present and non-zero length, stats should only
35866      *      be provided from the pdevs identified in the array.
35867      *  2.  A_UINT32 vdev_ids[];
35868      *      If this array is present and non-zero length, stats should only
35869      *      be provided from the vdevs identified in the array.
35870      *  3.  wmi_mac_addr peer_macaddr[];
35871      *      If this array is present and non-zero length, stats should only
35872      *      be provided from the peers with the MAC addresses specified
35873      *      in the array.
35874      */
35875 } wmi_request_halphy_ctrl_path_stats_cmd_fixed_param;
35876 
35877 typedef enum {
35878     WMI_REQUEST_ONE_RADIO_CHAN_STATS = 0x01, /* request stats of one specified channel */
35879     WMI_REQUEST_ALL_RADIO_CHAN_STATS = 0x02, /* request stats of all channels */
35880 } wmi_radio_chan_stats_request_type;
35881 
35882 /** It is required to issue WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE
35883  *  (with a non-zero value) before issuing the first REQUEST_RADIO_CHAN_STATS.
35884  */
35885 typedef struct {
35886     /** TLV tag and len; tag equals
35887      * WMITLV_TAG_STRUC_wmi_request_radio_chan_stats_cmd_fixed_param */
35888     A_UINT32 tlv_header;
35889     /** request_type to indicate if only stats of
35890      *  one channel or all channels are requested,
35891      *  see wmi_radio_chan_stats_request_type.
35892      */
35893     A_UINT32 request_type;
35894     /** Frequency of channel whose stats is requested,
35895      *  only used when request_type == WMI_REQUEST_ONE_RADIO_CHAN_STATS
35896      */
35897     A_UINT32 chan_mhz;
35898     /** flag to indicate if FW needs to reset requested stats of specified channel/channels */
35899     A_UINT32 reset_after_request;
35900 } wmi_request_radio_chan_stats_cmd_fixed_param;
35901 
35902 typedef struct {
35903     /** TLV tag and len; tag equals
35904      * WMITLV_TAG_STRUC_wmi_rmc_set_leader_cmd_fixed_param */
35905     A_UINT32 tlv_header;
35906     /* VDEV identifier */
35907     A_UINT32 vdev_id;
35908     /* Leader's mac address */
35909     wmi_mac_addr leader_mac_addr;
35910 } wmi_rmc_set_leader_cmd_fixed_param;
35911 
35912 typedef struct {
35913     /** TLV tag and len; tag equals
35914     * WMITLV_TAG_STRUC_wmi_rmc_manual_leader_event_fixed_param */
35915     A_UINT32 tlv_header;
35916     /* VDEV identifier */
35917     A_UINT32 vdev_id;
35918     /*  0: success
35919      *  1: selected leader not found in network, able to find using auto selection
35920      * -1: error
35921      * non zero value should be return to userspace in case of failure */
35922     A_INT32 status;
35923     /* bssid of new leader */
35924     wmi_mac_addr leader_mac_addr;
35925 } wmi_rmc_manual_leader_event_fixed_param;
35926 
35927 typedef struct {
35928     /** TLV tag and len; tag equals
35929      * WMITLV_TAG_STRUC_wmi_audio_sync_start_event_fixed_param
35930      */
35931     A_UINT32 tlv_header;
35932     /* VDEV identifier */
35933     A_UINT32 vdev_id;
35934     /* periodicity:
35935      * How frequently (in msec) FW wants host to capture the Q_TIMER.
35936      * periodicity = 0 indicates to the host to stop capturing the QTIMERs.
35937      */
35938     A_UINT32 periodicity;
35939     /* No of Qtimer captures FW wants */
35940     A_UINT32 reads_needed;
35941     /* Lower 32 bits of the mac timer. Value is valid only if periodicity = 0 */
35942     A_UINT32 mac_timer_l32;
35943     /* Upper 32 bits of the mac timer. Value is valid only if periodicity = 0 */
35944     A_UINT32 mac_timer_u32;
35945     /* Lower 32 bits of the Qtimer. Value is valid only if periodicity = 0 */
35946     A_UINT32 qtimer_l32;
35947     /* Upper 32 bits of the Qtimer. Value is valid only if periodicity = 0 */
35948     A_UINT32 qtimer_u32;
35949 } wmi_audio_sync_start_stop_event_fixed_param;
35950 
35951 typedef struct {
35952     /** TLV tag and len; tag equals
35953     * WMITLV_TAG_STRUC_wmi_audio_sync_q_mac_relation_event_fixed_param */
35954     A_UINT32 tlv_header;
35955     /* VDEV identifier */
35956     A_UINT32 vdev_id;
35957     /* Lower 32 bits of the offset between Qmaster and Qslave */
35958     A_UINT32 offset_l32;
35959     /* Upper 32 bits of the offset between Qmaster and Qslave */
35960     A_UINT32 offset_u32;
35961 } wmi_audio_sync_q_master_slave_offset_event_fixed_param;
35962 
35963 typedef struct {
35964     /** TLV tag and len; tag equals
35965     * WMITLV_TAG_STRUC_wmi_audio_sync_q_mac_relation_event_fixed_param */
35966     A_UINT32 tlv_header;
35967     /* Lower 32 bits of the Qtimer of master */
35968     A_UINT32 qmaster_l32;
35969     /* Upper 32 bits of the Qtimer of master */
35970     A_UINT32 qmaster_u32;
35971     /* Lower 32 bits of the Qtimer of slave*/
35972     A_UINT32 qslave_l32;
35973     /* Upper 32 bits of the Qtimer of slave*/
35974     A_UINT32 qslave_u32;
35975 } wmi_audio_sync_q_master_slave_times;
35976 
35977 /** Set Preferred Channel List  **/
35978 typedef struct {
35979     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_pcl_cmd_fixed_param */
35980     /** vdev_id */
35981     A_UINT32 vdev_id;
35982 /**
35983  * TLV (tag length value) parameters follow the wmi_vdev_set_pcl_cmd
35984  * structure. The TLV's are:
35985  *
35986  *     A_UINT32 channel_weight[];
35987  *         values defined by enum 'wmi_pcl_chan_weight'
35988  *         channel order & size will be as per the list provided in WMI_SCAN_CHAN_LIST_CMDID
35989  **/
35990 } wmi_vdev_set_pcl_cmd_fixed_param;
35991 
35992 /** command type for WMI_PDEV_TBTT_OFFSET_SYNC_CMDID */
35993 enum pdev_tbtt_offset_cmd_type
35994 {
35995     WMI_PDEV_GET_TBTT_OFFSET,
35996     WMI_PDEV_SET_TBTT_OFFSET,
35997 };
35998 
35999 /** Per neighbour TBTT offset information */
36000 typedef struct
36001 {
36002     /** TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_pdev_tbtt_offset_info */
36003     A_UINT32 tlv_header;
36004     /* neighbour bss mac address */
36005     wmi_mac_addr bss_mac;
36006     /* neighbour bss beacon interval in TU */
36007     A_UINT32 beacon_intval;
36008     /* neighbour bss operating class as defined in Annex E, IEEE80211 standard */
36009     A_UINT32 opclass;
36010     /* neighbour bss operating channel index */
36011     A_UINT32 chan_idx;
36012     /* neighbour bss next QTIME TBTT high 32 bit value */
36013     A_UINT32 next_qtime_tbtt_high;
36014     /* neighbour bss next QTIME TBTT low 32 bit value */
36015     A_UINT32 next_qtime_tbtt_low;
36016 } wmi_pdev_rnr_bss_tbtt_info;
36017 
36018 typedef struct {
36019     /** TLV tag and len; tag equals
36020      * WMITLV_TAG_STRUC_wmi_pdev_tbtt_offset_sync_cmd_fixed_param */
36021     A_UINT32 tlv_header;
36022     /*
36023      * PDEV identifier. Value WMI_PDEV_ID_SOC implies applicable to all pdevs
36024      * on SoC else applicable only to specified pdev
36025      */
36026     A_UINT32 pdev_id;
36027     /* command_type from enum pdev_tbtt_offset_cmd_type */
36028     A_UINT32 cmd_type;
36029     /*
36030      * Following this structure is the TLV:
36031      * struct wmi_pdev_rnr_bss_tbtt_info rnr_tbtt_info[num_rnr_tbtt_info];
36032      */
36033 } wmi_pdev_tbtt_offset_sync_cmd_fixed_param;
36034 
36035 typedef enum {
36036     WLAN_2G_CAPABILITY = 0x1,
36037     WLAN_5G_CAPABILITY = 0x2,
36038 } WLAN_BAND_CAPABILITY;
36039 
36040 typedef enum wmi_hw_mode_config_type {
36041     WMI_HW_MODE_SINGLE      = 0, /* Only one PHY is active. */
36042     WMI_HW_MODE_DBS         = 1, /* Both PHYs are active in different bands, PHYB in 2G and PHYA in 5G. */
36043     WMI_HW_MODE_SBS_PASSIVE = 2, /* Both PHYs are in passive mode (only rx) in same band; no tx allowed. */
36044     WMI_HW_MODE_SBS         = 3, /* Both PHYs are active in the same band.
36045                                   * Support for both PHYs within one band is planned for 5G only
36046                                   * (as indicated in WMI_MAC_PHY_CAPABILITIES),
36047                                   * but could be extended to other bands in the future.
36048                                   * The separation of the band between the two PHYs needs to be communicated separately.
36049                                   */
36050     WMI_HW_MODE_DBS_SBS     = 4, /* 3 PHYs, with 2 on the same band doing SBS
36051                                   * as in WMI_HW_MODE_SBS, and 3rd on the other band
36052                                   */
36053     WMI_HW_MODE_DBS_OR_SBS  = 5, /* One PHY is on 5G and the other PHY can be in 2G or 5G. */
36054     WMI_HW_MODE_DBS_2G_5G   = 6, /* Both PHYs are active in different bands. PhyA 2G and PhyB 5G */
36055     WMI_HW_MODE_2G_PHYB     = 7, /* Only PhyB 2G active */
36056     WMI_HW_MODE_EMLSR       = 8, /* Both PHYs are active in listen mode in 1x1
36057                                   * and Tx/Rx trigger on any PHY will switch
36058                                   * from 1x1 to 2x2 on that Phy
36059                                   */
36060     WMI_HW_MODE_AUX_EMLSR_SINGLE = 9, /* PHYA0 and AUX are active in listen mode
36061                                        * in 1x1 and Tx/Rx trigger on any.
36062                                        * PHY will switch from 1x1 to 2x2
36063                                        * on that Phy.
36064                                        */
36065     WMI_HW_MODE_AUX_EMLSR_SPLIT = 10, /* PHYA1 and AUX are active in listen mode
36066                                        * in 1x1 and Tx/Rx trigger on any.
36067                                        * PHY will switch from 1x1 to 2x2
36068                                        * on that Phy.
36069                                        */
36070 } WMI_HW_MODE_CONFIG_TYPE;
36071 
36072 /*
36073  * Per HW mode MLO capability flags
36074  * use bits 31:27 of A_UINT32 hw_mode_config_type for Per HW mode MLO
36075  * capability flags...
36076  * WMI_MLO_CAP_FLAG_NONE:           Do not support MLO for the specific HW mode
36077  * WMI_MLO_CAP_FLAG_NON_STR_IN_DBS: Support STR MLO when DBS for the specific
36078  *                                  HW mode
36079  * WMI_MLO_CAP_FLAG_STR_IN_DBS:     Support Non-STR MLO when DBS for the
36080  *                                  specific HW mode
36081  * WMI_MLO_CAP_FLAG_NON_STR_IN_SBS: Support STR MLO when SBS for the specific
36082  *                                  HW mode
36083  * WMI_MLO_CAP_FLAG_STR_IN_SBS:     Support Non-STR MLO when SBS for the
36084  *                                  specific HW mode
36085  * WMI_MLO_CAP_FLAG_STR:            Support STR for the specific HW mode.
36086  *
36087  * WMI_MLO_CAP_FLAG_EMLSR:          Support eMLSR mode.
36088  */
36089 #define WMI_MLO_CAP_FLAG_NONE           0x00
36090 #define WMI_MLO_CAP_FLAG_NON_STR_IN_DBS 0x01
36091 #define WMI_MLO_CAP_FLAG_STR_IN_DBS     0x02
36092 #define WMI_MLO_CAP_FLAG_NON_STR_IN_SBS 0x04
36093 #define WMI_MLO_CAP_FLAG_STR_IN_SBS     0x08
36094 #define WMI_MLO_CAP_FLAG_STR            0x10
36095 #define WMI_MLO_CAP_FLAG_EMLSR          0x20
36096 
36097 /*
36098  * hw_mode_config_type sub-fields for chips that support 802.11BE/MLO:
36099  * bits 26:0  - hw_mode_config
36100  * bits 31:27 - per HW mode MLO capability flags
36101  */
36102 #define WMI_BECAP_PHY_GET_HW_MODE_CFG(hw_mode_config_type) WMI_GET_BITS(hw_mode_config_type, 0, 27)
36103 #define WMI_BECAP_PHY_SET_HW_MODE_CFG(hw_mode_config_type, value) WMI_SET_BITS(hw_mode_config_type, 0, 27, value)
36104 #define WMI_BECAP_PHY_GET_MLO_CAP(hw_mode_config_type) WMI_GET_BITS(hw_mode_config_type, 27, 5)
36105 #define WMI_BECAP_PHY_SET_MLO_CAP(hw_mode_config_type, value) WMI_SET_BITS(hw_mode_config_type, 27, 5, value)
36106 
36107 /*
36108  * pdev_id sub-fields for chips that support 802.11BE/MLO
36109  * as part of WMI_MAC_PHY_CAPABILITIES and WMI_MAC_PHY_CAPABILITIES_EXT:
36110  * bits 16:0  - pdev_id
36111  * bits 32:16 - Unique link id across SOCs, got as part of QMI handshake.
36112  */
36113 #define WMI_PHY_GET_PDEV_ID(pdev_id) WMI_GET_BITS(pdev_id, 0, 16)
36114 #define WMI_PHY_SET_PDEV_ID(pdev_id, value) WMI_SET_BITS(pdev_id, 0, 16, value)
36115 #define WMI_PHY_GET_HW_LINK_ID(pdev_id) WMI_GET_BITS(pdev_id, 16, 16)
36116 #define WMI_PHY_SET_HW_LINK_ID(pdev_id, value) WMI_SET_BITS(pdev_id, 16, 16, value)
36117 
36118 #define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1)
36119 #define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
36120 
36121 #define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1)
36122 #define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
36123 
36124 #define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1)
36125 #define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
36126 
36127 #define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1)
36128 #define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
36129 
36130 #define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1)
36131 #define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
36132 
36133 #define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1)
36134 #define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
36135 
36136 #define WMI_SUPPORT_11BE_GET(flags) WMI_GET_BITS(flags, 6, 1)
36137 #define WMI_SUPPORT_11BE_SET(flags, value) WMI_SET_BITS(flags, 6, 1, value)
36138 
36139 #define WMI_MAX_MUBFEE_GET(flags) WMI_GET_BITS(flags, 28, 4)
36140 #define WMI_MAX_MUBFEE_SET(flags, value) WMI_SET_BITS(flags, 28, 4, value)
36141 
36142 /*
36143  * +-----------------------------+------------------------------------+
36144  * | Transmitted VHT Capabilities|         NSS Support of STA         |
36145  * |       Information Field     |    transmitted VHT Capabilites     |
36146  * +---------------+-------------+------+------+------+------+--------+
36147  * |   Supported   |   Extended  |      |      |      |      |        |
36148  * |   Channel     |   NSS BW    |      |      |      |      |        |
36149  * |   WidthSet    |   Support   |20 Mhz|40 Mhz|80 Mhz|160Mhz|80+80Mhz|
36150  * +---------------+-------------+------+------+------+------+--------+
36151  * |        0      |      0      |  1   |  1   |  1   |      |        |
36152  * +---------------+-------------+------+------+------+------+--------+
36153  * |        0      |      1      |  1   |  1   |  1   | 1/2  |        |
36154  * +---------------+-------------+------+------+------+------+--------+
36155  * |        0      |      2      |  1   |  1   |  1   | 1/2  |  1/2   |
36156  * +---------------+-------------+------+------+------+------+--------+
36157  * |        0      |      3      |  1   |  1   |  1   | 3/4  |  3/4   |
36158  * +---------------+-------------+------+------+------+------+--------+
36159  * |        1      |      0      |  1   |  1   |  1   |  1   |        |
36160  * +---------------+-------------+------+------+------+------+--------+
36161  * |        1      |      1      |  1   |  1   |  1   |  1   |  1/2   |
36162  * +---------------+-------------+------+------+------+------+--------+
36163  * |        1      |      2      |  1   |  1   |  1   |  1   |  3/4   |
36164  * +---------------+-------------+------+------+------+------+--------+
36165  * |        1      |      3      |  2   |  2   |  2   |  2   |   1    |
36166  * +---------------+-------------+------+------+------+------+--------+
36167  * |        2      |      0      |  1   |  1   |  1   |  1   |   1    |
36168  * +---------------+-------------+------+------+------+------+--------+
36169  * |        2      |      3      |  2   |  2   |  2   |  1   |   1    |
36170  * +---------------+-------------+------+------+------+------+--------+
36171  */
36172 
36173 /*
36174  *  [0]   : WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS
36175  *  [4:1] : WMI_NSS_RATIO_INFO_BITPOS
36176  */
36177 #define  WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS        0x0
36178 #define  WMI_NSS_RATIO_INFO_BITPOS                  0x1
36179 
36180 /*
36181  * WMI_NSS_RATIO_ENABLE_DISABLE values:
36182  * [0] : 0 - WMI_NSS_RATIO_DISABLE
36183  * [0] : 1 - WMI_NSS_RATIO_ENABLE
36184  */
36185 #define  WMI_NSS_RATIO_DISABLE                      0x0
36186 #define  WMI_NSS_RATIO_ENABLE                       0x1
36187 
36188 /*
36189  * WMI_NSS_RATIO_INFO values:
36190  *  [4:1] : 0000 - WMI_NSS_RATIO_1BY2_NSS
36191  *  [4:1] : 0001 - WMI_NSS_RATIO_3BY4_NSS
36192  *  [4:1] : 0010 - WMI_NSS_RATIO_1_NSS
36193  *  [4:1] : 0011 - WMI_NSS_RATIO_2_NSS
36194  */
36195 #define  WMI_NSS_RATIO_1BY2_NSS                     0x0
36196 #define  WMI_NSS_RATIO_3BY4_NSS                     0x1
36197 #define  WMI_NSS_RATIO_1_NSS                        0x2
36198 #define  WMI_NSS_RATIO_2_NSS                        0x3
36199 
36200 #define WMI_NSS_RATIO_ENABLE_DISABLE_SET(param, value) \
36201     WMI_SET_BITS(param, WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS, 1, value)
36202 #define WMI_NSS_RATIO_ENABLE_DISABLE_GET(dword) \
36203     WMI_GET_BITS(dword, WMI_NSS_RATIO_ENABLE_DISABLE_BITPOS, 1)
36204 
36205 #define WMI_NSS_RATIO_INFO_SET(param, value) \
36206     WMI_SET_BITS(param, WMI_NSS_RATIO_INFO_BITPOS, 4, value)
36207 #define WMI_NSS_RATIO_INFO_GET(dword) \
36208     WMI_GET_BITS(dword, WMI_NSS_RATIO_INFO_BITPOS, 4)
36209 
36210 /*
36211  * 11BE EML Capability Set and Get macros
36212  */
36213 #define WMI_SUPPORT_EMLSR_GET(eml_capability) WMI_GET_BITS(eml_capability, 0, 1)
36214 #define WMI_SUPPORT_EMLSR_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 0, 1, value)
36215 
36216 #define WMI_EMLSR_PADDING_DELAY_GET(eml_capability) WMI_GET_BITS(eml_capability, 1, 3)
36217 #define WMI_EMLSR_PADDING_DELAY_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 1, 3, value)
36218 
36219 #define WMI_EMLSR_TRANSITION_DELAY_GET(eml_capability) WMI_GET_BITS(eml_capability, 4, 3)
36220 #define WMI_EMLSR_TRANSITION_DELAY_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 4, 3, value)
36221 
36222 #define WMI_SUPPORT_EMLMR_GET(eml_capability) WMI_GET_BITS(eml_capability, 7, 1)
36223 #define WMI_SUPPORT_EMLMR_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 7, 1, value)
36224 
36225 #define WMI_EMLMR_DELAY_GET(eml_capability) WMI_GET_BITS(eml_capability, 8, 3)
36226 #define WMI_EMLMR_DELAY_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 8, 3, value)
36227 
36228 #define WMI_TRANSITION_TIMEOUT_GET(eml_capability) WMI_GET_BITS(eml_capability, 11, 4)
36229 #define WMI_TRANSITION_TIMEOUT_SET(eml_capability, value) WMI_SET_BITS(eml_capability, 11, 4, value)
36230 
36231 /*
36232  * 11BE MLD Capability Set and Get macros
36233  */
36234 #define WMI_MAX_NUM_SIMULTANEOUS_LINKS_GET(mld_capability) WMI_GET_BITS(mld_capability, 0, 4)
36235 #define WMI_MAX_NUM_SIMULTANEOUS_LINKS_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 0, 4, value)
36236 
36237 #define WMI_SUPPORT_SRS_GET(mld_capability) WMI_GET_BITS(mld_capability, 4, 1)
36238 #define WMI_SUPPORT_SRS_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 4, 1, value)
36239 
36240 #define WMI_TID_TO_LINK_NEGOTIATION_GET(mld_capability) WMI_GET_BITS(mld_capability, 5, 2)
36241 #define WMI_TID_TO_LINK_NEGOTIATION_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 5, 2, value)
36242 
36243 #define WMI_FREQ_SEPERATION_STR_GET(mld_capability) WMI_GET_BITS(mld_capability, 7, 5)
36244 #define WMI_FREQ_SEPERATION_STR_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 7, 5, value)
36245 
36246 #define WMI_SUPPORT_AAR_GET(mld_capability) WMI_GET_BITS(mld_capability, 12, 1)
36247 #define WMI_SUPPORT_AAR_SET(mld_capability, value) WMI_SET_BITS(mld_capability, 12, 1, value)
36248 
36249 /*
36250  * 11BE Ext MLD Capability Set and Get macros
36251  */
36252 #define WMI_EXT_MLD_OPERATION_PARAMETER_UPDATE_SUPP_GET(ext_mld_capability) WMI_GET_BITS(ext_mld_capability, 0, 1)
36253 #define WMI_EXT_MLD_OPERATION_PARAMETER_UPDATE_SUPP_SET(ext_mld_capability, value) WMI_SET_BITS(ext_mld_capability, 0, 1, value)
36254 
36255 /*
36256  * 11BE MSD Capability Set and Get macros
36257  */
36258 #define WMI_MEDIUM_SYNC_DURATION_GET(msd_capability) WMI_GET_BITS(msd_capability, 0, 8)
36259 #define WMI_MEDIUM_SYNC_DURATION_SET(msd_capability,value) WMI_SET_BITS(msd_capability, 0, 8, value)
36260 
36261 #define WMI_MEDIUM_SYNC_OFDM_ED_THRESHOLD_GET(msd_capability) WMI_GET_BITS(msd_capability, 8, 4)
36262 #define WMI_MEDIUM_SYNC_OFDM_ED_THRESHOLD_SET(msd_capability, value) WMI_SET_BITS(msd_capability, 8, 4, value)
36263 
36264 #define WMI_MEDIUM_SYNC_MAX_NO_TXOPS_GET(msd_capability) WMI_GET_BITS(msd_capability, 12, 4)
36265 #define WMI_MEDIUM_SYNC_MAX_NO_TXOPS_SET(msd_capability, value) WMI_SET_BITS(msd_capability, 12, 4, value)
36266 
36267 typedef struct {
36268     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES */
36269     /* hw_mode_id - identify a particular set of HW characteristics, as specified
36270      * by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element must be mapped
36271      * to its parent WMI_HW_MODE_CAPABILITIES element using hw_mode_id.
36272      * No particular ordering of WMI_MAC_PHY_CAPABILITIES elements should be assumed,
36273      * though in practice the elements may always be ordered by hw_mode_id */
36274     A_UINT32 hw_mode_id;
36275     /*
36276      * pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1
36277      * hw_link_id: Unique link id across SOCs, got as part of QMI handshake.
36278      * For legacy chips which do not support MLO, these top bits will always
36279      * be set to 0, so it won't impact the legacy chips which treat pdev_id
36280      * as 32 bits.
36281      */
36282     union {
36283         struct {
36284             A_UINT32 pdev_id:16,
36285                      hw_link_id:16;
36286         } wmi_pdev_to_link_map;
36287         A_UINT32 pdev_id;
36288     };
36289     /* phy id. Starts with 0 */
36290     A_UINT32 phy_id;
36291     /* supported modulations and number of MU beamformees */
36292     union {
36293         struct {
36294             A_UINT32 supports_11b:1,
36295                      supports_11g:1,
36296                      supports_11a:1,
36297                      supports_11n:1,
36298                      supports_11ac:1,
36299                      supports_11ax:1,
36300                      supports_11be:1,
36301 
36302                      unused: 21,
36303 
36304                      max_mubfee: 4; /* max MU beamformees supported per MAC */
36305         };
36306         A_UINT32 supported_flags;
36307     };
36308     /* supported bands, enum WLAN_BAND_CAPABILITY */
36309     A_UINT32 supported_bands;
36310     /* ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us,
36311      * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us */
36312     A_UINT32 ampdu_density;
36313     /* max bw supported 2G, enum wmi_channel_width */
36314     A_UINT32 max_bw_supported_2G;
36315     /* WMI HT Capability, WMI_HT_CAP defines */
36316     A_UINT32 ht_cap_info_2G;
36317     /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
36318     A_UINT32 vht_cap_info_2G;
36319     /* VHT Supported MCS Set field Rx/Tx same
36320      * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
36321      * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
36322      * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
36323      * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
36324      * - 3 indicates that n spatial streams is not supported
36325      * - bit [15:0] Each NSS takes 2 bit.
36326      * - bit [23:16] Indicates support for VHT-MCS 10 and 11 for
36327      *   n spatial streams
36328      *       - bit 16 - for NSS 1
36329      *       - bit 17 - for NSS 2
36330      *       - .
36331      *       - .
36332      *       - bit 23 - for NSS 8
36333      *       - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16
36334      *                  are valid
36335      *   Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros.
36336      */
36337     A_UINT32 vht_supp_mcs_2G;
36338     /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
36339     A_UINT32 he_cap_info_2G;
36340     /* HE Supported MCS Set field Rx/Tx same
36341      * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
36342      *     bit 2-0 indicating max HE MCS of NSS1
36343      *     bit 5-3 indicating max HE MCS of NSS2 and so on
36344      * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
36345      *     HE BW less than or equal to 80MHZ is encoded as follows
36346      * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
36347      * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
36348      * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
36349      * - 3 indicates that n spatial streams is not supported
36350      * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
36351      */
36352     A_UINT32 he_supp_mcs_2G;
36353     /* Valid Transmit chain mask */
36354     A_UINT32 tx_chain_mask_2G;
36355     /* Valid Receive chain mask */
36356     A_UINT32 rx_chain_mask_2G;
36357     /* max bw supported 5G, enum wmi_channel_width */
36358     A_UINT32 max_bw_supported_5G;
36359     /* WMI HT Capability, WMI_HT_CAP defines */
36360     A_UINT32 ht_cap_info_5G;
36361     /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
36362     A_UINT32 vht_cap_info_5G;
36363     /* VHT Supported MCS Set field Rx/Tx same
36364      * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
36365      * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
36366      * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
36367      * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
36368      * - 3 indicates that n spatial streams is not supported
36369      * - bit [15:0] Each NSS takes 2 bit.
36370      * - bit [23:16] Indicates support for VHT-MCS 10 and 11 for
36371      *   n spatial streams
36372      *       - bit 16 - for NSS 1
36373      *       - bit 17 - for NSS 2
36374      *       - .
36375      *       - .
36376      *       - bit 23 - for NSS 8
36377      *       - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16
36378      *                  are valid
36379      *   Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros.
36380      */
36381     A_UINT32 vht_supp_mcs_5G;
36382     /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
36383     A_UINT32 he_cap_info_5G;
36384     /* HE Supported MCS Set field Rx/Tx same
36385      * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
36386      *     bit 2-0 indicating max HE MCS of NSS1
36387      *     bit 5-3 indicating max HE MCS of NSS2 and so on
36388      * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
36389      *     HE BW less than or equal to 80MHZ is encoded as follows
36390      * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
36391      * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
36392      * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
36393      * - 3 indicates that n spatial streams is not supported
36394      * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
36395      * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
36396      *     HE BW equal to 80+80 or 160 MHZ encoding is same as above just the
36397      *     lower 16 bits are used for lower 80MHz NSS-MCS supported combo and
36398      *     upper 16 bits are used for upper 80MHz NSS-MCS supported combo
36399      */
36400     A_UINT32 he_supp_mcs_5G;
36401     /* Valid Transmit chain mask */
36402     A_UINT32 tx_chain_mask_5G;
36403     /* Valid Receive chain mask */
36404     A_UINT32 rx_chain_mask_5G;
36405     /* HE capability phy field of 802.11ax, WMI_HE_CAP defines */
36406     A_UINT32 he_cap_phy_info_2G[WMI_MAX_HECAP_PHY_SIZE];
36407     A_UINT32 he_cap_phy_info_5G[WMI_MAX_HECAP_PHY_SIZE];
36408     wmi_ppe_threshold he_ppet2G;
36409     wmi_ppe_threshold he_ppet5G;
36410     /* chainmask table to be used for the MAC */
36411     A_UINT32 chainmask_table_id;
36412     /* PDEV ID to LMAC ID mapping */
36413     A_UINT32 lmac_id;
36414     /* 2nd DWORD of HE capability info field of 802.11ax, support Draft 3+ */
36415     A_UINT32 he_cap_info_2G_ext;
36416     A_UINT32 he_cap_info_5G_ext;
36417     /*
36418      * bit 0     : Indicated support for RX 1xLTF + 0.4us
36419      * bit 1     : Indicates support for RX 2xLTF + 0.4us
36420      * bit 2     : Indicates support for 2xLTF in 160/80+80 MHz HE PPDU
36421      * bit[31:3] : Reserved
36422      * Refer to WMI_HE_CAP_xx_LTF_xxx_SUPPORT_GET/SET macros
36423      */
36424     A_UINT32 he_cap_info_internal;
36425 
36426     A_UINT32 wireless_modes; /* REGDMN MODE, see REGDMN_MODE_ enum */
36427     A_UINT32 low_2ghz_chan_freq;  /* units = MHz */
36428     A_UINT32 high_2ghz_chan_freq; /* units = MHz */
36429     A_UINT32 low_5ghz_chan_freq;  /* units = MHz */
36430     A_UINT32 high_5ghz_chan_freq; /* units = MHz */
36431 
36432     /*
36433      * NSS ratio to be sent to Host during boot-up capabilities negotiation
36434      *
36435      * Bit 0 - refer to WMI_NSS_RATIO_ENABLE_DISABLE_ definitions
36436      * [0]    :  0 - WMI_NSS_RATIO_DISABLE
36437      * [0]    :  1 - WMI_NSS_RATIO_ENABLE
36438      *
36439      * Bits 4:1 - refer to WMI_NSS_RATIO_INFO_ definitions
36440      * [4:1]  : 0000 - WMI_NSS_RATIO_1BY2_NSS
36441      * [4:1]  : 0001 - WMI_NSS_RATIO_3BY4_NSS
36442      * [4:1]  : 0010 - WMI_NSS_RATIO_1_NSS
36443      * [4:1]  : 0011 - WMI_NSS_RATIO_2_NSS
36444      *
36445      * [31:5] : Reserved
36446      */
36447     A_UINT32 nss_ratio;
36448     /**************************************************************************
36449      * DON'T ADD ANY FURTHER FIELDS HERE -
36450      * It would cause the size of the READY_EXT message within some targets
36451      * to exceed the size of the buffer used for the message.
36452      **************************************************************************/
36453 } WMI_MAC_PHY_CAPABILITIES;
36454 
36455 typedef struct {
36456     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES_EXT */
36457     /* hw_mode_id - identify a particular set of HW characteristics, as specified
36458      * by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element must be mapped
36459      * to its parent WMI_HW_MODE_CAPABILITIES element using hw_mode_id.
36460      * No particular ordering of WMI_MAC_PHY_CAPABILITIES elements should be assumed,
36461      * though in practice the elements may always be ordered by hw_mode_id */
36462     A_UINT32 hw_mode_id;
36463     /*
36464      * pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1
36465      * hw_link_id: Unique link id across SOCs, got as part of QMI handshake.
36466      * For legacy chips which do not support MLO, these top bits will always
36467      * be set to 0, so it won't impact the legacy chips which treat pdev_id
36468      * as 32 bits.
36469      */
36470     union {
36471         struct {
36472             A_UINT32 pdev_id:16,
36473                      hw_link_id:16;
36474         } wmi_pdev_to_link_map;
36475         A_UINT32 pdev_id;
36476     };
36477     /* phy id. Starts with 0 */
36478     A_UINT32 phy_id;
36479     A_UINT32 wireless_modes_ext; /* REGDMN MODE EXT, see REGDMN_MODE_ enum */
36480 
36481     /**************************************************************************
36482      * following new params for 802.11be, but under development
36483      **************************************************************************/
36484     /* EHT capability mac info field of 802.11be */
36485     A_UINT32 eht_cap_mac_info_2G[WMI_MAX_EHTCAP_MAC_SIZE];
36486     A_UINT32 eht_cap_mac_info_5G[WMI_MAX_EHTCAP_MAC_SIZE];
36487     A_UINT32 eht_supp_mcs_2G; /* deprecated (c.f. eht_supp_mcs_ext_2G) */
36488     A_UINT32 eht_supp_mcs_5G; /* deprecated (c.f. eht_supp_mcs_ext_5G) */
36489     /* EHT capability phy field of 802.11be, WMI_EHT_CAP defines */
36490     A_UINT32 eht_cap_phy_info_2G[WMI_MAX_EHTCAP_PHY_SIZE];
36491     A_UINT32 eht_cap_phy_info_5G[WMI_MAX_EHTCAP_PHY_SIZE];
36492     wmi_ppe_threshold eht_ppet2G;
36493     wmi_ppe_threshold eht_ppet5G;
36494     A_UINT32 eht_cap_info_internal;
36495     /* eht_supp_mcs_ext_2G, eht_supp_mcs_ext_5G:
36496      * array index interpretation:
36497      * 0 – index indicated EHT-MCS map for 20Mhz only sta (4 bytes valid)
36498      * 1 – index for <= 80MHz bw (only 3 bytes are valid and other is reserved)
36499      * 2 – index for 160Mhz bw (only 3 bytes are valid and other is reserved)
36500      * 3 – index for 320Mhz bw (only 3 bytes are valid and other is reserved)
36501      *
36502      * The format of the data stored in each array index element is defined
36503      * by IEEE802.11 9.4.2.295c.4
36504      * For example, for the 20 MHz / index 0 element:
36505      *     B0 -- B3: Rx Max Nss that Supports EHT-MCS 0–7
36506      *     B4 -- B7: Tx Max Nss that Supports EHT-MCS 0–7
36507      *     B8 -- B11: Rx Max Nss that Supports EHT-MCS 8–9
36508      *     B12 -- B15: Tx Max Nss that Supports EHT-MCS 8–9
36509      *     B16 -- B19: Rx Max Nss that Supports EHT-MCS 10–11
36510      *     B20 -- B23: Tx Max Nss that Supports EHT-MCS 10–11
36511      *     B24 -- B27: Rx Max Nss that Supports EHT-MCS 12–13
36512      *     B28 -- B31: Tx Max Nss that Supports EHT-MCS 12–13
36513      */
36514     A_UINT32 eht_supp_mcs_ext_2G[WMI_MAX_EHT_SUPP_MCS_2G_SIZE];
36515     A_UINT32 eht_supp_mcs_ext_5G[WMI_MAX_EHT_SUPP_MCS_5G_SIZE];
36516     union {
36517         struct {
36518             A_UINT32 emlsr_support:1,
36519                      emlsr_padding_delay:3,
36520                      emlsr_transition_delay:3,
36521                      emlmr_support:1,
36522                      emlmr_delay:3,
36523                      transition_timeout:4,
36524                      reserved: 17;
36525         };
36526         A_UINT32 eml_capability;
36527     };
36528     union {
36529         struct {
36530             A_UINT32 max_num_simultaneous_links:4,
36531                      srs_support:1,
36532                      tid_to_link_negotiation_support:2, /* Set to 0 if TID-to-link mapping is not supported by the MLD.
36533                                                          * Set to 1 if MLD supports the mapping of each TID to the same or different link set.
36534                                                          * Set to 2 if MLD only supports the mapping of all TIDs to the same link set.
36535                                                          * Value  3 is reserved */
36536                      freq_separation_str:5,
36537                      aar_support:1,
36538                      reserved2: 19;
36539         };
36540         A_UINT32 mld_capability;
36541     };
36542     union {
36543         struct {
36544             A_UINT32
36545                 op_update_para_support:1, /* Indicates support of operation parameter update negotiation */
36546                 reserved3: 31;
36547         };
36548         A_UINT32 ext_mld_capability;
36549     };
36550     union {
36551         struct {
36552             A_UINT32 medium_sync_duration:8,
36553                      medium_sync_ofdm_ed_threshold:4,
36554                      medium_sync_max_no_txops:4,
36555                      reserved4: 16;
36556         };
36557         A_UINT32 msd_capability;
36558     };
36559 } WMI_MAC_PHY_CAPABILITIES_EXT;
36560 
36561 typedef struct {
36562     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES */
36563     /* hw_mode_id - identify a particular set of HW characteristics,
36564      * as specified by the subsequent fields */
36565     A_UINT32 hw_mode_id;
36566     /* BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on
36567      * number of bits set in phy_id_map represents number of WMI_MAC_PHY_CAPABILITIES TLV's
36568      * one for each active PHY for current HW mode identified by hw_mode_id. For example for
36569      * DBS/SBS mode there will be 2 WMI_MAC_PHY_CAPABILITIES TLVs and for single MAC modes it
36570      * will be 1 WMI_MAC_PHY_CAPABILITIES TLVs */
36571     A_UINT32 phy_id_map;
36572     /* hw_mode_config_type
36573      * Identify a particular type of HW mode such as SBS, DBS etc.
36574      * Refer to WMI_HW_MODE_CONFIG_TYPE values.
36575      *
36576      * Use bits 31:27 of hw_mode_config_type for Per HW mode MLO capability
36577      * flags.
36578      * Refer to WMI_MLO_CAP_FLAG_XXX. For legacy chips which do not support
36579      * MLO, these top bits will always be set to 0, so it won't impact the
36580      * legacy chips which treat hw_mode_config_type as 32 bits.
36581      */
36582     union {
36583         struct {
36584             A_UINT32 hw_mode_config   :27,
36585                      mlo_cap_flag     :5; /* see WMI_MLO_CAP_FLAG_ defs */
36586         };
36587         A_UINT32 hw_mode_config_type;
36588     };
36589 
36590     /**************************************************************************
36591      * DON'T ADD ANY FURTHER FIELDS HERE -
36592      * It would cause the size of the READY_EXT message within some targets
36593      * to exceed the size of the buffer used for the message.
36594      **************************************************************************/
36595 } WMI_HW_MODE_CAPABILITIES;
36596 
36597 /*
36598  * The following macros are for the bitfields witihin the supported flags field
36599  * of WMI_MAC_PHY_CHAINMASK_CAPABILITY:
36600  * Capabilities for the chainmask
36601  */
36602 
36603 #define WMI_SUPPORT_CHAN_WIDTH_20_GET(flags) WMI_GET_BITS(flags, 0, 1)
36604 #define WMI_SUPPORT_CHAN_WIDTH_20_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
36605 
36606 #define WMI_SUPPORT_CHAN_WIDTH_40_GET(flags) WMI_GET_BITS(flags, 1, 1)
36607 #define WMI_SUPPORT_CHAN_WIDTH_40_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
36608 
36609 #define WMI_SUPPORT_CHAN_WIDTH_80_GET(flags) WMI_GET_BITS(flags, 2, 1)
36610 #define WMI_SUPPORT_CHAN_WIDTH_80_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
36611 
36612 #define WMI_SUPPORT_CHAN_WIDTH_160_GET(flags) WMI_GET_BITS(flags, 3, 1)
36613 #define WMI_SUPPORT_CHAN_WIDTH_160_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
36614 
36615 #define WMI_SUPPORT_CHAN_WIDTH_80P80_GET(flags) WMI_GET_BITS(flags, 4, 1)
36616 #define WMI_SUPPORT_CHAN_WIDTH_80P80_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
36617 
36618 #define WMI_SUPPORT_AGILE_SPECTRAL_GET(flags) WMI_GET_BITS(flags, 5, 1)
36619 #define WMI_SUPPORT_AGILE_SPECTRAL_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
36620 
36621 #define WMI_SUPPORT_AGILE_SPECTRAL_160_GET(flags) WMI_GET_BITS(flags, 6, 1)
36622 #define WMI_SUPPORT_AGILE_SPECTRAL_160_SET(flags, value) WMI_SET_BITS(flags, 6, 1, value)
36623 
36624 #define WMI_SUPPORT_ADFS_160_GET(flags) WMI_GET_BITS(flags, 7, 1)
36625 #define WMI_SUPPORT_ADFS_160_SET(flags, value) WMI_SET_BITS(flags, 7, 1, value)
36626 
36627 #define WMI_SUPPORT_CHAN_WIDTH_320_GET(flags) WMI_GET_BITS(flags, 8, 1)
36628 #define WMI_SUPPORT_CHAN_WIDTH_320_SET(flags, value) WMI_SET_BITS(flags, 8, 1, value)
36629 
36630 #define WMI_SUPPORT_ADFS_320_GET(flags) WMI_GET_BITS(flags, 9, 1)
36631 #define WMI_SUPPORT_ADFS_320_SET(flags, value) WMI_SET_BITS(flags, 9, 1, value)
36632 
36633 #define WMI_SUPPORT_AGILE_SPECTRAL_320_GET(flags) WMI_GET_BITS(flags, 10, 1)
36634 #define WMI_SUPPORT_AGILE_SPECTRAL_320_SET(flags, value) WMI_SET_BITS(flags, 10, 1, value)
36635 
36636 #define WMI_SUPPORT_CHAIN_MASK_2G_GET(flags) WMI_GET_BITS(flags, 27, 1)
36637 #define WMI_SUPPORT_CHAIN_MASK_2G_SET(flags, value) WMI_SET_BITS(flags, 27, 1, value)
36638 
36639 #define WMI_SUPPORT_CHAIN_MASK_5G_GET(flags) WMI_GET_BITS(flags, 28, 1)
36640 #define WMI_SUPPORT_CHAIN_MASK_5G_SET(flags, value) WMI_SET_BITS(flags, 28, 1, value)
36641 
36642 #define WMI_SUPPORT_CHAIN_MASK_TX_GET(flags) WMI_GET_BITS(flags, 29, 1)
36643 #define WMI_SUPPORT_CHAIN_MASK_TX_SET(flags, value) WMI_SET_BITS(flags, 29, 1, value)
36644 
36645 #define WMI_SUPPORT_CHAIN_MASK_RX_GET(flags) WMI_GET_BITS(flags, 30, 1)
36646 #define WMI_SUPPORT_CHAIN_MASK_RX_SET(flags, value) WMI_SET_BITS(flags, 30, 1, value)
36647 
36648 #define WMI_SUPPORT_CHAIN_MASK_ADFS_GET(flags) WMI_GET_BITS(flags, 31, 1)
36649 #define WMI_SUPPORT_CHAIN_MASK_ADFS_SET(flags, value) WMI_SET_BITS(flags, 31, 1, value)
36650 
36651 /** Definition of valid chainmask and associated capabilities */
36652 typedef struct {
36653     A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_CAPABILITY */
36654      /* supported flags: Capabilities for this chianmask*/
36655     union {
36656         struct {
36657             A_UINT32 supports_chan_width_20:1,
36658                      supports_chan_width_40:1,
36659                      supports_chan_width_80:1,
36660                      supports_chan_width_160:1,
36661                      supports_chan_width_80P80:1,
36662                      supports_agile_spectral:1,
36663                      supports_agile_spectral_160:1,
36664                      supports_aDFS_160:1,
36665                      supports_chan_width_320:1,
36666                      supports_aDFS_320:1,
36667                      supports_agile_spectral_320:1,
36668                      reserved:16, /* bits 26:11 */
36669                      chain_mask_2G:1,
36670                      chain_mask_5G:1,
36671                      chain_mask_tx:1,
36672                      chain_mask_rx:1,
36673                      supports_aDFS:1; /* agile DFS */
36674         };
36675         A_UINT32 supported_flags;
36676     };
36677     A_UINT32 chainmask;
36678 
36679     /**************************************************************************
36680      * DON'T ADD ANY FURTHER FIELDS HERE -
36681      * It would cause the size of the READY_EXT message within some targets
36682      * to exceed the size of the buffer used for the message.
36683      **************************************************************************/
36684 } WMI_MAC_PHY_CHAINMASK_CAPABILITY;
36685 
36686 typedef struct {
36687     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_COMBO */
36688     A_UINT32 chainmask_table_id;
36689     /* Number of valid Chainmask in the table */
36690     A_UINT32 num_valid_chainmask;
36691 
36692     /**************************************************************************
36693      * DON'T ADD ANY FURTHER FIELDS HERE -
36694      * It would cause the size of the READY_EXT message within some targets
36695      * to exceed the size of the buffer used for the message.
36696      **************************************************************************/
36697 /*
36698  * This TLV is followed by the below TLVs:
36699  * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask]
36700  */
36701 } WMI_MAC_PHY_CHAINMASK_COMBO;
36702 
36703 typedef struct {
36704     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS */
36705     /* num HW modes */
36706     A_UINT32 num_hw_modes;
36707     /* number of unique chainmask combo tables */
36708     A_UINT32 num_chainmask_tables;
36709 
36710     /**************************************************************************
36711      * DON'T ADD ANY FURTHER FIELDS HERE -
36712      * It would cause the size of the READY_EXT message within some targets
36713      * to exceed the size of the buffer used for the message.
36714      **************************************************************************/
36715 
36716 /*
36717  * This TLV is followed by the below TLVs:
36718  *
36719  * WMI_HW_MODE_CAPABILITIES soc_hw_mode_caps[num_hw_modes]
36720  *
36721  * (intervening TLVs, e.g. HW_MODE_CAPS, MAC_PHY_CAPS, HAL_REG_CAPS)
36722  *
36723  * WMI_MAC_PHY_CHAINMASK_COMBO mac_phy_chainmask_combo[num_chainmask_tables]
36724  * // number of chainmasks specified in mac_phy_chainmask_combo[0]
36725  * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask0]
36726  * // number of chainmasks specified in mac_phy_chainmask_combo[1]
36727  * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask1]
36728  * // number of chainmasks specified in mac_phy_chainmask_combo[2]
36729  * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask2]
36730  * etc.
36731  */
36732 } WMI_SOC_MAC_PHY_HW_MODE_CAPS;
36733 
36734 /*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/
36735 typedef struct {
36736     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT */
36737     /* phy id */
36738     A_UINT32 phy_id;
36739     /* regdomain value specified in EEPROM */
36740     A_UINT32 eeprom_reg_domain;
36741     /* regdomain */
36742     A_UINT32 eeprom_reg_domain_ext;
36743     /* CAP1 capabilities bit map, see REGDMN_CAP1_ defines */
36744     A_UINT32 regcap1;
36745     /* REGDMN EEPROM CAP, see REGDMN_EEPROM_EEREGCAP_ defines */
36746     A_UINT32 regcap2;
36747     /* REGDMN MODE, see REGDMN_MODE_ enum */
36748     A_UINT32 wireless_modes;
36749     A_UINT32 low_2ghz_chan;  /* freq in MHz */
36750     A_UINT32 high_2ghz_chan; /* freq in MHz */
36751     A_UINT32 low_5ghz_chan;  /* freq in MHz */
36752     A_UINT32 high_5ghz_chan; /* freq in MHz */
36753     /**************************************************************************
36754      * DON'T ADD ANY FURTHER FIELDS HERE -
36755      * It would cause the size of the READY_EXT message within some targets
36756      * to exceed the size of the buffer used for the message.
36757      **************************************************************************/
36758 } WMI_HAL_REG_CAPABILITIES_EXT;
36759 
36760 typedef struct {
36761     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT2 */
36762     /* phy id */
36763     A_UINT32 phy_id;
36764     /* regdomain value specified in EEPROM */
36765     A_UINT32 wireless_modes_ext;
36766     A_UINT32 low_2ghz_chan_ext;  /* freq in MHz */
36767     A_UINT32 high_2ghz_chan_ext; /* freq in MHz */
36768     A_UINT32 low_5ghz_chan_ext;  /* freq in MHz */
36769     A_UINT32 high_5ghz_chan_ext; /* freq in MHz */
36770 } WMI_HAL_REG_CAPABILITIES_EXT2;
36771 
36772 /*
36773  * TWT service capability bitmap in wmi_twt_caps_params TLV
36774  * within WMI_SERVICE_READY_EXT2_EVENTID message
36775  */
36776 typedef enum {
36777     WMI_TWT_STA_SYNC_EVENT_CAP = 1, /* STA TWT: FW internal errors reported using sync WMI_TWT_ACK_EVENTID */
36778 
36779     /* Add new TWT Caps above */
36780     WMI_TWT_MAX_CAP = 32,
36781 } WMI_TWT_CAPS_BITMAP;
36782 
36783 typedef struct {
36784     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_caps_param */
36785 
36786     /* twt_capability_bitmap
36787      * TWT Capabilities - refer to WMI_TWT_CAPS_BITMAP for the meaning of
36788      * the bits within the bitmap
36789      */
36790     A_UINT32 twt_capability_bitmap;
36791 } wmi_twt_caps_params;
36792 
36793 /*
36794  * This TLV used for Scan Radio RDP
36795  * We have an RDP which supports Multiband-Frequency (2 GHz, 5 GHz and 6 GHz)
36796  * on a single radio.
36797  * The AP acts as a special VAP. There will not be WMI_VDEV_UP_CMD.
36798  * This radio is used only for scanning purpose and to send few MGMT frames.
36799  * The DFS feature is disabled on this scan radio, since there will not be
36800  * much TX traffic.
36801  * The Host has to disable CAC timer because DFS feature not supported here.
36802  * In order to know about the scan radio RDP, DFS disabled case and
36803  * SCAN BLANKING support, the target has to send this information to Host
36804  * per pdev via WMI_SERVICE_READY_EXT2_EVENT.
36805  * The target is notified of the special scan VAP by the flags variable
36806  * in the WMI_CREATE_CMD.
36807  */
36808 typedef struct {
36809     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SCAN_RADIO_CAPABILITIES_EXT2 */
36810     A_UINT32 phy_id;
36811     /*
36812      * Bit 0:
36813      *     1 - SCAN_RADIO supported  0 - SCAN_RADIO  not supported
36814      *     Refer to WMI_SCAN_RADIO_CAP_SCAN_RADIO_FLAG_SET, GET macros
36815      * Bit 1:
36816      *     1 - DFS enabled           0 - DFS disabled
36817      *     Refer to WMI_SCAN_RADIO_CAP_DFS_FLAG_SET, GET macros
36818      * Bit 2:
36819      *     1 - SCAN RADIO blanking supported
36820      *     0 - SCAN RADIO blanking not supported
36821      *     Refer to WMI_SCAN_RADIO_CAP_BLANKING_SUPPORT_SET, GET macros
36822      * [3:31] reserved
36823      */
36824     A_UINT32 flags;
36825 } WMI_SCAN_RADIO_CAPABILITIES_EXT2;
36826 
36827 #define WMI_SCAN_RADIO_CAP_SCAN_RADIO_FLAG_GET(flag)         WMI_GET_BITS(flag, 0, 1)
36828 #define WMI_SCAN_RADIO_CAP_SCAN_RADIO_FLAG_SET(flag, val)    WMI_SET_BITS(flag, 0, 1, val)
36829 
36830 #define WMI_SCAN_RADIO_CAP_DFS_FLAG_GET(flag)                WMI_GET_BITS(flag, 1, 1)
36831 #define WMI_SCAN_RADIO_CAP_DFS_FLAG_SET(flag, val)           WMI_SET_BITS(flag, 1, 1, val)
36832 
36833 #define WMI_SCAN_RADIO_CAP_BLANKING_SUPPORT_GET(flag)        WMI_GET_BITS(flag, 2, 1)
36834 #define WMI_SCAN_RADIO_CAP_BLANKING_SUPPORT_SET(flag, val)   WMI_SET_BITS(flag, 2, 1, val)
36835 
36836 typedef struct {
36837     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES */
36838     A_UINT32 num_phy;
36839     /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */
36840 
36841     /**************************************************************************
36842      * DON'T ADD ANY FURTHER FIELDS HERE -
36843      * It would cause the size of the READY_EXT message within some targets
36844      * to exceed the size of the buffer used for the message.
36845      **************************************************************************/
36846 } WMI_SOC_HAL_REG_CAPABILITIES;
36847 
36848 typedef struct {
36849     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_OEM_DMA_RING_CAPABILITIES */
36850     A_UINT32 pdev_id;
36851     A_UINT32 min_num_ptr;
36852     /* Minimum number of pointers in the OEM DMA ring for this pdev */
36853     A_UINT32 min_buf_size;
36854     /* Minimum size in bytes of each buffer in the OEM DMA ring */
36855     A_UINT32 min_buf_align;
36856     /* Minimum alignment in bytes of each buffer in the OEM DMA ring */
36857 
36858     /**************************************************************************
36859      * DON'T ADD ANY FURTHER FIELDS HERE -
36860      * It would cause the size of the READY_EXT message within some targets
36861      * to exceed the size of the buffer used for the message.
36862      **************************************************************************/
36863 } WMI_OEM_DMA_RING_CAPABILITIES;
36864 
36865 typedef enum {
36866     WMI_SAR_VERSION_0_ORIGINAL    = 0x00,
36867     WMI_SAR_VERSION_1_FULL_TABLE  = 0x01,
36868     WMI_SAR_VERSION_2_DBS_SAR     = 0x02,
36869     WMI_SAR_VERSION_3_SBS_SAR     = 0x03,
36870 
36871     WMI_SAR_VERSION_SMART_TX      = 0x04,
36872     WMI_SAR_VERSION_TAS           = 0x05,
36873 
36874     WMI_SAR_VERSION_INVALID       = 0x80
36875 } wmi_sar_version_t;
36876 
36877 typedef struct {
36878     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SAR_CAPABILITIES*/
36879     /* sar version in bdf */
36880     A_UINT32 active_version; /* contains a wmi_sar_version_t value */
36881 
36882     /**************************************************************************
36883      * DON'T ADD ANY FURTHER FIELDS HERE -
36884      * It would cause the size of the READY_EXT message within some targets
36885      * to exceed the size of the buffer used for the message.
36886      **************************************************************************/
36887 } WMI_SAR_CAPABILITIES;
36888 
36889 typedef enum {
36890     WMI_SAR_FLAG_NONE = 0,
36891     WMI_SAR_SET_CTL_GROUPING_DISABLE,
36892     WMI_SAR_DBS_WITH_BT_DISABLE,
36893     WMI_SAR_FLAG_MAX,
36894 } wmi_sar_flags;
36895 
36896 typedef struct {
36897     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_flags*/
36898     /* sar flags in bdf */
36899     A_UINT32 sar_flags; /* refer to enum wmi_sar_flags */
36900 } wmi_sar_flag_tlv_param;
36901 
36902 typedef struct {
36903     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv */
36904     /** global default adaptive dwell mode, used when WMI_SCAN_DWELL_MODE_DEFAULT */
36905     A_UINT32 default_adaptive_dwell_mode;
36906    /** the weight to calculate the average low pass filter for channel congestion. 0-100 */
36907     A_UINT32 adapative_lpf_weight;
36908    /** interval to monitor passive scan in msec */
36909     A_UINT32 passive_monitor_interval_ms;
36910    /** % of wifi activity to switch from passive to active 0-100 */
36911     A_UINT32 wifi_activity_threshold_pct;
36912 } wmi_scan_adaptive_dwell_parameters_tlv;
36913 
36914 typedef struct {
36915     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param */
36916     /* globally enable/disable adaptive dwell */
36917     A_UINT32 enable;
36918     /** pdev_id for identifying the MAC
36919      * See macros starting with WMI_PDEV_ID_ for values.
36920      * In non-DBDC case host should set it to 0
36921      */
36922     A_UINT32 pdev_id;
36923 /**
36924  * followed by TLV (tag length value) parameters array
36925  * The TLV's are:
36926  * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements)
36927  */
36928 } wmi_scan_adaptive_dwell_config_fixed_param;
36929 
36930 typedef struct {
36931     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_param_tlv */
36932     /**  module_id **/
36933     A_UINT32 module_id;
36934    /** number of dbs scans */
36935     A_UINT32 num_dbs_scans;
36936    /** number of non-dbs scans */
36937     A_UINT32 num_non_dbs_scans;
36938 } wmi_scan_dbs_duty_cycle_tlv_param;
36939 
36940 typedef struct {
36941     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_fixed_param */
36942     /* number of scan client dutycycle param elements */
36943     A_UINT32 num_clients;
36944     /** pdev_id for identifying the MAC
36945      * See macros starting with WMI_PDEV_ID_ for values.
36946      * In non-DBDC case host should set it to 0
36947      */
36948     A_UINT32 pdev_id;
36949 /**
36950  * followed by TLV (tag length value) parameters array
36951  * The TLV's are:
36952  * wmi_scan_selection_duty_cycle_tlv_param[num_clients];
36953  */
36954 } wmi_scan_dbs_duty_cycle_fixed_param;
36955 
36956 typedef struct {
36957     /** TLV tag and len; tag equals
36958      *  WMITLV_TAG_STRUC_wmi_therm_throt_level_config_info */
36959     A_UINT32 tlv_header;
36960     /** temp_lwm:
36961      * temperature sensor value in celsius when to exit to lower zone,
36962      * this value can be lower than HWM of lower zone as zone overlapping
36963      * is permitted by design to provide hysteresis
36964      */
36965     A_UINT32 temp_lwm;
36966     /** temp_hwm:
36967      * temperature sensor value in celsius when to exit to higher zone,
36968      * this value can be higher than LWM of higher zone as zone overlapping
36969      * is permitted by design to provide hysteresis
36970      */
36971     A_UINT32 temp_hwm;
36972     /** dc_off_percent:
36973      * duty cycle off percent 0-100.
36974      * 0 means no off, 100 means no on (shutdown the phy).
36975      */
36976     A_UINT32 dc_off_percent;
36977     /** prio:
36978      * Disable only the transmit queues in firmware that have lower priority
36979      * than value defined by prio.
36980      *    Prioritization:
36981      *    0 = disable all data tx queues, No Prioritization defined
36982      *    1 = disable BK tx queue
36983      *    2 = disable BK+BE tx queues
36984      *    3 = disable BK+BE+VI tx queues
36985      */
36986     A_UINT32 prio;
36987     /**
36988      * Pout power reduction in 0.25 dB units.
36989      * For example, a value of 5 causes a power reduction of 1.25 dB.
36990      */
36991     A_UINT32 pout_reduction_25db;
36992     /* tx chain mask: Chain mask to apply based on the temp level */
36993     A_UINT32 tx_chain_mask;
36994 } wmi_therm_throt_level_config_info;
36995 
36996 typedef enum {
36997     WMI_THERMAL_TEMP_RANGE_STATS_NONE = 0,
36998     WMI_THERMAL_TEMP_RANGE_STATS_INIT,
36999     WMI_THERMAL_TEMP_RANGE_STATS_REQUEST,
37000     WMI_THERMAL_TEMP_RANGE_STATS_CLEAR,
37001     WMI_THERMAL_STATS_CURRENT_ALL_SENSORS_TEMP,
37002 } wmi_thermal_stats_action;
37003 
37004 typedef struct {
37005     /** TLV tag and len; tag equals
37006      * WMITLV_TAG_STRUC_wmi_thermal_stats_cmd_fixed_param
37007      */
37008     A_UINT32 tlv_header;
37009     /*
37010      * Configure thermal temperature offset value for capturing
37011      * thermal stats in thermal range.
37012      * FW already has thermal throttling threshold temperature in BDF.
37013      * Thermal STATS start capturing from temperature threshold to
37014      * temperature threshold + offset.
37015      * If thermal offset is 0 then thermal STATS capture is disabled.
37016      *
37017      * Units of thermal_offset are degrees Celsius.
37018      */
37019     A_UINT32 thermal_offset;
37020     A_UINT32 thermal_action; /* refer to enum wmi_thermal_stats_action */
37021 } wmi_thermal_stats_cmd_fixed_param;
37022 
37023 typedef enum {
37024     WMI_THERMAL_CLIENT_UNSPECIFIED = 0,
37025     WMI_THERMAL_CLIENT_APPS        = 1,
37026     WMI_THERMAL_CLIENT_WPSS        = 2,
37027     WMI_THERMAL_CLIENT_FW          = 3,
37028     WMI_THERMAL_CLIENT_MAX
37029 } WMI_THERMAL_MITIGATION_CLIENTS;
37030 
37031 #define WMI_THERMAL_CLIENT_MAX_PRIORITY 10
37032 
37033 typedef struct {
37034     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_config_request_fixed_param */
37035     A_UINT32 pdev_id;          /* config for each pdev */
37036     A_UINT32 enable;           /* 0:disable, 1:enable */
37037     A_UINT32 dc;               /* duty cycle in ms */
37038     A_UINT32 dc_per_event;     /* how often (after how many duty cycles) the FW sends stats to host */
37039     A_UINT32 therm_throt_levels; /* Indicates the number of thermal zone configuration */
37040     A_UINT32 client_id;        /* Indicates the client from whom the request is being forwarded to FW. Refer to WMI_THERMAL_MITIGATION_CLIENTS. */
37041     A_UINT32 priority;         /* Indicates the priority, higher the value, higher the priority. Varies from 1 to WMI_THERMAL_CLIENT_MAX_PRIORITY. */
37042     /*
37043      * Following this structure is the TLV:
37044      * struct wmi_therm_throt_level_config_info therm_throt_level_config_info[therm_throt_levels];
37045      */
37046 } wmi_therm_throt_config_request_fixed_param;
37047 
37048 typedef enum {
37049     /* no throttling */
37050     WMI_THERMAL_FULLPERF        = 0,
37051     /* throttling tx to do thermal mitigation */
37052     WMI_THERMAL_MITIGATION      = 1,
37053     /* shut down the tx completely */
37054     WMI_THERMAL_SHUTOFF         = 2,
37055     /* THERMAL_SHUTDOWN_TGT
37056      * The target is over the temperature limit even with tx shut off.
37057      * The target will be shut down entirely to control the temperature.
37058      */
37059     WMI_THERMAL_SHUTDOWN_TGT    = 3,
37060 } WMI_THERMAL_THROT_LEVEL;
37061 
37062 #define WMI_THERMAL_STATS_TEMP_THRESH_LEVEL_MAX 5
37063 
37064 /** FW response with the stats event id for every pdev and zones */
37065 typedef struct {
37066     /*  TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_stats_event_fixed_param */
37067     A_UINT32 tlv_header;
37068     A_UINT32 pdev_id;            /* stats for corresponding pdev*/
37069     A_UINT32 temp;               /* Temperature reading in celsius */
37070     A_UINT32 level;              /* Current thermal throttling level -
37071                                   * contains a WMI_THERMAL_THROT_LEVEL value. */
37072     A_UINT32 therm_throt_levels; /* number of levels in therm_throt_level_stats_info */
37073     /* This TLV is followed by another TLV of array of structs
37074      * wmi_therm_throt_level_stats_info therm_throt_level_stats_info[therm_throt_levels];
37075      * wmi_thermal_throt_temp_range_stats temp_range_stats[therm_throt_levels];
37076      */
37077 } wmi_therm_throt_stats_event_fixed_param;
37078 
37079 typedef struct {
37080     /** TLV tag and len; tag equals
37081      *  WMITLV_TAG_STRUC_wmi_therm_throt_level_stats_info */
37082     A_UINT32 tlv_header;
37083     A_UINT32 level_count; /* count of each time thermal throttling entered this state */
37084     A_UINT32 dc_count;    /* total number of duty cycles spent in this state. */
37085                           /* this number increments by one each time we are in this state and we finish one full duty cycle. */
37086 } wmi_therm_throt_level_stats_info;
37087 
37088 typedef struct {
37089     /** TLV tag and len; tag equals
37090      *  WMITLV_TAG_STRUC_wmi_thermal_throt_temp_range_stats
37091      */
37092     A_UINT32 tlv_header;
37093     /**
37094      * Temperature range to capture thermal stats between start to end
37095      * temperature level.
37096      */
37097     A_UINT32 start_temp_level; /* unit in degC */
37098     A_UINT32 end_temp_level;   /* unit in degC */
37099 
37100     /** Total time spent on each thermal stats level, units are milliseconds. */
37101     A_UINT32 total_time_ms_lo;
37102     A_UINT32 total_time_ms_hi;
37103     /**
37104      * Thermal stats counter for every time thermal stats level enters
37105      * this temperature range.
37106      */
37107     A_UINT32 num_entry;
37108 } wmi_thermal_throt_temp_range_stats;
37109 
37110 
37111 typedef enum {
37112     WMI_REG_EXT_FCC_MIDBAND = 0,
37113     WMI_REG_EXT_JAPAN_MIDBAND = 1,
37114     WMI_REG_EXT_FCC_DFS_HT40 = 2,
37115     WMI_REG_EXT_JAPAN_NONDFS_HT40 = 3,
37116     WMI_REG_EXT_JAPAN_DFS_HT40 = 4,
37117     WMI_REG_EXT_FCC_CH_144 = 5,
37118 } WMI_REG_EXT_BITMAP;
37119 
37120 #ifdef WMI_CMD_STRINGS
wmi_id_to_name(A_UINT32 wmi_command)37121 static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command)
37122 {
37123     switch (wmi_command) {
37124         /* initialize the wlan sub system */
37125          WMI_RETURN_STRING(WMI_INIT_CMDID);
37126 
37127         /* Scan specific commands */
37128 
37129         /* start scan request to FW  */
37130         WMI_RETURN_STRING(WMI_START_SCAN_CMDID);
37131         /* stop scan request to FW  */
37132         WMI_RETURN_STRING(WMI_STOP_SCAN_CMDID);
37133         /* full list of channels as defined by the regulatory
37134          * that will be used by scanner   */
37135         WMI_RETURN_STRING(WMI_SCAN_CHAN_LIST_CMDID);
37136         /* overwrite default priority table in scan scheduler */
37137         WMI_RETURN_STRING(WMI_SCAN_SCH_PRIO_TBL_CMDID);
37138         /* This command to adjust the priority and min.max_rest_time
37139          * of an on ongoing scan request.
37140          */
37141         WMI_RETURN_STRING(WMI_SCAN_UPDATE_REQUEST_CMDID);
37142 
37143         /* PDEV(physical device) specific commands */
37144         /* set regulatorty ctl id used by FW to determine the exact
37145          * ctl power limits */
37146         WMI_RETURN_STRING(WMI_PDEV_SET_REGDOMAIN_CMDID);
37147         /* set channel. mainly used for supporting monitor mode */
37148         WMI_RETURN_STRING(WMI_PDEV_SET_CHANNEL_CMDID);
37149         /* set pdev specific parameters */
37150         WMI_RETURN_STRING(WMI_PDEV_SET_PARAM_CMDID);
37151         /* enable packet log */
37152         WMI_RETURN_STRING(WMI_PDEV_PKTLOG_ENABLE_CMDID);
37153         /* disable packet log*/
37154         WMI_RETURN_STRING(WMI_PDEV_PKTLOG_DISABLE_CMDID);
37155         /* set wmm parameters */
37156         WMI_RETURN_STRING(WMI_PDEV_SET_WMM_PARAMS_CMDID);
37157         /* set HT cap ie that needs to be carried probe requests
37158          * HT/VHT channels */
37159         WMI_RETURN_STRING(WMI_PDEV_SET_HT_CAP_IE_CMDID);
37160         /* set VHT cap ie that needs to be carried on probe
37161          * requests on VHT channels */
37162         WMI_RETURN_STRING(WMI_PDEV_SET_VHT_CAP_IE_CMDID);
37163 
37164         /* Command to send the DSCP-to-TID map to the target */
37165         WMI_RETURN_STRING(WMI_PDEV_SET_DSCP_TID_MAP_CMDID);
37166         /* set quiet ie parameters. primarily used in AP mode */
37167         WMI_RETURN_STRING(WMI_PDEV_SET_QUIET_MODE_CMDID);
37168         /* Enable/Disable Green AP Power Save  */
37169         WMI_RETURN_STRING(WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID);
37170         /* get TPC config for the current operating channel */
37171         WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CONFIG_CMDID);
37172 
37173         /* set the base MAC address for the physical device before
37174          * a VDEV is created. For firmware that does not support
37175          * this feature and this command, the pdev MAC address will
37176          * not be changed. */
37177         WMI_RETURN_STRING(WMI_PDEV_SET_BASE_MACADDR_CMDID);
37178 
37179         /* eeprom content dump , the same to bdboard data */
37180         WMI_RETURN_STRING(WMI_PDEV_DUMP_CMDID);
37181 
37182         /* VDEV(virtual device) specific commands */
37183         /* vdev create */
37184         WMI_RETURN_STRING(WMI_VDEV_CREATE_CMDID);
37185         /* vdev delete */
37186         WMI_RETURN_STRING(WMI_VDEV_DELETE_CMDID);
37187         /* vdev start request */
37188         WMI_RETURN_STRING(WMI_VDEV_START_REQUEST_CMDID);
37189         /* vdev restart request (RX only, NO TX, used for CAC period)*/
37190         WMI_RETURN_STRING(WMI_VDEV_RESTART_REQUEST_CMDID);
37191         /* vdev up request */
37192         WMI_RETURN_STRING(WMI_VDEV_UP_CMDID);
37193         /* vdev stop request */
37194         WMI_RETURN_STRING(WMI_VDEV_STOP_CMDID);
37195         /* vdev down request */
37196         WMI_RETURN_STRING(WMI_VDEV_DOWN_CMDID);
37197         /* set a vdev param */
37198         WMI_RETURN_STRING(WMI_VDEV_SET_PARAM_CMDID);
37199         /* set a key (used for setting per peer unicast
37200          * and per vdev multicast) */
37201         WMI_RETURN_STRING(WMI_VDEV_INSTALL_KEY_CMDID);
37202         /* Set bss max idle time */
37203         WMI_RETURN_STRING(WMI_VDEV_BSS_MAX_IDLE_TIME_CMDID);
37204 
37205         /* wnm sleep mode command */
37206         WMI_RETURN_STRING(WMI_VDEV_WNM_SLEEPMODE_CMDID);
37207         WMI_RETURN_STRING(WMI_VDEV_WMM_ADDTS_CMDID);
37208         WMI_RETURN_STRING(WMI_VDEV_WMM_DELTS_CMDID);
37209         WMI_RETURN_STRING(WMI_VDEV_SET_WMM_PARAMS_CMDID);
37210         WMI_RETURN_STRING(WMI_VDEV_SET_GTX_PARAMS_CMDID);
37211         WMI_RETURN_STRING(WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID);
37212 
37213         WMI_RETURN_STRING(WMI_VDEV_PLMREQ_START_CMDID);
37214         WMI_RETURN_STRING(WMI_VDEV_PLMREQ_STOP_CMDID);
37215         WMI_RETURN_STRING(WMI_VDEV_TSF_TSTAMP_ACTION_CMDID);
37216         WMI_RETURN_STRING(WMI_VDEV_SET_IE_CMDID);
37217         WMI_RETURN_STRING(WMI_VDEV_REPORT_AP_OPER_BW_CMDID);
37218 
37219         /* peer specific commands */
37220 
37221         /** create a peer */
37222         WMI_RETURN_STRING(WMI_PEER_CREATE_CMDID);
37223         /** delete a peer */
37224         WMI_RETURN_STRING(WMI_PEER_DELETE_CMDID);
37225         /** delete all peer (excluding bss peer) */
37226         WMI_RETURN_STRING(WMI_VDEV_DELETE_ALL_PEER_CMDID);
37227         /** flush specific  tid queues of a peer */
37228         WMI_RETURN_STRING(WMI_PEER_FLUSH_TIDS_CMDID);
37229         /** set a parameter of a peer */
37230         WMI_RETURN_STRING(WMI_PEER_SET_PARAM_CMDID);
37231         /* set peer to associated state. will cary all parameters
37232          * determined during assocication time */
37233         WMI_RETURN_STRING(WMI_PEER_ASSOC_CMDID);
37234         /* add a wds  (4 address ) entry. used only for testing
37235          * WDS feature on AP products */
37236         WMI_RETURN_STRING(WMI_PEER_ADD_WDS_ENTRY_CMDID);
37237         /* remove wds  (4 address ) entry. used only for testing WDS
37238          * feature on AP products */
37239         WMI_RETURN_STRING(WMI_PEER_REMOVE_WDS_ENTRY_CMDID);
37240         /* set up mcast info for multicast to unicast conversion */
37241         WMI_RETURN_STRING(WMI_PEER_MCAST_GROUP_CMDID);
37242         /* request peer info from FW to get PEER_INFO_EVENTID */
37243         WMI_RETURN_STRING(WMI_PEER_INFO_REQ_CMDID);
37244         /* unmap response for a peer */
37245         WMI_RETURN_STRING(WMI_PEER_UNMAP_RESPONSE_CMDID);
37246 
37247         /* beacon/management specific commands */
37248 
37249         /* transmit beacon by reference. used for transmitting beacon
37250          * on low latency interface like pcie */
37251         WMI_RETURN_STRING(WMI_BCN_TX_CMDID);
37252         /* transmit beacon by value */
37253         WMI_RETURN_STRING(WMI_PDEV_SEND_BCN_CMDID);
37254         /* set the beacon template. used in beacon offload mode to setup
37255          * the common beacon template with the FW to be used by FW to
37256          * generate beacons */
37257         WMI_RETURN_STRING(WMI_BCN_TMPL_CMDID);
37258         /* set beacon filter with FW */
37259         WMI_RETURN_STRING(WMI_BCN_FILTER_RX_CMDID);
37260         /* enable/disable filtering of probe requests in the firmware */
37261         WMI_RETURN_STRING(WMI_PRB_REQ_FILTER_RX_CMDID);
37262         /* transmit management frame by value. will be deprecated */
37263         WMI_RETURN_STRING(WMI_MGMT_TX_CMDID);
37264         /* set the probe response template. used in beacon offload mode
37265          * to setup the common probe response template with the FW to
37266          * be used by FW to generate probe responses */
37267         WMI_RETURN_STRING(WMI_PRB_TMPL_CMDID);
37268         /** set FILS Discovery frame template for FW to generate FD frames */
37269         WMI_RETURN_STRING(WMI_FD_TMPL_CMDID);
37270 
37271         /* commands to directly control ba negotiation directly from
37272          * host. only used in test mode */
37273 
37274         /* turn off FW Auto addba mode and let host control addba */
37275         WMI_RETURN_STRING(WMI_ADDBA_CLEAR_RESP_CMDID);
37276         /* send add ba request */
37277         WMI_RETURN_STRING(WMI_ADDBA_SEND_CMDID);
37278         WMI_RETURN_STRING(WMI_ADDBA_STATUS_CMDID);
37279         /* send del ba */
37280         WMI_RETURN_STRING(WMI_DELBA_SEND_CMDID);
37281         /* set add ba response will be used by FW to generate
37282          * addba response*/
37283         WMI_RETURN_STRING(WMI_ADDBA_SET_RESP_CMDID);
37284         /* send single VHT MPDU with AMSDU */
37285         WMI_RETURN_STRING(WMI_SEND_SINGLEAMSDU_CMDID);
37286 
37287         /* Station power save specific config */
37288         /* enable/disable station powersave */
37289         WMI_RETURN_STRING(WMI_STA_POWERSAVE_MODE_CMDID);
37290         /* set station power save specific parameter */
37291         WMI_RETURN_STRING(WMI_STA_POWERSAVE_PARAM_CMDID);
37292         /* set station mimo powersave mode */
37293         WMI_RETURN_STRING(WMI_STA_MIMO_PS_MODE_CMDID);
37294 
37295         /* DFS-specific commands */
37296         /* enable DFS (radar detection)*/
37297         WMI_RETURN_STRING(WMI_PDEV_DFS_ENABLE_CMDID);
37298         /* disable DFS (radar detection)*/
37299         WMI_RETURN_STRING(WMI_PDEV_DFS_DISABLE_CMDID);
37300         /* enable DFS phyerr/parse filter offload */
37301         WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_ENA_CMDID);
37302         /* enable DFS phyerr/parse filter offload */
37303         WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_DIS_CMDID);
37304 
37305         /* Roaming specific  commands */
37306         /* set roam scan mode */
37307         WMI_RETURN_STRING(WMI_ROAM_SCAN_MODE);
37308         /* set roam scan RSSI threshold below which roam
37309          * scan is enabled  */
37310         WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_THRESHOLD);
37311         /* set roam scan period for periodic roam scan mode  */
37312         WMI_RETURN_STRING(WMI_ROAM_SCAN_PERIOD);
37313         /* set roam scan trigger RSSI change threshold   */
37314         WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD);
37315         /* set roam AP profile   */
37316         WMI_RETURN_STRING(WMI_ROAM_AP_PROFILE);
37317         /* set channel list for roam scans */
37318         WMI_RETURN_STRING(WMI_ROAM_CHAN_LIST);
37319         /* offload scan specific commands */
37320         /* set offload scan AP profile   */
37321         WMI_RETURN_STRING(WMI_OFL_SCAN_ADD_AP_PROFILE);
37322         /* remove offload scan AP profile   */
37323         WMI_RETURN_STRING(WMI_OFL_SCAN_REMOVE_AP_PROFILE);
37324         /* set offload scan period   */
37325         WMI_RETURN_STRING(WMI_OFL_SCAN_PERIOD);
37326 
37327         /* P2P specific commands */
37328         /* set P2P device info. FW will used by FW to create P2P IE
37329          * to be carried in probe response generated during p2p listen
37330          * and for p2p discoverability  */
37331         WMI_RETURN_STRING(WMI_P2P_DEV_SET_DEVICE_INFO);
37332         /* enable/disable p2p discoverability on STA/AP VDEVs  */
37333         WMI_RETURN_STRING(WMI_P2P_DEV_SET_DISCOVERABILITY);
37334         /* set p2p ie to be carried in beacons generated by FW for GO */
37335         WMI_RETURN_STRING(WMI_P2P_GO_SET_BEACON_IE);
37336         /* set p2p ie to be carried in probe response frames generated
37337          * by FW for GO  */
37338         WMI_RETURN_STRING(WMI_P2P_GO_SET_PROBE_RESP_IE);
37339         /* set the vendor specific p2p ie data.
37340          * FW will use this to parse the P2P NoA
37341          * attribute in the beacons/probe responses received.
37342          */
37343         WMI_RETURN_STRING(WMI_P2P_SET_VENDOR_IE_DATA_CMDID);
37344         /* set the configure of p2p find offload */
37345         WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID);
37346         /* set the vendor specific p2p ie data for p2p find offload */
37347         WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_APPIE_CMDID);
37348         /* set the BSSID/device name pattern of p2p find offload */
37349         WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID);
37350         /* set OppPS related parameters **/
37351         WMI_RETURN_STRING(WMI_P2P_SET_OPPPS_PARAM_CMDID);
37352 
37353         /* AP power save specific config
37354          * set AP power save specific param */
37355         WMI_RETURN_STRING(WMI_AP_PS_PEER_PARAM_CMDID);
37356         /* set AP UAPSD coex specific param */
37357         WMI_RETURN_STRING(WMI_AP_PS_PEER_UAPSD_COEX_CMDID);
37358 
37359         /* Rate-control specific commands */
37360         WMI_RETURN_STRING(WMI_PEER_RATE_RETRY_SCHED_CMDID);
37361 
37362         /* WLAN Profiling commands. */
37363         WMI_RETURN_STRING(WMI_WLAN_PROFILE_TRIGGER_CMDID);
37364         WMI_RETURN_STRING(WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID);
37365         WMI_RETURN_STRING(WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID);
37366         WMI_RETURN_STRING(WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID);
37367         WMI_RETURN_STRING(WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID);
37368 
37369         /* Suspend resume command Ids */
37370         WMI_RETURN_STRING(WMI_PDEV_SUSPEND_CMDID);
37371         WMI_RETURN_STRING(WMI_PDEV_RESUME_CMDID);
37372 
37373         /* Beacon filter commands */
37374         /* add a beacon filter */
37375         WMI_RETURN_STRING(WMI_ADD_BCN_FILTER_CMDID);
37376         /* remove a  beacon filter */
37377         WMI_RETURN_STRING(WMI_RMV_BCN_FILTER_CMDID);
37378 
37379         /* WOW Specific WMI commands */
37380         /* add pattern for awake */
37381         WMI_RETURN_STRING(WMI_WOW_ADD_WAKE_PATTERN_CMDID);
37382         /* deleta a wake pattern */
37383         WMI_RETURN_STRING(WMI_WOW_DEL_WAKE_PATTERN_CMDID);
37384         /* enable/deisable wake event  */
37385         WMI_RETURN_STRING(WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID);
37386         /* enable WOW  */
37387         WMI_RETURN_STRING(WMI_WOW_ENABLE_CMDID);
37388         /* host woke up from sleep event to FW. Generated in response
37389          * to WOW Hardware event */
37390         WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID);
37391 
37392         /* RTT measurement related cmd */
37393         /* request to make an RTT measurement */
37394         WMI_RETURN_STRING(WMI_RTT_MEASREQ_CMDID);
37395         /* request to report a tsf measurement */
37396         WMI_RETURN_STRING(WMI_RTT_TSF_CMDID);
37397 
37398         /* spectral scan command */
37399         /* configure spectral scan */
37400         WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID);
37401         /* enable/disable spectral scan and trigger */
37402         WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID);
37403 
37404         /* F/W stats */
37405         /* one time request for stats */
37406         WMI_RETURN_STRING(WMI_REQUEST_STATS_CMDID);
37407         /* Push MCC Adaptive Scheduler Stats to Firmware */
37408         WMI_RETURN_STRING(WMI_MCC_SCHED_TRAFFIC_STATS_CMDID);
37409 
37410         /* ARP OFFLOAD REQUEST*/
37411         WMI_RETURN_STRING(WMI_SET_ARP_NS_OFFLOAD_CMDID);
37412 
37413         /* Proactive ARP Response Add Pattern Command*/
37414         WMI_RETURN_STRING(WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID);
37415 
37416         /* Proactive ARP Response Del Pattern Command*/
37417         WMI_RETURN_STRING(WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID);
37418 
37419         /* NS offload confid*/
37420         WMI_RETURN_STRING(WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID);
37421 
37422         /* GTK offload Specific WMI commands */
37423         WMI_RETURN_STRING(WMI_GTK_OFFLOAD_CMDID);
37424 
37425         /* CSA offload Specific WMI commands */
37426         /* csa offload enable */
37427         WMI_RETURN_STRING(WMI_CSA_OFFLOAD_ENABLE_CMDID);
37428         /* chan switch command */
37429         WMI_RETURN_STRING(WMI_CSA_OFFLOAD_CHANSWITCH_CMDID);
37430 
37431         /* Chatter commands */
37432         /* Change chatter mode of operation */
37433         WMI_RETURN_STRING(WMI_CHATTER_SET_MODE_CMDID);
37434         /* chatter add coalescing filter command */
37435         WMI_RETURN_STRING(WMI_CHATTER_ADD_COALESCING_FILTER_CMDID);
37436         /* chatter delete coalescing filter command */
37437         WMI_RETURN_STRING(WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID);
37438         /* chatter coalecing query command */
37439         WMI_RETURN_STRING(WMI_CHATTER_COALESCING_QUERY_CMDID);
37440 
37441         /* addba specific commands */
37442         /* start the aggregation on this TID */
37443         WMI_RETURN_STRING(WMI_PEER_TID_ADDBA_CMDID);
37444         /* stop the aggregation on this TID */
37445         WMI_RETURN_STRING(WMI_PEER_TID_DELBA_CMDID);
37446 
37447         /* set station mimo powersave method */
37448         WMI_RETURN_STRING(WMI_STA_DTIM_PS_METHOD_CMDID);
37449         /* Configure the Station UAPSD AC Auto Trigger Parameters */
37450         WMI_RETURN_STRING(WMI_STA_UAPSD_AUTO_TRIG_CMDID);
37451         /* Configure the Keep Alive Parameters */
37452         WMI_RETURN_STRING(WMI_STA_KEEPALIVE_CMDID);
37453 
37454         /* Request ssn from target for a sta/tid pair */
37455         WMI_RETURN_STRING(WMI_BA_REQ_SSN_CMDID);
37456         /* misc command group */
37457         /* echo command mainly used for testing */
37458         WMI_RETURN_STRING(WMI_ECHO_CMDID);
37459 
37460         /* !!IMPORTANT!!
37461          * If you need to add a new WMI command to the
37462          * WMI_RETURN_STRING(WMI_GRP_MISC) sub-group,
37463          * please make sure you add it BEHIND
37464          * WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
37465          * as we MUST have a fixed value here to maintain compatibility between
37466          * UTF and the ART2 driver
37467          */
37468         /* UTF WMI commands */
37469         WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
37470 
37471         /* set debug log config */
37472         WMI_RETURN_STRING(WMI_DBGLOG_CFG_CMDID);
37473         /* QVIT specific command id */
37474         WMI_RETURN_STRING(WMI_PDEV_QVIT_CMDID);
37475         /* Factory Testing Mode request command
37476          * used for integrated chipsets */
37477         WMI_RETURN_STRING(WMI_PDEV_FTM_INTG_CMDID);
37478         /* set and get keepalive parameters command */
37479         WMI_RETURN_STRING(WMI_VDEV_SET_KEEPALIVE_CMDID);
37480         WMI_RETURN_STRING(WMI_VDEV_GET_KEEPALIVE_CMDID);
37481         /* For fw recovery test command */
37482         WMI_RETURN_STRING(WMI_FORCE_FW_HANG_CMDID);
37483         /* Set Mcast/Bdcast filter */
37484         WMI_RETURN_STRING(WMI_SET_MCASTBCAST_FILTER_CMDID);
37485         /* set thermal management params */
37486         WMI_RETURN_STRING(WMI_THERMAL_MGMT_CMDID);
37487         WMI_RETURN_STRING(WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID);
37488         WMI_RETURN_STRING(WMI_LRO_CONFIG_CMDID);
37489         WMI_RETURN_STRING(WMI_TRANSFER_DATA_TO_FLASH_CMDID);
37490         WMI_RETURN_STRING(WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID);
37491         WMI_RETURN_STRING(WMI_VDEV_WISA_CMDID);
37492         WMI_RETURN_STRING(WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID);
37493         WMI_RETURN_STRING(WMI_WOW_SET_ACTION_WAKE_UP_CMDID);
37494         WMI_RETURN_STRING(WMI_MAWC_SENSOR_REPORT_IND_CMDID);
37495         WMI_RETURN_STRING(WMI_ROAM_CONFIGURE_MAWC_CMDID);
37496         WMI_RETURN_STRING(WMI_NLO_CONFIGURE_MAWC_CMDID);
37497         WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_MAWC_CMDID);
37498         /* GPIO Configuration */
37499         WMI_RETURN_STRING(WMI_GPIO_CONFIG_CMDID);
37500         WMI_RETURN_STRING(WMI_GPIO_OUTPUT_CMDID);
37501 
37502         /* Txbf configuration command */
37503         WMI_RETURN_STRING(WMI_TXBF_CMDID);
37504 
37505         /* FWTEST Commands */
37506         WMI_RETURN_STRING(WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID);
37507         /* set NoA descs */
37508         WMI_RETURN_STRING(WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID);
37509 
37510         /* TDLS Configuration */
37511         /* enable/disable TDLS */
37512         WMI_RETURN_STRING(WMI_TDLS_SET_STATE_CMDID);
37513         /* set tdls peer state */
37514         WMI_RETURN_STRING(WMI_TDLS_PEER_UPDATE_CMDID);
37515 
37516         /* Resmgr Configuration */
37517         /* Adaptive OCS is enabled by default in the FW.
37518          * This command is used to disable FW based adaptive OCS.
37519          */
37520         WMI_RETURN_STRING
37521             (WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID);
37522         /* set the requested channel time quota for the home channels */
37523         WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID);
37524         /* set the requested latency for the home channels */
37525         WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_LATENCY_CMDID);
37526 
37527         /* STA SMPS Configuration */
37528         /* force SMPS mode */
37529         WMI_RETURN_STRING(WMI_STA_SMPS_FORCE_MODE_CMDID);
37530         /* set SMPS parameters */
37531         WMI_RETURN_STRING(WMI_STA_SMPS_PARAM_CMDID);
37532 
37533         /* Wlan HB commands */
37534         /* enable/disable wlan HB */
37535         WMI_RETURN_STRING(WMI_HB_SET_ENABLE_CMDID);
37536         /* set tcp parameters for wlan HB */
37537         WMI_RETURN_STRING(WMI_HB_SET_TCP_PARAMS_CMDID);
37538         /* set tcp pkt filter for wlan HB */
37539         WMI_RETURN_STRING(WMI_HB_SET_TCP_PKT_FILTER_CMDID);
37540         /* set udp parameters for wlan HB */
37541         WMI_RETURN_STRING(WMI_HB_SET_UDP_PARAMS_CMDID);
37542         /* set udp pkt filter for wlan HB */
37543         WMI_RETURN_STRING(WMI_HB_SET_UDP_PKT_FILTER_CMDID);
37544 
37545         /* Wlan RMC commands*/
37546         /* enable/disable RMC */
37547         WMI_RETURN_STRING(WMI_RMC_SET_MODE_CMDID);
37548         /* configure action frame period */
37549         WMI_RETURN_STRING(WMI_RMC_SET_ACTION_PERIOD_CMDID);
37550         /* For debug/future enhancement purposes only,
37551          * configures/finetunes RMC algorithms */
37552         WMI_RETURN_STRING(WMI_RMC_CONFIG_CMDID);
37553 
37554         /* WLAN MHF offload commands */
37555         /* enable/disable MHF offload */
37556         WMI_RETURN_STRING(WMI_MHF_OFFLOAD_SET_MODE_CMDID);
37557         /* Plumb routing table for MHF offload */
37558         WMI_RETURN_STRING(WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID);
37559 
37560         /* location scan commands */
37561         /* start batch scan */
37562         WMI_RETURN_STRING(WMI_BATCH_SCAN_ENABLE_CMDID);
37563         /* stop batch scan */
37564         WMI_RETURN_STRING(WMI_BATCH_SCAN_DISABLE_CMDID);
37565         /* get batch scan result */
37566         WMI_RETURN_STRING(WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID);
37567         /* OEM related cmd */
37568         WMI_RETURN_STRING(WMI_OEM_REQ_CMDID);
37569         WMI_RETURN_STRING(WMI_OEM_REQUEST_CMDID);
37570         /* NAN request cmd */
37571         WMI_RETURN_STRING(WMI_NAN_CMDID);
37572         /* Modem power state cmd */
37573         WMI_RETURN_STRING(WMI_MODEM_POWER_STATE_CMDID);
37574         WMI_RETURN_STRING(WMI_REQUEST_STATS_EXT_CMDID);
37575         WMI_RETURN_STRING(WMI_OBSS_SCAN_ENABLE_CMDID);
37576         WMI_RETURN_STRING(WMI_OBSS_SCAN_DISABLE_CMDID);
37577         WMI_RETURN_STRING(WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID);
37578         WMI_RETURN_STRING(WMI_ROAM_SCAN_CMD);
37579         WMI_RETURN_STRING(WMI_PDEV_SET_LED_CONFIG_CMDID);
37580         WMI_RETURN_STRING(WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID);
37581         WMI_RETURN_STRING(WMI_CHAN_AVOID_UPDATE_CMDID);
37582         WMI_RETURN_STRING(WMI_COEX_CONFIG_CMDID);
37583         WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID);
37584         WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID);
37585         WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID);
37586         WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID);
37587         WMI_RETURN_STRING(WMI_REQUEST_LINK_STATS_CMDID);
37588         WMI_RETURN_STRING(WMI_START_LINK_STATS_CMDID);
37589         WMI_RETURN_STRING(WMI_CLEAR_LINK_STATS_CMDID);
37590         WMI_RETURN_STRING(WMI_GET_FW_MEM_DUMP_CMDID);
37591         WMI_RETURN_STRING(WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID);
37592         WMI_RETURN_STRING(WMI_LPI_START_SCAN_CMDID);
37593         WMI_RETURN_STRING(WMI_LPI_STOP_SCAN_CMDID);
37594         WMI_RETURN_STRING(WMI_EXTSCAN_START_CMDID);
37595         WMI_RETURN_STRING(WMI_EXTSCAN_STOP_CMDID);
37596         WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID);
37597         WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID);
37598         WMI_RETURN_STRING(WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID);
37599         WMI_RETURN_STRING(WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID);
37600         WMI_RETURN_STRING(WMI_EXTSCAN_SET_CAPABILITIES_CMDID);
37601         WMI_RETURN_STRING(WMI_EXTSCAN_GET_CAPABILITIES_CMDID);
37602         WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID);
37603         WMI_RETURN_STRING(WMI_ROAM_SYNCH_COMPLETE);
37604         WMI_RETURN_STRING(WMI_D0_WOW_ENABLE_DISABLE_CMDID);
37605         WMI_RETURN_STRING(WMI_EXTWOW_ENABLE_CMDID);
37606         WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID);
37607         WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID);
37608         WMI_RETURN_STRING(WMI_UNIT_TEST_CMDID);
37609         WMI_RETURN_STRING(WMI_ROAM_SET_RIC_REQUEST_CMDID);
37610         WMI_RETURN_STRING(WMI_PDEV_GET_TEMPERATURE_CMDID);
37611         WMI_RETURN_STRING(WMI_SET_DHCP_SERVER_OFFLOAD_CMDID);
37612         WMI_RETURN_STRING(WMI_TPC_CHAINMASK_CONFIG_CMDID);
37613         WMI_RETURN_STRING(WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID);
37614         WMI_RETURN_STRING(WMI_SCAN_PROB_REQ_OUI_CMDID);
37615         WMI_RETURN_STRING(WMI_TDLS_SET_OFFCHAN_MODE_CMDID);
37616         WMI_RETURN_STRING(WMI_PDEV_SET_LED_FLASHING_CMDID);
37617         WMI_RETURN_STRING(WMI_MDNS_OFFLOAD_ENABLE_CMDID);
37618         WMI_RETURN_STRING(WMI_MDNS_SET_FQDN_CMDID);
37619         WMI_RETURN_STRING(WMI_MDNS_SET_RESPONSE_CMDID);
37620         WMI_RETURN_STRING(WMI_MDNS_GET_STATS_CMDID);
37621         WMI_RETURN_STRING(WMI_MDNS_SET_STAIP_CMDID);
37622         WMI_RETURN_STRING(WMI_ROAM_INVOKE_CMDID);
37623         WMI_RETURN_STRING(WMI_SET_ANTENNA_DIVERSITY_CMDID);
37624         WMI_RETURN_STRING(WMI_SAP_OFL_ENABLE_CMDID);
37625         WMI_RETURN_STRING(WMI_APFIND_CMDID);
37626         WMI_RETURN_STRING(WMI_PASSPOINT_LIST_CONFIG_CMDID);
37627         WMI_RETURN_STRING(WMI_OCB_SET_SCHED_CMDID);
37628         WMI_RETURN_STRING(WMI_OCB_SET_CONFIG_CMDID);
37629         WMI_RETURN_STRING(WMI_OCB_SET_UTC_TIME_CMDID);
37630         WMI_RETURN_STRING(WMI_OCB_START_TIMING_ADVERT_CMDID);
37631         WMI_RETURN_STRING(WMI_OCB_STOP_TIMING_ADVERT_CMDID);
37632         WMI_RETURN_STRING(WMI_OCB_GET_TSF_TIMER_CMDID);
37633         WMI_RETURN_STRING(WMI_DCC_GET_STATS_CMDID);
37634         WMI_RETURN_STRING(WMI_DCC_CLEAR_STATS_CMDID);
37635         WMI_RETURN_STRING(WMI_DCC_UPDATE_NDL_CMDID);
37636         WMI_RETURN_STRING(WMI_ROAM_FILTER_CMDID);
37637         WMI_RETURN_STRING(WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID);
37638         WMI_RETURN_STRING(WMI_DEBUG_MESG_FLUSH_CMDID);
37639         WMI_RETURN_STRING(WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID);
37640         WMI_RETURN_STRING(WMI_SOC_SET_PCL_CMDID);
37641         WMI_RETURN_STRING(WMI_SOC_SET_HW_MODE_CMDID);
37642         WMI_RETURN_STRING(WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID);
37643         WMI_RETURN_STRING(WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID);
37644         WMI_RETURN_STRING(WMI_DIAG_EVENT_LOG_CONFIG_CMDID);
37645         WMI_RETURN_STRING(WMI_PACKET_FILTER_CONFIG_CMDID);
37646         WMI_RETURN_STRING(WMI_PACKET_FILTER_ENABLE_CMDID);
37647         WMI_RETURN_STRING(WMI_SAP_SET_BLACKLIST_PARAM_CMDID);
37648         WMI_RETURN_STRING(WMI_WOW_UDP_SVC_OFLD_CMDID);
37649         WMI_RETURN_STRING(WMI_MGMT_TX_SEND_CMDID);
37650         WMI_RETURN_STRING(WMI_SOC_SET_ANTENNA_MODE_CMDID);
37651         WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID);
37652         WMI_RETURN_STRING(WMI_AP_PS_EGAP_PARAM_CMDID);
37653         WMI_RETURN_STRING(WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID);
37654         WMI_RETURN_STRING(WMI_BPF_GET_CAPABILITY_CMDID);
37655         WMI_RETURN_STRING(WMI_BPF_GET_VDEV_STATS_CMDID);
37656         WMI_RETURN_STRING(WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID);
37657         WMI_RETURN_STRING(WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID);
37658         WMI_RETURN_STRING(WMI_NDI_GET_CAP_REQ_CMDID);
37659         WMI_RETURN_STRING(WMI_NDP_INITIATOR_REQ_CMDID);
37660         WMI_RETURN_STRING(WMI_NDP_RESPONDER_REQ_CMDID);
37661         WMI_RETURN_STRING(WMI_NDP_END_REQ_CMDID);
37662         WMI_RETURN_STRING(WMI_PEER_UPDATE_WDS_ENTRY_CMDID);
37663         WMI_RETURN_STRING(WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID);
37664         WMI_RETURN_STRING(WMI_PDEV_FIPS_CMDID);
37665         WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_ENABLE_CMDID);
37666         WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID);
37667         WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID);
37668         WMI_RETURN_STRING(WMI_PDEV_SET_CTL_TABLE_CMDID);
37669         WMI_RETURN_STRING(WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID);
37670         WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CMDID);
37671         WMI_RETURN_STRING(WMI_MIB_STATS_ENABLE_CMDID);
37672         WMI_RETURN_STRING(WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID);
37673         WMI_RETURN_STRING(WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID);
37674         WMI_RETURN_STRING(WMI_VDEV_RATEMASK_CMDID);
37675         WMI_RETURN_STRING(WMI_VDEV_ATF_REQUEST_CMDID);
37676         WMI_RETURN_STRING(WMI_VDEV_SET_DSCP_TID_MAP_CMDID);
37677         WMI_RETURN_STRING(WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID);
37678         WMI_RETURN_STRING(WMI_VDEV_SET_QUIET_MODE_CMDID);
37679         WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID);
37680         WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID);
37681         WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID);
37682         WMI_RETURN_STRING(WMI_PEER_ATF_REQUEST_CMDID);
37683         WMI_RETURN_STRING(WMI_FWTEST_CMDID);
37684         WMI_RETURN_STRING(WMI_QBOOST_CFG_CMDID);
37685         WMI_RETURN_STRING(WMI_PDEV_GET_NFCAL_POWER_CMDID);
37686         WMI_RETURN_STRING(WMI_PDEV_SET_PCL_CMDID);
37687         WMI_RETURN_STRING(WMI_PDEV_SET_HW_MODE_CMDID);
37688         WMI_RETURN_STRING(WMI_PDEV_SET_MAC_CONFIG_CMDID);
37689         WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_MODE_CMDID);
37690         WMI_RETURN_STRING(WMI_ROAM_SET_MBO_PARAM_CMDID);
37691         WMI_RETURN_STRING(WMI_CHAN_AVOID_RPT_ALLOW_CMDID);
37692         WMI_RETURN_STRING(WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID);
37693         WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID);
37694         WMI_RETURN_STRING(WMI_PDEV_WAL_POWER_DEBUG_CMDID);
37695         WMI_RETURN_STRING(WMI_PEER_BWF_REQUEST_CMDID);
37696         WMI_RETURN_STRING(WMI_DBGLOG_TIME_STAMP_SYNC_CMDID);
37697         WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_START_CMDID);
37698         WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID);
37699         WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_SETUP_CMDID);
37700         WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_REMOVE_CMDID);
37701         WMI_RETURN_STRING(WMI_SET_MULTIPLE_MCAST_FILTER_CMDID);
37702         WMI_RETURN_STRING(WMI_READ_DATA_FROM_FLASH_CMDID);
37703         WMI_RETURN_STRING(WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID);
37704         WMI_RETURN_STRING(WMI_PEER_SET_RX_BLOCKSIZE_CMDID);
37705         WMI_RETURN_STRING(WMI_PDEV_SET_WAKEUP_CONFIG_CMDID);
37706         WMI_RETURN_STRING(WMI_PDEV_GET_ANTDIV_STATUS_CMDID);
37707         WMI_RETURN_STRING(WMI_PEER_ANTDIV_INFO_REQ_CMDID);
37708         WMI_RETURN_STRING(WMI_MNT_FILTER_CMDID);
37709         WMI_RETURN_STRING(WMI_PDEV_GET_CHIP_POWER_STATS_CMDID);
37710         WMI_RETURN_STRING(WMI_COEX_GET_ANTENNA_ISOLATION_CMDID);
37711         WMI_RETURN_STRING(WMI_PDEV_SET_STATS_THRESHOLD_CMDID);
37712         WMI_RETURN_STRING(WMI_REQUEST_WLAN_STATS_CMDID);
37713         WMI_RETURN_STRING(WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID);
37714         WMI_RETURN_STRING(WMI_REQUEST_PEER_STATS_INFO_CMDID);
37715         WMI_RETURN_STRING(WMI_REQUEST_RADIO_CHAN_STATS_CMDID);
37716         WMI_RETURN_STRING(WMI_ROAM_PER_CONFIG_CMDID);
37717         WMI_RETURN_STRING(WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID);
37718         WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID);
37719         WMI_RETURN_STRING(WMI_HW_DATA_FILTER_CMDID);
37720         WMI_RETURN_STRING(WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID);
37721         WMI_RETURN_STRING(WMI_LPI_OEM_REQ_CMDID);
37722         WMI_RETURN_STRING(WMI_PDEV_UPDATE_PKT_ROUTING_CMDID);
37723         WMI_RETURN_STRING(WMI_PDEV_CHECK_CAL_VERSION_CMDID);
37724         WMI_RETURN_STRING(WMI_PDEV_SET_DIVERSITY_GAIN_CMDID);
37725         WMI_RETURN_STRING(WMI_VDEV_SET_ARP_STAT_CMDID);
37726         WMI_RETURN_STRING(WMI_VDEV_GET_ARP_STAT_CMDID);
37727         WMI_RETURN_STRING(WMI_VDEV_GET_TX_POWER_CMDID);
37728         WMI_RETURN_STRING(WMI_OFFCHAN_DATA_TX_SEND_CMDID);
37729         WMI_RETURN_STRING(WMI_SET_INIT_COUNTRY_CMDID);
37730         WMI_RETURN_STRING(WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID);
37731         WMI_RETURN_STRING(WMI_THERM_THROT_SET_CONF_CMDID);
37732         WMI_RETURN_STRING(WMI_OEM_DMA_RING_CFG_REQ_CMDID);
37733         WMI_RETURN_STRING(WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID);
37734         WMI_RETURN_STRING(WMI_VDEV_LIMIT_OFFCHAN_CMDID);
37735         WMI_RETURN_STRING(WMI_ROAM_BTM_CONFIG_CMDID);
37736         WMI_RETURN_STRING(WMI_WLM_CONFIG_CMDID);
37737         WMI_RETURN_STRING(WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID);
37738         WMI_RETURN_STRING(WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID);
37739         WMI_RETURN_STRING(WMI_PDEV_SEND_FD_CMDID);
37740         WMI_RETURN_STRING(WMI_ENABLE_FILS_CMDID);
37741         WMI_RETURN_STRING(WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID);
37742         WMI_RETURN_STRING(WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID);
37743         WMI_RETURN_STRING(WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID);
37744         WMI_RETURN_STRING(WMI_SAP_OBSS_DETECTION_CFG_CMDID);
37745         WMI_RETURN_STRING(WMI_PDEV_DMA_RING_CFG_REQ_CMDID);
37746         WMI_RETURN_STRING(WMI_11K_OFFLOAD_REPORT_CMDID);
37747         WMI_RETURN_STRING(WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID);
37748         WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ENABLE_CMDID);
37749         WMI_RETURN_STRING(WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID);
37750         WMI_RETURN_STRING(WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID);
37751         WMI_RETURN_STRING(WMI_BSS_COLOR_CHANGE_ENABLE_CMDID);
37752         WMI_RETURN_STRING(WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID);
37753         WMI_RETURN_STRING(WMI_RUNTIME_DPD_RECAL_CMDID);
37754         WMI_RETURN_STRING(WMI_TWT_ENABLE_CMDID);
37755         WMI_RETURN_STRING(WMI_TWT_DISABLE_CMDID);
37756         WMI_RETURN_STRING(WMI_TWT_ADD_DIALOG_CMDID);
37757         WMI_RETURN_STRING(WMI_TWT_DEL_DIALOG_CMDID);
37758         WMI_RETURN_STRING(WMI_TWT_PAUSE_DIALOG_CMDID);
37759         WMI_RETURN_STRING(WMI_TWT_RESUME_DIALOG_CMDID);
37760         WMI_RETURN_STRING(WMI_TWT_VDEV_CONFIG_CMDID);
37761         WMI_RETURN_STRING(WMI_REQUEST_ROAM_SCAN_STATS_CMDID);
37762         WMI_RETURN_STRING(WMI_PEER_TID_CONFIGURATIONS_CMDID);
37763         WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID);
37764         WMI_RETURN_STRING(WMI_GET_TPC_POWER_CMDID);
37765         WMI_RETURN_STRING(WMI_MOTION_DET_CONFIG_PARAM_CMDID);
37766         WMI_RETURN_STRING(WMI_MOTION_DET_BASE_LINE_CONFIG_PARAM_CMDID);
37767         WMI_RETURN_STRING(WMI_MOTION_DET_START_STOP_CMDID);
37768         WMI_RETURN_STRING(WMI_MOTION_DET_BASE_LINE_START_STOP_CMDID);
37769         WMI_RETURN_STRING(WMI_SAR_LIMITS_CMDID);
37770         WMI_RETURN_STRING(WMI_SAR_GET_LIMITS_CMDID);
37771         WMI_RETURN_STRING(WMI_PEER_CHAN_WIDTH_SWITCH_CMDID);
37772         WMI_RETURN_STRING(WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID);
37773         WMI_RETURN_STRING(WMI_PDEV_HE_TB_ACTION_FRM_CMDID);
37774         WMI_RETURN_STRING(WMI_HPCS_PULSE_START_CMDID);
37775         WMI_RETURN_STRING(WMI_VDEV_CHAINMASK_CONFIG_CMDID);
37776         WMI_RETURN_STRING(WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID);
37777         WMI_RETURN_STRING(WMI_NDP_CMDID);
37778         WMI_RETURN_STRING(WMI_PDEV_PKTLOG_FILTER_CMDID);
37779         WMI_RETURN_STRING(WMI_SET_CURRENT_COUNTRY_CMDID);
37780         WMI_RETURN_STRING(WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID);
37781         WMI_RETURN_STRING(WMI_PEER_TX_PN_REQUEST_CMDID);
37782         WMI_RETURN_STRING(WMI_ROAM_BSS_LOAD_CONFIG_CMDID);
37783         WMI_RETURN_STRING(WMI_VDEV_GET_MWS_COEX_INFO_CMDID);
37784         WMI_RETURN_STRING(WMI_REQUEST_WLM_STATS_CMDID);
37785         WMI_RETURN_STRING(WMI_PDEV_SET_RAP_CONFIG_CMDID);
37786         WMI_RETURN_STRING(WMI_STA_TDCC_CONFIG_CMDID);
37787         WMI_RETURN_STRING(WMI_ROAM_DEAUTH_CONFIG_CMDID);
37788         WMI_RETURN_STRING(WMI_ROAM_IDLE_CONFIG_CMDID);
37789         WMI_RETURN_STRING(WMI_IDLE_TRIGGER_MONITOR_CMDID);
37790         WMI_RETURN_STRING(WMI_PDEV_DSM_FILTER_CMDID);
37791         WMI_RETURN_STRING(WMI_TWT_BTWT_INVITE_STA_CMDID);
37792         WMI_RETURN_STRING(WMI_TWT_BTWT_REMOVE_STA_CMDID);
37793         WMI_RETURN_STRING(WMI_OEM_DATA_CMDID);
37794         WMI_RETURN_STRING(WMI_ROAM_PREAUTH_STATUS_CMDID);
37795         WMI_RETURN_STRING(WMI_SET_ELNA_BYPASS_CMDID);
37796         WMI_RETURN_STRING(WMI_GET_ELNA_BYPASS_CMDID);
37797         WMI_RETURN_STRING(WMI_AUDIO_AGGR_ENABLE_CMDID);
37798         WMI_RETURN_STRING(WMI_AUDIO_AGGR_ADD_GROUP_CMDID);
37799         WMI_RETURN_STRING(WMI_AUDIO_AGGR_DEL_GROUP_CMDID);
37800         WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID);
37801         WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID);
37802         WMI_RETURN_STRING(WMI_AUDIO_AGGR_UPDATE_STA_GROUP_INFO_CMDID);
37803         WMI_RETURN_STRING(WMI_CFR_CAPTURE_FILTER_CMDID);
37804         WMI_RETURN_STRING(WMI_ATF_SSID_GROUPING_REQUEST_CMDID);
37805         WMI_RETURN_STRING(WMI_ATF_GROUP_WMM_AC_CONFIG_REQUEST_CMDID);
37806         WMI_RETURN_STRING(WMI_PEER_ATF_EXT_REQUEST_CMDID);
37807         WMI_RETURN_STRING(WMI_GET_CHANNEL_ANI_CMDID);
37808         WMI_RETURN_STRING(WMI_SET_OCL_CMDID);
37809         WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_AUTO_RATE_CMDID);
37810         WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_PROBE_CMDID);
37811         WMI_RETURN_STRING(WMI_VDEV_AUDIO_SYNC_TRIGGER_CMDID);
37812         WMI_RETURN_STRING(WMI_VDEV_AUDIO_SYNC_QTIMER_CMDID);
37813         WMI_RETURN_STRING(WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID);
37814         WMI_RETURN_STRING(WMI_VDEV_GET_BIG_DATA_CMDID);
37815         WMI_RETURN_STRING(WMI_PDEV_FRAME_INJECT_CMDID);
37816         WMI_RETURN_STRING(WMI_PDEV_TBTT_OFFSET_SYNC_CMDID);
37817         WMI_RETURN_STRING(WMI_VDEV_GET_BIG_DATA_P2_CMDID);
37818         WMI_RETURN_STRING(WMI_AUDIO_AGGR_GET_STATISTICS_CMDID);
37819         WMI_RETURN_STRING(WMI_AUDIO_AGGR_RESET_STATISTICS_CMDID);
37820         WMI_RETURN_STRING(WMI_ANT_CONTROLLER_CMDID);
37821         WMI_RETURN_STRING(WMI_SIMULATION_TEST_CMDID);
37822         WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_RTSCTS_CONFIG_CMDID);
37823         WMI_RETURN_STRING(WMI_REQUEST_CTRL_PATH_STATS_CMDID);
37824         WMI_RETURN_STRING(WMI_PDEV_GET_TPC_STATS_CMDID);
37825         WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_SCHED_METHOD_CMDID);
37826         WMI_RETURN_STRING(WMI_AUDIO_AGGR_GET_SCHED_METHOD_CMDID);
37827         WMI_RETURN_STRING(WMI_REQUEST_UNIFIED_LL_GET_STA_CMDID);
37828         WMI_RETURN_STRING(WMI_QOS_NULL_FRAME_TX_SEND_CMDID);
37829         WMI_RETURN_STRING(WMI_PDEV_ENABLE_DURATION_BASED_TX_MODE_SELECTION_CMDID);
37830         WMI_RETURN_STRING(WMI_TWT_NUDGE_DIALOG_CMDID);
37831         WMI_RETURN_STRING(WMI_VDEV_SET_TPC_POWER_CMDID);
37832         WMI_RETURN_STRING(WMI_VDEV_TID_LATENCY_CONFIG_CMDID);
37833         WMI_RETURN_STRING(WMI_PEER_TID_LATENCY_CONFIG_CMDID);
37834         WMI_RETURN_STRING(WMI_MLO_LINK_SET_ACTIVE_CMDID);
37835         WMI_RETURN_STRING(WMI_PDEV_GET_DPD_STATUS_CMDID);
37836         WMI_RETURN_STRING(WMI_MLO_SETUP_CMDID);
37837         WMI_RETURN_STRING(WMI_MLO_READY_CMDID);
37838         WMI_RETURN_STRING(WMI_MLO_TEARDOWN_CMDID);
37839         WMI_RETURN_STRING(WMI_VDEV_IGMP_OFFLOAD_CMDID);
37840         WMI_RETURN_STRING(WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMDID);
37841         WMI_RETURN_STRING(WMI_PDEV_SET_BIOS_SAR_TABLE_CMDID);
37842         WMI_RETURN_STRING(WMI_PDEV_SET_BIOS_GEO_TABLE_CMDID);
37843         WMI_RETURN_STRING(WMI_PDEV_GET_HALPHY_CAL_STATUS_CMDID);
37844         WMI_RETURN_STRING(WMI_PDEV_SET_HALPHY_CAL_BMAP_CMDID);
37845         WMI_RETURN_STRING(WMI_AFC_CMDID);
37846         WMI_RETURN_STRING(WMI_PDEV_MULTIPLE_VDEV_SET_PARAM_CMDID);
37847         WMI_RETURN_STRING(WMI_PDEV_MEC_AGING_TIMER_CONFIG_CMDID);
37848         WMI_RETURN_STRING(WMI_PEER_CONFIG_PPE_DS_CMDID);
37849         WMI_RETURN_STRING(WMI_VDEV_ENABLE_DISABLE_INTRA_BSS_CMDID);
37850         WMI_RETURN_STRING(WMI_PEER_ENABLE_DISABLE_INTRA_BSS_CMDID);
37851         WMI_RETURN_STRING(WMI_ROAM_MLO_CONFIG_CMDID);
37852         WMI_RETURN_STRING(WMI_REQUEST_THERMAL_STATS_CMDID);
37853         WMI_RETURN_STRING(WMI_PDEV_SET_BIOS_INTERFACE_CMDID);
37854         WMI_RETURN_STRING(WMI_VDEV_SET_MU_SNIF_CMDID);
37855         WMI_RETURN_STRING(WMI_VDEV_ICMP_OFFLOAD_CMDID);
37856         WMI_RETURN_STRING(WMI_ROAM_SET_PARAM_CMDID);
37857         WMI_RETURN_STRING(WMI_PDEV_FIPS_EXTEND_CMDID);
37858         WMI_RETURN_STRING(WMI_PDEV_FIPS_MODE_SET_CMDID);
37859         WMI_RETURN_STRING(WMI_SAWF_SVC_CLASS_CFG_CMDID);
37860         WMI_RETURN_STRING(WMI_SAWF_SVC_CLASS_DISABLE_CMDID);
37861         WMI_RETURN_STRING(WMI_VDEV_UPDATE_MAC_ADDR_CMDID);
37862         WMI_RETURN_STRING(WMI_SOC_TQM_RESET_ENABLE_DISABLE_CMDID);
37863         WMI_RETURN_STRING(WMI_VDEV_MULTIPLE_PEER_GROUP_CMDID);
37864         WMI_RETURN_STRING(WMI_VDEV_SET_LTF_KEY_SEED_CMDID);
37865         WMI_RETURN_STRING(WMI_RTT_PASN_AUTH_STATUS_CMD);
37866         WMI_RETURN_STRING(WMI_RTT_PASN_DEAUTH_CMD);
37867         WMI_RETURN_STRING(WMI_VDEV_PN_MGMT_RX_FILTER_CMDID);
37868         WMI_RETURN_STRING(WMI_PEER_RX_PN_REQUEST_CMDID);
37869         WMI_RETURN_STRING(WMI_SET_MULTIPLE_PDEV_VDEV_PARAM_CMDID);
37870         WMI_RETURN_STRING(WMI_PMM_SCRATCH_REG_ALLOCATION_CMDID);
37871         WMI_RETURN_STRING(WMI_MLO_PEER_TID_TO_LINK_MAP_CMDID);
37872         WMI_RETURN_STRING(WMI_ROAM_ENABLE_VENDOR_CONTROL_CMDID);
37873         WMI_RETURN_STRING(WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID);
37874         WMI_RETURN_STRING(WMI_REQUEST_HALPHY_CTRL_PATH_STATS_CMDID);
37875         WMI_RETURN_STRING(WMI_PEER_FLUSH_POLICY_CMDID);
37876         WMI_RETURN_STRING(WMI_WOW_COAP_ADD_PATTERN_CMDID);
37877         WMI_RETURN_STRING(WMI_WOW_COAP_DEL_PATTERN_CMDID);
37878         WMI_RETURN_STRING(WMI_WOW_COAP_ADD_KEEPALIVE_PATTERN_CMDID);
37879         WMI_RETURN_STRING(WMI_WOW_COAP_DEL_KEEPALIVE_PATTERN_CMDID);
37880         WMI_RETURN_STRING(WMI_WOW_COAP_GET_BUF_INFO_CMDID);
37881         WMI_RETURN_STRING(WMI_COEX_DBAM_CMDID);
37882         WMI_RETURN_STRING(WMI_PDEV_FEATURESET_CMDID);
37883         WMI_RETURN_STRING(WMI_VDEV_PARAM_ENABLE_SR_PROHIBIT_CMDID);
37884         WMI_RETURN_STRING(WMI_XGAP_ENABLE_CMDID);
37885         WMI_RETURN_STRING(WMI_PDEV_MESH_RX_FILTER_ENABLE_CMDID);
37886         WMI_RETURN_STRING(WMI_MLO_LINK_REMOVAL_CMDID);
37887         WMI_RETURN_STRING(WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_CMDID);
37888         WMI_RETURN_STRING(WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID);
37889         WMI_RETURN_STRING(WMI_PDEV_UPDATE_PMK_CACHE_CMDID);
37890         WMI_RETURN_STRING(WMI_PDEV_UPDATE_FILS_HLP_PKT_CMDID);
37891         WMI_RETURN_STRING(WMI_PDEV_SET_SRG_BSS_COLOR_BITMAP_CMDID);
37892         WMI_RETURN_STRING(WMI_PDEV_SET_SRG_PARTIAL_BSSID_BITMAP_CMDID);
37893         WMI_RETURN_STRING(WMI_PDEV_SET_SRG_OBSS_COLOR_ENABLE_BITMAP_CMDID);
37894         WMI_RETURN_STRING(WMI_PDEV_SET_SRG_OBSS_BSSID_ENABLE_BITMAP_CMDID);
37895         WMI_RETURN_STRING(WMI_PDEV_SET_NON_SRG_OBSS_COLOR_ENABLE_BITMAP_CMDID);
37896         WMI_RETURN_STRING(WMI_PDEV_SET_NON_SRG_OBSS_BSSID_ENABLE_BITMAP_CMDID);
37897         WMI_RETURN_STRING(WMI_VDEV_SET_PCL_CMDID);
37898         WMI_RETURN_STRING(WMI_PEER_RESERVED0_CMDID);
37899         WMI_RETURN_STRING(WMI_PEER_CFR_CAPTURE_CMDID);
37900         WMI_RETURN_STRING(WMI_PEER_CONFIG_VLAN_CMDID);
37901         WMI_RETURN_STRING(WMI_PEER_TX_FILTER_CMDID);
37902         WMI_RETURN_STRING(WMI_BCN_OFFLOAD_CTRL_CMDID);
37903         WMI_RETURN_STRING(WMI_PDEV_DFS_PHYERR_OFFLOAD_ENABLE_CMDID);
37904         WMI_RETURN_STRING(WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID);
37905         WMI_RETURN_STRING(WMI_VDEV_ADFS_CH_CFG_CMDID);
37906         WMI_RETURN_STRING(WMI_VDEV_ADFS_OCAC_ABORT_CMDID);
37907         WMI_RETURN_STRING(WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID);
37908         WMI_RETURN_STRING(WMI_REQUEST_RCPI_CMDID);
37909         WMI_RETURN_STRING(WMI_WFA_CONFIG_CMDID);
37910         WMI_RETURN_STRING(WMI_HB_OIC_PING_OFFLOAD_PARAM_CMDID);
37911         WMI_RETURN_STRING(WMI_HB_OIC_PING_OFFLOAD_SET_ENABLE_CMDID);
37912         WMI_RETURN_STRING(WMI_HB_DHCP_LEASE_RENEW_OFFLOAD_CMDID);
37913         WMI_RETURN_STRING(WMI_RMC_SET_MANUAL_LEADER_CMDID);
37914         WMI_RETURN_STRING(WMI_11D_SCAN_START_CMDID);
37915         WMI_RETURN_STRING(WMI_11D_SCAN_STOP_CMDID);
37916         WMI_RETURN_STRING(WMI_VENDOR_PDEV_CMDID);
37917         WMI_RETURN_STRING(WMI_VENDOR_VDEV_CMDID);
37918         WMI_RETURN_STRING(WMI_VENDOR_PEER_CMDID);
37919         WMI_RETURN_STRING(WMI_VDEV_SET_TWT_EDCA_PARAMS_CMDID); /* XPAN TWT */
37920         WMI_RETURN_STRING(WMI_ESL_EGID_CMDID);
37921         WMI_RETURN_STRING(WMI_TDMA_SCHEDULE_REQUEST_CMDID);
37922         WMI_RETURN_STRING(WMI_HPA_CMDID);
37923         WMI_RETURN_STRING(WMI_PDEV_SET_TGTR2P_TABLE_CMDID); /* To set target rate to power table */
37924         WMI_RETURN_STRING(WMI_MLO_VDEV_GET_LINK_INFO_CMDID);
37925         WMI_RETURN_STRING(WMI_VDEV_SET_ULOFDMA_MANUAL_SU_TRIG_CMDID);
37926         WMI_RETURN_STRING(WMI_VDEV_SET_ULOFDMA_MANUAL_MU_TRIG_CMDID);
37927         WMI_RETURN_STRING(WMI_VDEV_STANDALONE_SOUND_CMDID);
37928         WMI_RETURN_STRING(WMI_PDEV_SET_RF_PATH_CMDID); /* set RF path of PHY */
37929         WMI_RETURN_STRING(WMI_VDEV_PAUSE_CMDID);
37930         WMI_RETURN_STRING(WMI_GPIO_STATE_REQ_CMDID);
37931         WMI_RETURN_STRING(WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID);
37932         WMI_RETURN_STRING(WMI_MLO_LINK_RECOMMENDATION_CMDID);
37933         WMI_RETURN_STRING(WMI_NAN_OEM_DATA_CMDID);
37934         WMI_RETURN_STRING(WMI_PDEV_WSI_STATS_INFO_CMDID);
37935         WMI_RETURN_STRING(WMI_CSA_EVENT_STATUS_INDICATION_CMDID);
37936         WMI_RETURN_STRING(WMI_VDEV_SCHED_MODE_PROBE_REQ_CMDID);
37937         WMI_RETURN_STRING(WMI_VDEV_OOB_CONNECTION_REQ_CMDID);
37938         WMI_RETURN_STRING(WMI_AUDIO_TRANSPORT_SWITCH_RESP_STATUS_CMDID);
37939         WMI_RETURN_STRING(WMI_PEER_MULTIPLE_REORDER_QUEUE_SETUP_CMDID);
37940         WMI_RETURN_STRING(WMI_COEX_MULTIPLE_CONFIG_CMDID);
37941         WMI_RETURN_STRING(WMI_PDEV_ENABLE_LED_BLINK_DOWNLOAD_TABLE_CMDID);
37942         WMI_RETURN_STRING(WMI_PDEV_ENABLE_WIFI_RADAR_CMDID);
37943         WMI_RETURN_STRING(WMI_VDEV_GET_TWT_SESSION_STATS_INFO_CMDID);
37944         WMI_RETURN_STRING(WMI_PDEV_ENABLE_XLNA_CMDID);
37945         WMI_RETURN_STRING(WMI_PDEV_SET_CUSTOM_TX_POWER_PER_MCS_CMDID);
37946         WMI_RETURN_STRING(WMI_PEER_ACTIVE_TRAFFIC_MAP_CMDID);
37947         WMI_RETURN_STRING(WMI_REQUEST_OPM_STATS_CMDID);
37948         WMI_RETURN_STRING(WMI_SOC_TX_PACKET_CUSTOM_CLASSIFY_CMDID);
37949         WMI_RETURN_STRING(WMI_SET_AP_SUSPEND_RESUME_CMDID);
37950         WMI_RETURN_STRING(WMI_P2P_GO_DFS_AP_CONFIG_CMDID);
37951     }
37952 
37953     return (A_UINT8 *) "Invalid WMI cmd";
37954 }
37955 #endif /* WMI_CMD_STRINGS */
37956 
37957 /**  WMI commands/events for the regulatory offload  */
37958 
37959 /** Host indicating current country code to FW */
37960 typedef struct {
37961     A_UINT32  tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_current_country_cmd_fixed_param */
37962     A_UINT32  pdev_id;
37963     A_UINT32  new_alpha2; /** alpha2 characters representing the country code */
37964 } wmi_set_current_country_cmd_fixed_param;
37965 
37966 typedef enum {
37967     WMI_COUNTRYCODE_ALPHA2,
37968     WMI_COUNTRYCODE_COUNTRY_ID,
37969     WMI_COUNTRYCODE_DOMAIN_CODE,
37970 } WMI_COUNTRYCODE_TYPE;
37971 
37972 typedef struct {
37973     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_init_country_cmd_fixed_param */
37974     A_UINT32 pdev_id;
37975     A_UINT32 countrycode_type; /* WMI_COUNTRYCODE_TYPE */
37976     union {
37977         struct {
37978             /* Three character for alpha2. The first two is ISO name for country the last one
37979             present if it is indoor and out door.  First char in bits 7:0 and second char in bits 15:8 ... */
37980             A_UINT32  alpha2:24,
37981                       unused:8;
37982         };
37983         A_UINT32 country_id;   /* Country ID */
37984         A_UINT32 domain_code;  /* Domain code */
37985     } country_code;
37986 } wmi_set_init_country_cmd_fixed_param;
37987 
37988 typedef enum {
37989     /**
37990      * serv_resp_format_type will indicate the format in which afc_serv data
37991      * is written into host/target shared memory
37992      * This type can be expanded in future as per requirements.
37993      */
37994     AFC_SERV_RESP_FORMAT_JSON = 0,
37995     AFC_SERV_RESP_FORMAT_BINARY = 1,
37996     AFC_SERV_RESP_FORMAT_IGNORE = 2, /* When cmd type is reset,server response is set to FORMAT_IGNORE */
37997 } WMI_AFC_SERV_RESP_FORMAT_TYPE;
37998 
37999 typedef enum {
38000     /**
38001      * wmi_afc_cmd_type will indicate type of AFC command sent to FW.
38002      * Once AFC server writes data at TZ memory location SERV_RESP_READY
38003      * type command is sent to FW.
38004      * This type can be expanded in future as per requirements.
38005      */
38006     WMI_AFC_CMD_SERV_RESP_READY = 1,
38007     WMI_AFC_CMD_RESET = 2, /* Added cmd type to handle AFC reset */
38008     WMI_AFC_CMD_CLEAR_PAYLOAD = 3, /* Added cmd type to clear AFC response payload in proxy mode */
38009 } WMI_AFC_CMD_TYPE;
38010 
38011 /** Host indicating AFC info availability to FW */
38012 typedef struct {
38013      A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_afc_cmd_fixed_param */
38014      A_UINT32 pdev_id;
38015      A_UINT32 cmd_type; /* refer WMI_AFC_CMD_TYPE */
38016      A_UINT32 serv_resp_format; /* refer WMI_AFC_SERV_RESP_FORMAT_TYPE */
38017 } wmi_afc_cmd_fixed_param;
38018 
38019 /** Host indicates AFC info availability to FW using WMI_AFC_CMD
38020  * This AFC info is written by AFC application/ server in host/target
38021  * shared memory reserved during bootup.
38022  * The structure is placeholder, indicating way afc_serv_resp is written in FW.
38023  * This structure will not be attach as input to WMI command.
38024  * This structure will be common to both host and FW.
38025  * The structure of this WMI AFC info is as follows.
38026  */
38027 typedef struct {
38028     A_UINT32 tlv_header;   /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_afc_serv_resp_struct */
38029     A_UINT32 status;       /* validity flag to be updated by TZ/ PF stub layer,
38030                             * to indicate if payload is valid or not.
38031                             * status = 1 will indicate payload is valid. */
38032     A_UINT32 time_to_live; /* Total time for which this AFC info is valid in seconds */
38033     A_UINT32 length;       /* length of the payload, in bytes */
38034     A_UINT32 payload_format; /* The format of payload written in FW memory:
38035                               * 0 -> JSON format
38036                               * 1 -> Binary format
38037                               * Refer to WMI_AFC_SERV_RESP_FORMAT_TYPE.
38038                               */
38039     /*
38040      * The structure above is followed by array of char which will have
38041      * JSON string or binary data, as specified by the payload_format field.
38042      * A_CHAR bufp[];    AFC payload (JSON string or binary data)
38043      */
38044 } wmi_afc_serv_resp_struct;
38045 
38046 /*
38047  * The following structures define the format used for AFC binary data objects
38048  * shared by the host SW and target FW.
38049  * FW expects these structures to be written in shared memory in little-endian
38050  * format. If the host/AFC app uses big endian format, Host/APP needs to
38051  * byteswap the data, so FW will get data in the expected little-endian format.
38052  */
38053 typedef struct {
38054     A_UINT32 freq_info; /* bits 15:0  = u16 start_freq,
38055                          * bits 31:16 = u16 end_freq
38056                          * both in MHz units
38057                          */
38058     A_INT32 max_psd;     /* Maximum PSD in dBm/MHz, value is stored in 0.01 dBm/MHz steps */
38059 } afc_freq_info;
38060 
38061 typedef struct {
38062     A_UINT32 channel_cfi;  /* channel center frequency index */
38063     /*
38064      * maximum permissible EIRP available for above CFI in dBm,
38065      * value is stored in 0.01 dBm steps.
38066      * Note: This A_UINT32 field can receive negative EIRP value from AFC
38067      * server. These negative EIRP value cases are handled internally.
38068      */
38069     A_UINT32 max_eirp_pwr;
38070 } afc_eirp_info;
38071 
38072 typedef struct {
38073     A_UINT32 global_operating_class;
38074     A_UINT32 num_channels; /* num of valid channels for above global operating class */
38075     /* This structure is followed by (num_channels*sizeof(afc_eirp_info))
38076      * bytes array:
38077      *     afc_eirp_info eirp_info[num_channels];
38078      *     List of channel cfi and eirp power values,
38079      *     Total size will be num_channels * sizeof(afc_eirp_info)
38080      */
38081 } afc_channel_info;
38082 
38083 /*
38084  * For case of afc_server_resp containing binary payload, the buf pointer
38085  * in wmi_afc_serv_resp_struct will be poiniting to binary format payload
38086  * which is in the format defined below.
38087  */
38088 typedef struct {
38089     A_UINT32 local_error_code;   /* Internal error code between AFC app and target success = 0, General failure = 1 */
38090     A_UINT32 version;            /* Internal version between AFC app and Target for structure pattern */
38091     A_UINT32 afc_wfa_version;    /* Version defined in AFC spec document. bits 15:0 -- minor version & bits 31:16 -- major version */
38092     A_UINT32 request_id;         /* AFC unique request ID */
38093     A_UINT32 avail_exp_time_d;   /* avail_exp_time_d and avail_exp_time_t are in UTC
38094                                   * Availability expiry time date format: YYYY-MM-DD,
38095                                   * bits 7:0 -DD - Day (expected values 1-31)
38096                                   * bits 15:8 -MM - Month (expected values 1-12)
38097                                   * bits 31:16 -YYYY - Year
38098                                   */
38099     A_UINT32 avail_exp_time_t;   /* Availability expiry time format HH-MM-SS
38100                                   * bits 7:0 -SS - Time in Sec (expected values 0-59)
38101                                   * bits 15:8 -MM - Minute (expected values 0-59)
38102                                   * bits 23:16 -HH - Hour (expected values 0-23)
38103                                   * bits 31:24 -reserved
38104                                   */
38105     A_INT32 afc_serv_resp_code;   /* response code defined in afc wfa document, refer WMI_AFC_SERV_RESP_CODE */
38106     A_UINT32 num_frequency_obj;   /* Total number of frequency objects */
38107     A_UINT32 num_channel_obj;     /* Total number of frequency objects */
38108     char shortdesc[64];           /* This field represents a short description related to the result indicated by the response_code
38109                                    * field. End of description will be indicated by 0 */
38110     A_UINT32 reserved[2];         /* reserve space for future fields - needs to be set to 0x0 */
38111 
38112     /*
38113      * This structure is followed by an array of frequency info and
38114      * channel info array:
38115      *   - afc_freq_info freq_info[num_frequency_obj];
38116      *     List of frequency power values, total size will be
38117      *     num_frequency_obj * sizeof(afc_freq_info)
38118      *   - afc_channel_info chan_info[num_channel_obj];
38119      *     List of channel power values, total size will be
38120      *     num_channel_obj * sizeof(afc_channel_info)
38121      */
38122 } afc_spectrum_inquiry_resp_bin_type;
38123 
38124 typedef struct {
38125     /** TLV tag and len; tag equals
38126      * WMITLV_TAG_STRUC_wmi_vdev_enable_disable_intra_bss_cmd_fixed_param
38127      */
38128     A_UINT32 tlv_header;
38129     /** The corresponding vdev_id.
38130      */
38131     A_UINT32 vdev_id;
38132     /* Enable/Disable intra_bss.
38133      */
38134     A_UINT32 enable;
38135 } wmi_vdev_enable_disable_intra_bss_cmd_fixed_param;
38136 
38137 typedef struct {
38138     /** TLV tag and len; tag equals
38139      * WMITLV_TAG_STRUC_wmi_peer_enable_disable_intra_bss_cmd_fixed_param
38140      */
38141     A_UINT32 tlv_header;
38142     /** Mac Address of the peer.
38143      */
38144     wmi_mac_addr mac_addr;
38145     /** The corresponding vdev_id.
38146      */
38147     A_UINT32 vdev_id;
38148     /* Enable/Disable intra_bss.
38149      */
38150     A_UINT32 enable;
38151 } wmi_peer_enable_disable_intra_bss_cmd_fixed_param;
38152 
38153 /* Freq units in MHz */
38154 #define WMI_REG_RULE_START_FREQ_GET(freq_info)                     WMI_GET_BITS(freq_info, 0, 16)
38155 #define WMI_REG_RULE_START_FREQ_SET(freq_info, value)              WMI_SET_BITS(freq_info, 0, 16, value)
38156 #define WMI_REG_RULE_END_FREQ_GET(freq_info)                       WMI_GET_BITS(freq_info, 16, 16)
38157 #define WMI_REG_RULE_END_FREQ_SET(freq_info, value)                WMI_SET_BITS(freq_info, 16, 16, value)
38158 
38159 /* BW in MHz */
38160 #define WMI_REG_RULE_MAX_BW_GET(bw_pwr_info)                       WMI_GET_BITS(bw_pwr_info, 0, 16)
38161 #define WMI_REG_RULE_MAX_BW_SET(bw_pwr_info, value)                WMI_SET_BITS(bw_pwr_info, 0, 16, value)
38162 /* regpower in dBm */
38163 #define WMI_REG_RULE_REG_POWER_GET(bw_pwr_info)                    WMI_GET_BITS(bw_pwr_info, 16, 8)
38164 #define WMI_REG_RULE_REG_POWER_SET(bw_pwr_info, value)             WMI_SET_BITS(bw_pwr_info, 16, 8, value)
38165 /* antenna gain */
38166 #define WMI_REG_RULE_ANTENNA_GAIN_GET(bw_pwr_info)                 WMI_GET_BITS(bw_pwr_info, 24, 8)
38167 #define WMI_REG_RULE_ANTENNA_GAIN_SET(bw_pwr_info, value)          WMI_SET_BITS(bw_pwr_info, 24, 8, value)
38168 
38169 typedef enum {
38170     WMI_REG_FLAG_CHAN_NO_IR           = 0x0001, /* passive channel */
38171     WMI_REG_FLAG_CHAN_RADAR           = 0x0002, /* dfs channel */
38172     WMI_REG_FLAG_CHAN_NO_OFDM         = 0x0004, /* no ofdm channel */
38173     WMI_REG_FLAG_CHAN_INDOOR_ONLY     = 0x0008, /* indoor only channel */
38174 } WMI_REGULATORY_FLAGS;
38175 
38176 #define WMI_REG_RULE_FLAGS_GET(flag_info)                    WMI_GET_BITS(flag_info, 0, 16)
38177 #define WMI_REG_RULE_FLAGS_SET(flag_info, value)             WMI_SET_BITS(flag_info, 0, 16, value)
38178 
38179 typedef struct {
38180     A_UINT32  tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_struct */
38181     A_UINT32  freq_info;       /* bits 15:0  = u16 start_freq,
38182                                 * bits 31:16 = u16 end_freq
38183                                 * (both in MHz units) */
38184     A_UINT32  bw_pwr_info;     /* bits 15:0  = u16 max_bw (MHz units),
38185                                   bits 23:16 = u8 reg_power (dBm units),
38186                                   bits 31:24 = u8 ant_gain (dB units) */
38187     A_UINT32  flag_info;       /* bits 15:0  = u16 flags,
38188                                   bits 31:16 reserved */
38189 } wmi_regulatory_rule_struct;
38190 
38191 #define WMI_REG_RULE_PSD_FLAG_GET(psd_power_info) \
38192     WMI_GET_BITS(psd_power_info, 0, 1)
38193 #define WMI_REG_RULE_PSD_FLAG_SET(psd_power_info, value) \
38194     WMI_SET_BITS(psd_power_info, 0, 1, value)
38195 
38196 #define WMI_REG_RULE_PSD_EIRP_GET(psd_power_info) \
38197     WMI_GET_BITS(psd_power_info, 16, 16)
38198 #define WMI_REG_RULE_PSD_EIRP_SET(psd_power_info, value) \
38199     WMI_SET_BITS(psd_power_info, 16, 16, value)
38200 
38201 typedef struct {
38202     A_UINT32  tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_ext_struct */
38203     A_UINT32  freq_info;       /* bits 15:0  = u16 start_freq,
38204                                   bits 31:16 = u16 end_freq
38205                                   (both in MHz units)
38206                                   use same MACRO as wmi_regulatory_rule_struct
38207                                 */
38208     A_UINT32  bw_pwr_info;     /* bits 15:0  = u16 max_bw (MHz units),
38209                                   bits 23:16 = u8 reg_power (dBm units),
38210                                   bits 31:24 = u8 ant_gain (dB units)
38211                                   use same MACRO as wmi_regulatory_rule_struct
38212                                 */
38213     A_UINT32  flag_info;       /* bits 15:0  = u16 flags,
38214                                   bits 31:16 reserved
38215                                   use same MACRO as wmi_regulatory_rule_struct
38216                                 */
38217     A_UINT32  psd_power_info;  /* bits 0     - whether PSD power,
38218                                   bits 15:1  - reserved
38219                                   bits 31:16 - maximum PSD EIRP (dB/MHz)
38220                                 */
38221 /*
38222  * NOTE: no further fields can be added into this struct, due to
38223  * message buffer size limitations in certain targets for the
38224  * WMI_REG_CHAN_LIST_CC_EXT_EVENT message.
38225  */
38226 } wmi_regulatory_rule_ext_struct;
38227 
38228 #define WMI_REG_CHAN_PRIORITY_FREQ_GET(freq_info)        WMI_GET_BITS(freq_info, 0, 16)
38229 #define WMI_REG_CHAN_PRIORITY_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 0, 16, value)
38230 
38231 typedef struct {
38232     A_UINT32  tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_chan_priority_struct */
38233     A_UINT32  freq_info;
38234     /* freq_info:
38235      * bits 15:0 = u16 Cutoff Frequency value for Prioritization (in MHz units)
38236      *             The frequencies above this value will be prioritized and
38237      *             the frequencies below this value will be de-prioritized.
38238      * bits 31:16 = reserved for future
38239      */
38240 /*
38241  * NOTE: no further fields can be added into this struct, due to
38242  * message buffer size limitations in certain targets for the
38243  * WMI_REG_CHAN_LIST_CC_EXT_EVENT message.
38244  */
38245 } wmi_regulatory_chan_priority_struct;
38246 
38247 #define WMI_REG_FCC_RULE_CHAN_FREQ_GET(freq_info)           WMI_GET_BITS(freq_info, 0, 16)
38248 #define WMI_REG_FCC_RULE_CHAN_FREQ_SET(freq_info, value)    WMI_SET_BITS(freq_info, 0, 16, value)
38249 #define WMI_REG_FCC_RULE_FCC_TX_POWER_GET(freq_info)        WMI_GET_BITS(freq_info, 16, 8)
38250 #define WMI_REG_FCC_RULE_FCC_TX_POWER_SET(freq_info, value) WMI_SET_BITS(freq_info, 16, 8, value)
38251 
38252 typedef struct {
38253     A_UINT32  tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_fcc_rule_struct */
38254     A_UINT32  freq_info;
38255     /* freq_info:
38256      * bits 15:0  = u16 channel frequency (in MHz units)
38257      * bits 23:16 = u8 FCC_Tx_power (dBm units)
38258      * bits 31:24 = u8 reserved for future
38259      */
38260 /*
38261  * NOTE: no further fields can be added into this struct, due to
38262  * message buffer size limitations in certain targets for the
38263  * WMI_REG_CHAN_LIST_CC_EXT_EVENT message.
38264  */
38265 } wmi_regulatory_fcc_rule_struct;
38266 
38267 typedef enum {
38268     WMI_REG_DFS_UNINIT_REGION = 0,
38269     WMI_REG_DFS_FCC_REGION    = 1,
38270     WMI_REG_DFS_ETSI_REGION   = 2,
38271     WMI_REG_DFS_MKK_REGION    = 3,
38272     WMI_REG_DFS_CN_REGION     = 4,
38273     WMI_REG_DFS_KR_REGION     = 5,
38274 
38275     /* Add new items above */
38276     WMI_REG_DFS_UNDEF_REGION = 0xFFFF,
38277 } WMI_REG_DFS_REGION;
38278 
38279 typedef enum {
38280     WMI_REGULATORY_PHYMODE_NO11A    = 0x0001,  /* NO 11A */
38281     WMI_REGULATORY_PHYMODE_NO11B    = 0x0002,  /* NO 11B */
38282     WMI_REGULATORY_PHYMODE_NO11G    = 0x0004,  /* NO 11G */
38283     WMI_REGULATORY_PHYMODE_NO11N    = 0x0008,  /* NO 11N */
38284     WMI_REGULATORY_PHYMODE_NO11AC   = 0x0010,  /* NO 11AC */
38285     WMI_REGULATORY_PHYMODE_NO11AX   = 0x0020,  /* NO 11AX */
38286     WMI_REGULATORY_PHYMODE_NO11BE   = 0x0040,  /* NO 11BE */
38287 } WMI_REGULATORY_PHYBITMAP;
38288 
38289 typedef enum {
38290     WMI_REG_SET_CC_STATUS_PASS = 0,
38291     WMI_REG_CURRENT_ALPHA2_NOT_FOUND = 1,
38292     WMI_REG_INIT_ALPHA2_NOT_FOUND = 2,
38293     WMI_REG_SET_CC_CHANGE_NOT_ALLOWED = 3,
38294     WMI_REG_SET_CC_STATUS_NO_MEMORY = 4,
38295     WMI_REG_SET_CC_STATUS_FAIL = 5,
38296 } WMI_REG_SET_CC_STATUS_CODE;
38297 
38298 typedef struct {
38299     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_fixed_param */
38300     A_UINT32 status_code; /* WMI_REG_SET_CC_STATUS_CODE */
38301     A_UINT32 phy_id;
38302     A_UINT32 alpha2;
38303     A_UINT32 num_phy;
38304     A_UINT32 country_id;
38305     A_UINT32 domain_code;
38306     A_UINT32 dfs_region;  /* WMI_REG_DFS_REGION */
38307     A_UINT32 phybitmap;   /* WMI_REGULATORY_PHYBITMAP */
38308     A_UINT32 min_bw_2g;   /* BW in MHz */
38309     A_UINT32 max_bw_2g;   /* BW in MHz */
38310     A_UINT32 min_bw_5g;   /* BW in MHz */
38311     A_UINT32 max_bw_5g;   /* BW in MHz */
38312     A_UINT32 num_2g_reg_rules;
38313     A_UINT32 num_5g_reg_rules;
38314 /*
38315  * followed by wmi_regulatory_rule_struct TLV array. First 2G and then 5G
38316  * - wmi_regulatory_fcc_rule_struct reg_fcc_rule[]
38317  */
38318 } wmi_reg_chan_list_cc_event_fixed_param;
38319 
38320 typedef enum {
38321     WMI_REG_CLIENT_REGULAR = 0,
38322     WMI_REG_CLIENT_SUBORDINATE = 1,
38323     /* 2 and 3 are reserved for future growth */
38324     WMI_REG_CLIENT_MAX = 4, /* can't expand, b/c used as array length below */
38325 } wmi_reg_client_type;
38326 
38327 typedef struct {
38328     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_ext_fixed_param */
38329     A_UINT32 status_code; /* WMI_REG_SET_CC_STATUS_CODE */
38330     A_UINT32 phy_id;
38331     A_UINT32 alpha2;
38332     A_UINT32 num_phy;
38333     A_UINT32 country_id;  /* uses CountryCode enum values */
38334     A_UINT32 domain_code; /* used EnumRd enum values */
38335     A_UINT32 dfs_region;  /* WMI_REG_DFS_REGION */
38336     A_UINT32 phybitmap;   /* WMI_REGULATORY_PHYBITMAP */
38337     A_UINT32 min_bw_2g;   /* BW in MHz */
38338     A_UINT32 max_bw_2g;   /* BW in MHz */
38339     A_UINT32 min_bw_5g;   /* BW in MHz */
38340     A_UINT32 max_bw_5g;   /* BW in MHz */
38341     A_UINT32 num_2g_reg_rules;
38342     A_UINT32 num_5g_reg_rules;
38343     A_UINT32 client_type;            /* populated if device can function as client */
38344     A_UINT32 rnr_tpe_usable;         /* If RNR TPE Octet usable for that country   */
38345     A_UINT32 unspecified_ap_usable;  /* If unspecified AP usable for that country  */
38346     A_UINT32 domain_code_6g_ap_lpi;
38347     A_UINT32 domain_code_6g_ap_sp;
38348     A_UINT32 domain_code_6g_ap_vlp;
38349     A_UINT32 domain_code_6g_client_lpi[WMI_REG_CLIENT_MAX];
38350     A_UINT32 domain_code_6g_client_sp[WMI_REG_CLIENT_MAX];
38351     A_UINT32 domain_code_6g_client_vlp[WMI_REG_CLIENT_MAX];
38352     A_UINT32 domain_code_6g_super_id;
38353     A_UINT32 min_bw_6g_ap_sp; /* MHz */
38354     A_UINT32 max_bw_6g_ap_sp;
38355     A_UINT32 min_bw_6g_ap_lpi;
38356     A_UINT32 max_bw_6g_ap_lpi;
38357     A_UINT32 min_bw_6g_ap_vlp;
38358     A_UINT32 max_bw_6g_ap_vlp;
38359     A_UINT32 min_bw_6g_client_sp[WMI_REG_CLIENT_MAX];
38360     A_UINT32 max_bw_6g_client_sp[WMI_REG_CLIENT_MAX];
38361     A_UINT32 min_bw_6g_client_lpi[WMI_REG_CLIENT_MAX];
38362     A_UINT32 max_bw_6g_client_lpi[WMI_REG_CLIENT_MAX];
38363     A_UINT32 min_bw_6g_client_vlp[WMI_REG_CLIENT_MAX];
38364     A_UINT32 max_bw_6g_client_vlp[WMI_REG_CLIENT_MAX];
38365     A_UINT32 num_6g_reg_rules_ap_sp;
38366     A_UINT32 num_6g_reg_rules_ap_lpi;
38367     A_UINT32 num_6g_reg_rules_ap_vlp;
38368     A_UINT32 num_6g_reg_rules_client_sp[WMI_REG_CLIENT_MAX];
38369     A_UINT32 num_6g_reg_rules_client_lpi[WMI_REG_CLIENT_MAX];
38370     A_UINT32 num_6g_reg_rules_client_vlp[WMI_REG_CLIENT_MAX];
38371 /*
38372  * NOTE: no further fields can be added into this struct, due to
38373  * message buffer size limitations in certain targets for the
38374  * WMI_REG_CHAN_LIST_CC_EXT_EVENT message.
38375  */
38376 /*
38377  * This fixed_param TLV is followed by the following TLVs:
38378  *   - wmi_regulatory_rule_ext reg_rule_array[] struct TLV array.
38379  *     Within the reg rule ext TLV array, the 2G elements occur first,
38380  *     then the 5G elements, then the 6G elements (AP LPI, AP SP, AP VLP,
38381  *     client LPI x4, client SP x4, client VLP x4).
38382  *   - wmi_regulatory_chan_priority_struct reg_chan_priority[]
38383  *   - wmi_regulatory_fcc_rule_struct reg_fcc_rule[]
38384  *   - wmi_reg_chan_list_cc_ext_additional_params reg_more_data[]
38385  *     struct used to fill more fixed additional data, as existing
38386  *     fixed_param TLV struct can't be extended.
38387  *   - wmi_regulatory_rule_meta_data reg_meta_data[]
38388  *     struct used to fill meta information specific to new reg rules
38389  *     getting added(i.e. from C2C onwards).
38390  */
38391 } wmi_reg_chan_list_cc_event_ext_fixed_param;
38392 
38393 #define WMI_REG_CAPS_C2C_SUPPORT_GET(additional_regulatory_capabilities) \
38394     WMI_GET_BITS(additional_regulatory_capabilities, 0, 1)
38395 #define WMI_REG_CAPS_C2C_SUPPORT_SET(additional_regulatory_capabilities, value) \
38396     WMI_SET_BITS(additional_regulatory_capabilities, 0, 1, value)
38397 
38398 typedef struct {
38399     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_ext_additional_params */
38400     /* additional_regulatory_capabilities:
38401      * bit     0  - whether C2C supported
38402      * bits 31:1  - reserved
38403      */
38404     A_UINT32 additional_regulatory_capabilities;
38405 } wmi_reg_chan_list_cc_ext_additional_params;
38406 
38407 typedef enum {
38408     WMI_REG_RULE_TYPE_indoor_enabled_ap,
38409     WMI_REG_RULE_TYPE_indoor_enabled_def_cli,
38410     WMI_REG_RULE_TYPE_indoor_enabled_sub_cli,
38411     WMI_REG_RULE_TYPE_MAX,
38412 } WMI_REG_RULE_TYPE;
38413 
38414 typedef struct {
38415     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_meta_data */
38416     A_UINT32 reg_rule_type; /* Refer enum WMI_REG_RULE_TYPE */
38417     A_UINT32 domain_code_6ghz;
38418     A_UINT32 min_bw_6ghz; /* units = MHz */
38419     A_UINT32 max_bw_6ghz; /* units = MHz */
38420     A_UINT32 num_6ghz_reg_rules;
38421 } wmi_regulatory_rule_meta_data;
38422 
38423 /* WFA AFC Version */
38424 #define WMI_AFC_WFA_MINOR_VERSION_GET(afc_wfa_version)             WMI_GET_BITS(afc_wfa_version, 0, 16)
38425 #define WMI_AFC_WFA_MINOR_VERSION_SET(afc_wfa_version, value)      WMI_SET_BITS(afc_wfa_version, 0, 16, value)
38426 #define WMI_AFC_WFA_MAJOR_VERSION_GET(afc_wfa_version)             WMI_GET_BITS(afc_wfa_version, 16, 16)
38427 #define WMI_AFC_WFA_MAJOR_VERSION_SET(afc_wfa_version, value)      WMI_SET_BITS(afc_wfa_version, 16, 16, value)
38428 
38429 /* avail_exp_time_d time is expected as YYYY-MM-DD */
38430 #define WMI_AVAIL_EXPIRY_TIME_DAY_GET(avail_exp_time_d)             WMI_GET_BITS(avail_exp_time_d, 0, 8)
38431 #define WMI_AVAIL_EXPIRY_TIME_DAY_SET(avail_exp_time_d, value)      WMI_SET_BITS(avail_exp_time_d, 0, 8, value)
38432 #define WMI_AVAIL_EXPIRY_TIME_MONTH_GET(avail_exp_time_d)           WMI_GET_BITS(avail_exp_time_d, 8, 8)
38433 #define WMI_AVAIL_EXPIRY_TIME_MONTH_SET(avail_exp_time_d, value)    WMI_SET_BITS(avail_exp_time_d, 8, 8, value)
38434 #define WMI_AVAIL_EXPIRY_TIME_YEAR_GET(avail_exp_time_d)            WMI_GET_BITS(avail_exp_time_d, 16, 16)
38435 #define WMI_AVAIL_EXPIRY_TIME_YEAR_SET(avail_exp_time_d, value)     WMI_SET_BITS(avail_exp_time_d, 16, 16, value)
38436 
38437 /* avail_exp_time_t time is expected as HH-MM-SS */
38438 #define WMI_AVAIL_EXPIRY_TIME_SEC_GET(avail_exp_time_t)             WMI_GET_BITS(avail_exp_time_t, 0, 8)
38439 #define WMI_AVAIL_EXPIRY_TIME_SEC_SET(avail_exp_time_t, value)      WMI_SET_BITS(avail_exp_time_t, 0, 8, value)
38440 #define WMI_AVAIL_EXPIRY_TIME_MINUTE_GET(avail_exp_time_t)          WMI_GET_BITS(avail_exp_time_t, 8, 8)
38441 #define WMI_AVAIL_EXPIRY_TIME_MINUTE_SET(avail_exp_time_t, value)   WMI_SET_BITS(avail_exp_time_t, 8, 8, value)
38442 #define WMI_AVAIL_EXPIRY_TIME_HOUR_GET(avail_exp_time_t)            WMI_GET_BITS(avail_exp_time_t, 16, 8)
38443 #define WMI_AVAIL_EXPIRY_TIME_HOUR_SET(avail_exp_time_t, value)     WMI_SET_BITS(avail_exp_time_t, 16, 8, value)
38444 
38445 typedef enum {
38446     /**
38447      * The following event type is mutually exclusive.
38448      * afc_event_type will indicate type of AFC event sent from FW to host.
38449      * 1. For sending Power Info WMI_AFC_EVENT_POWER_INFO event is used.
38450      * 2. For sending AFC expiry use WMI_AFC_EVENT_TIMER_EXPIRY
38451      * This type can be expanded in future as per requirements.
38452      */
38453     WMI_AFC_EVENT_POWER_INFO   = 1,
38454     WMI_AFC_EVENT_TIMER_EXPIRY = 2,
38455 } WMI_AFC_EVENT_TYPE;
38456 
38457 typedef enum {
38458     /**
38459      * The following afc_expiry_event_subtype is mutually exclusive
38460      * and is a part of expiry event.
38461      * 1. At boot up AFC expiry will contain AFC start.
38462      * 2. If AFC timer expires AFC_RENEW status code will be sent to host
38463      *    with expiry event.
38464      * 3. If AFC server is not responding to FW in specified time, FW will
38465      *    indicate host to switch to LPI.
38466      * 4. In SP mode, if AFC server is not responding to FW in
38467      *    specified time then FW will indicate host to stop TX since
38468      *    there are no lower power mode available.
38469      */
38470     WMI_AFC_EXPIRY_EVENT_START                    = 1,
38471     WMI_AFC_EXPIRY_EVENT_RENEW                    = 2,
38472     WMI_AFC_EXPIRY_EVENT_SWITCH_TO_LOW_POWER_MODE = 3,
38473         /* retain the deprecated old name as an alias for the new name */
38474         WMI_AFC_EXPIRY_EVENT_SWITCH_TO_LPI =
38475             WMI_AFC_EXPIRY_EVENT_SWITCH_TO_LOW_POWER_MODE,
38476     WMI_AFC_EXPIRY_EVENT_STOP_TX                  = 4,
38477 } WMI_AFC_EXPIRY_EVENT_SUBTYPE;
38478 
38479 typedef enum {
38480     /**
38481      * The following fw_status_code is mutually exclusive
38482      * and is used in power event.
38483      * 0. AFC power event is success.
38484      * 1. If Host does not indicate AFC indication cmd within certain time
38485      *    of AFC expiry FW_AFC_POWER_EVENT_RESP_NOT_RECEIVED will be used.
38486      * 2. If FW is not able to parse afc_info, parsing_failure will be
38487      *    indicated using WMI_FW_AFC_POWER_EVENT_RESP_NOT_RECEIVED.
38488      * 3. If due to some local reason AFC event is failed, AFC event failure
38489      *    is indicated using WMI_FW_AFC_POWER_EVENT_FAILURE.
38490      */
38491     WMI_FW_AFC_POWER_EVENT_SUCCESS              = 0,
38492     WMI_FW_AFC_POWER_EVENT_RESP_NOT_RECEIVED    = 1,
38493     WMI_FW_AFC_POWER_EVENT_RESP_PARSING_FAILURE = 2,
38494     WMI_FW_AFC_POWER_EVENT_FAILURE              = 3,
38495 } WMI_FW_AFC_POWER_EVENT_STATUS_CODE;
38496 
38497 typedef enum {
38498     /**
38499      * The following afc_server_resp_code is mutually exclusive.
38500      * This response code will be indicated to AFC server.
38501      * These codes are defined in WIFI spec doc for AFC as follows
38502      * -1: General Failure
38503      * 0:  Success
38504      * 100 - 199: General errors related to the protocol
38505      * 300 - 399: Error events specific to message exchange for the
38506      *            Available Spectrum Inquiry
38507      */
38508     WMI_AFC_SERV_RESP_GENERAL_FAILURE        = -1,
38509     WMI_AFC_SERV_RESP_SUCCESS                = 0,
38510     WMI_AFC_SERV_RESP_VERSION_NOT_SUPPORTED  = 100,
38511     WMI_AFC_SERV_RESP_DEVICE_UNALLOWED       = 101,
38512     WMI_AFC_SERV_RESP_MISSING_PARAM          = 102,
38513     WMI_AFC_SERV_RESP_INVALID_VALUE          = 103,
38514     WMI_AFC_SERV_RESP_UNEXPECTED_PARAM       = 106,
38515     WMI_AFC_SERV_RESP_UNSUPPORTED_SPECTRUM   = 300,
38516 } WMI_AFC_SERV_RESP_CODE;
38517 
38518 typedef struct {
38519     /** TLV tag and len;
38520      *  tag equals WMITLV_TAG_STRUC_wmi_afc_event_fixed_param */
38521     A_UINT32 tlv_header;
38522     A_UINT32 phy_id;
38523     A_UINT32 event_type; /* refer to WMI_AFC_EVENT_TYPE */
38524 
38525     /** This TLV is (optionally) followed by TLV and TLV arrays containing
38526      *  different afc_event:
38527      *  1.  wmi_afc_expiry_event_param expiry_evt;
38528      *      This TLV contains afc_expiry_event_param of fixed size.
38529      *  2.  wmi_reg_afc_power_event_param afc_power_event;
38530      *      This TLV contains afc_power_info_param of fixed size.
38531      *  3.  wmi_6g_afc_frequency_info freq_info[]
38532      *      This TLV array contains zero or more TLVs of freq_info,
38533      *      which contain freq range and PSD.
38534      *  4.  wmi_6g_afc_channel_info channel_info[]
38535      *      This TLV array contains zero or more TLVs of global_operating
38536      *      class and number of channel
38537      *      in each global operating class
38538      *  5.  wmi_afc_chan_eirp_power_info chan_eirp_power_info[]
38539      *      This TLV array contains zero or more TLVs of channel CFI and
38540      *      EIRP power values for each of the total number of channels
38541      *      per global operating class.
38542      */
38543 } wmi_afc_event_fixed_param;
38544 
38545 typedef struct {
38546     /** TLV tag and len;
38547      *  tag equals WMITLV_TAG_STRUC_wmi_afc_expiry_event_param.
38548      */
38549     A_UINT32 tlv_header;
38550     A_UINT32 request_id; /* AFC unique Request ID for AFC expiry event, This is Nonce generated by FW for freshness */
38551     A_UINT32 event_subtype; /* refer to WMI_AFC_EXPIRY_EVENT_SUBTYPE */
38552     A_UINT32 afc_wfa_version;    /* bits 15:0  -- minor version
38553                                   * bits 31:16 -- major version
38554                                   * WMI_AFC_WFA_MINOR_VERSION_GET &
38555                                   * WMI_AFC_WFA_MAJOR_VERSION_GET
38556                                   */
38557 } wmi_afc_expiry_event_param;
38558 
38559 typedef struct {
38560     /** TLV tag and len;
38561       *tag equals WMITLV_TAG_STRUC_wmi_afc_power_event_param */
38562     A_UINT32 tlv_header;
38563     A_UINT32 fw_status_code;     /* refer WMI_FW_AFC_POWER_EVENT_STATUS_CODE */
38564     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. */
38565     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. */
38566     A_UINT32 afc_wfa_version;    /* bits 15:0  -- minor version
38567                                   * bits 31:16 -- major version
38568                                   * WMI_AFC_WFA_MINOR_VERSION_GET &
38569                                   * WMI_AFC_WFA_MAJOR_VERSION_GET
38570                                   */
38571     A_UINT32 avail_exp_time_d;   /* avail_exp_time_d and avail_exp_time_t are
38572                                   * in UTC
38573                                   * Availability expiry time date format:
38574                                   * YYYY-MM-DD,
38575                                   * bits 7:0 -DD - Day (expected values 1-31)
38576                                   * bits 15:8 -MM - Month (expected values 1-12)
38577                                   * bits 31:16 -YYYY - Year
38578                                   */
38579     A_UINT32 avail_exp_time_t;   /* Availability expiry time format HH-MM-SS
38580                                   * bits 7:0 -SS - Time in Sec (expected values 0-59)
38581                                   * bits 15:8 -MM - Minute (expected values 0-59)
38582                                   * bits 23:16 -HH - Hour (expected values 0-23)
38583                                   * bits 31:24 -reserved
38584                                   */
38585 } wmi_afc_power_event_param;
38586 
38587 typedef struct {
38588     /** TLV tag and len;
38589      * tag equals WMITLV_TAG_STRUC_wmi_6g_afc_frequency_info */
38590     A_UINT32  tlv_header;
38591     A_UINT32  freq_info;     /* bits 15:0  = u16 start_freq,
38592                               * bits 31:16 = u16 end_freq
38593                               * (both in MHz units)
38594                               * use MACRO as WMI_REG_RULE_START_FREQ_GET &
38595                               * WMI_REG_RULE_START_FREQ_SET
38596                               */
38597     A_INT32   psd_power_info; /* Maximum PSD in dBm/MHz, value is stored in 0.01 dBm/MHz steps */
38598 } wmi_6g_afc_frequency_info;
38599 
38600 typedef struct {
38601     /** TLV tag and len;
38602      * tag equals WMITLV_TAG_STRUC_wmi_6g_afc_channel_info  */
38603     A_UINT32  tlv_header;
38604     A_UINT32  global_operating_class;
38605     A_UINT32  num_channels; /* num of valid channels for above global operating class */
38606     /* This TLV will be followed by array of
38607      * num_channels times wmi_afc_chan_eirp_power_info
38608      * wmi_afc_chan_eirp_power_info power_info[]
38609      * EIRP power array has chunks of elements corresponding to each channel
38610      * in the channel array.
38611      * i.e. the EIRP power array will contain
38612      * (suppose N1 and N2 are number of valid channels from channel_info[0]
38613      * and channel_info[1] respectively)
38614      * eirp_power[0] power for channel 0 from channel_info[0]
38615      * eirp_power[1] power for channel 1 from channel_info[0]
38616      * ...
38617      * eirp_power[N1-1] power for channel N1-1 from channel_info[0]
38618      * eirp_power[N1] power for channel 0 from channel_info[1]
38619      * eirp_power[N1+1] power for channel 1 from channel_info[1]
38620      * ...
38621      * eirp_power[N1+N2-1] power for channel N2-1 channel_info[1]
38622      * ...
38623      */
38624 } wmi_6g_afc_channel_info;
38625 
38626 typedef struct {
38627     /** TLV tag and len;
38628      * tag equals WMITLV_TAG_STRUC_wmi_afc_chan_eirp_power_info */
38629     A_UINT32 tlv_header ;
38630     A_UINT32 channel_cfi; /* channel center frequency indices */
38631     A_UINT32 eirp_pwr;    /* maximum permissible EIRP available for above CFI in dBm, value is stored in 0.01 dBm steps */
38632 } wmi_afc_chan_eirp_power_info;
38633 
38634 typedef struct {
38635     A_UINT32  tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_start_cmd_fixed_param */
38636     A_UINT32  vdev_id;
38637     A_UINT32  scan_period_msec;   /** scan duration in milli-seconds */
38638     A_UINT32  start_interval_msec; /** offset duration to start the scan in milli-seconds */
38639 } wmi_11d_scan_start_cmd_fixed_param;
38640 
38641 typedef struct {
38642     A_UINT32  tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_stop_cmd_fixed_param */
38643     A_UINT32  vdev_id;
38644 } wmi_11d_scan_stop_cmd_fixed_param;
38645 
38646 /** FW indicating new current country code to Host */
38647 typedef struct {
38648     A_UINT32  tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_new_country_event_fixed_param */
38649     A_UINT32  new_alpha2; /** alpha2 characters representing the country code */
38650 } wmi_11d_new_country_event_fixed_param;
38651 
38652 typedef struct {
38653     /** TLV tag and len; tag equals
38654      * WMITLV_TAG_STRUC_wmi_coex_get_antenna_isolation_cmd_fixed_param */
38655     A_UINT32 tlv_header;
38656     /* Currently there are no parameters for this message. */
38657 } wmi_coex_get_antenna_isolation_cmd_fixed_param;
38658 
38659 typedef struct {
38660     /** TLV tag and len; tag equals
38661      * WMITLV_TAG_STRUC_wmi_pdev_get_nfcal_power_fixed_param */
38662     A_UINT32 tlv_header;
38663     /** pdev_id for identifying the MAC
38664      * See macros starting with WMI_PDEV_ID_ for values.
38665      */
38666     A_UINT32 pdev_id;
38667 } wmi_pdev_get_nfcal_power_fixed_param;
38668 
38669 typedef struct {
38670     /** TLV tag and len; tag equals
38671      * WMITLV_TAG_STRUC_wmi_coex_report_isolation_event_fixed_param */
38672     A_UINT32 tlv_header;
38673     /** 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.
38674      *  Currently the HW descriptor only supports 4 chains at most.
38675      *  Further isolation_chainX elements can be added in the future
38676      *  for additional chains, if needed.
38677      */
38678     A_UINT32 isolation_chain0:8, /* [7:0],   isolation value for chain 0 */
38679              isolation_chain1:8, /* [15:8],  isolation value for chain 1 */
38680              isolation_chain2:8, /* [23:16], isolation value for chain 2 */
38681              isolation_chain3:8; /* [31:24], isolation value for chain 3 */
38682 } wmi_coex_report_isolation_event_fixed_param;
38683 
38684 typedef enum {
38685     WMI_COEX_DBAM_COMP_SUCCESS          = 0, /* success, mode is applied */
38686     WMI_COEX_DBAM_COMP_ONGOING          = 1, /* success, mode is applied */
38687     WMI_COEX_DBAM_COMP_DELAYED          = 2, /* DBAM is delayed and TDD is selected temporarily */
38688     WMI_COEX_DBAM_COMP_NOT_SUPPORT      = 3, /* DBAM is not supported */
38689     WMI_COEX_DBAM_COMP_TEST_MODE        = 4, /* ignore due to test mode */
38690     WMI_COEX_DBAM_COMP_INVALID_PARAM    = 5, /* invalid parameter is received */
38691     WMI_COEX_DBAM_COMP_FAIL             = 6, /* command failed */
38692 } wmi_coex_dbam_comp_status;
38693 
38694 typedef struct {
38695     /** TLV tag and len; tag equals
38696      * WMITLV_TAG_STRUC_wmi_coex_dbam_complete_event_fixed_param */
38697     A_UINT32 tlv_header;
38698     A_UINT32 comp_status;    /* wmi_coex_dbam_comp_status */
38699 } wmi_coex_dbam_complete_event_fixed_param;
38700 
38701 typedef enum wmi_tas_power_history_event_type {
38702     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 */
38703     WMI_TAS_POWER_HISTORY_EVENT_SAVE_COMPLETE = 1, /* Power history save complete */
38704 } WMI_TAS_POWER_HISTORY_EVENT_TYPE;
38705 
38706 typedef struct {
38707     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tas_power_history_event_fixed_param */
38708     A_UINT32    tlv_header;
38709     A_UINT32    sub_type;     /* refer to WMI_TAS_POWER_HISTORY_EVENT_TYPE */
38710 } wmi_tas_power_history_event_fixed_param;
38711 
38712 typedef enum {
38713     WMI_RCPI_MEASUREMENT_TYPE_AVG_MGMT  = 1,
38714     WMI_RCPI_MEASUREMENT_TYPE_AVG_DATA  = 2,
38715     WMI_RCPI_MEASUREMENT_TYPE_LAST_MGMT = 3,
38716     WMI_RCPI_MEASUREMENT_TYPE_LAST_DATA = 4,
38717 } wmi_rcpi_measurement_type;
38718 
38719 typedef struct {
38720     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_rcpi_cmd_fixed_param */
38721     A_UINT32 tlv_header;
38722     /* VDEV identifier */
38723     A_UINT32 vdev_id;
38724     /* peer MAC address */
38725     wmi_mac_addr peer_macaddr;
38726     /* measurement type - defined in enum wmi_rcpi_measurement_type */
38727     A_UINT32 measurement_type;
38728 } wmi_request_rcpi_cmd_fixed_param;
38729 
38730 typedef struct {
38731     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_rcpi_event_fixed_param */
38732     A_UINT32 tlv_header;
38733     /* VDEV identifier */
38734     A_UINT32 vdev_id;
38735     /* peer MAC address */
38736     wmi_mac_addr peer_macaddr;
38737     /* measurement type - defined in enum wmi_rcpi_measurement_type */
38738     A_UINT32 measurement_type;
38739     /* Measured RCPI in dBm of the peer requested by host */
38740     A_INT32 rcpi;
38741     /** status
38742      *  0 - Requested peer RCPI available
38743      *  1 - Requested peer RCPI not available
38744      */
38745     A_UINT32 status;
38746 } wmi_update_rcpi_event_fixed_param;
38747 
38748 /* Definition of mask for various package id */
38749 #define WMI_PKGID_MASK_AUTO 0x00000080
38750 
38751 typedef struct {
38752     /** TLV tag and len; tag equals*/
38753     A_UINT32 tlv_header;
38754     /**
38755      * The value field is filled with WMI_PKGID_MASK values.
38756      * Currently, the only flag used within values is
38757      * WMI_PKGID_MASK_AUTO, where bit7=1 for automotive systems.
38758      */
38759     A_UINT32 value;
38760 } wmi_pkgid_event_fixed_param;
38761 
38762 typedef struct {
38763     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_params */
38764     A_UINT32 vdev_id; /* vdev id whose mac to be randomized */
38765     /* enable is set to 1 if mac randomization to be enabled */
38766     A_UINT32 enable;
38767     /* randomization mac address if randomization is enabled */
38768     wmi_mac_addr mac_addr;
38769     /* To get the PMAC from freq param */
38770     A_UINT32 freq;  /* units in MHz */
38771 } wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_param;
38772 
38773 typedef struct {
38774     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_event_fixed_params */
38775     A_UINT32 vdev_id; /* vdev of id whose mac address was randomized */
38776     A_UINT32 status; /* status is 1 if success and 0 if failed */
38777 } wmi_vdev_add_mac_addr_to_rx_filter_status_event_fixed_param;
38778 
38779 /* Definition of HW data filtering */
38780 typedef enum {
38781     WMI_HW_DATA_FILTER_DROP_NON_ARP_BC = 0x01,
38782     WMI_HW_DATA_FILTER_DROP_NON_ICMPV6_MC = 0x02,
38783 } WMI_HW_DATA_FILTER_BITMAP_TYPE;
38784 
38785 typedef struct {
38786     A_UINT32 tlv_header;
38787     A_UINT32 vdev_id;
38788     A_UINT32 enable;  /* 1 . enable, 0- disable */
38789     A_UINT32 hw_filter_bitmap; /* see WMI_HW_DATA_FILTER_BITMAP_TYPE */
38790 } wmi_hw_data_filter_cmd_fixed_param;
38791 
38792 /** values for multiple_vdev_restart_request flags */
38793 /* Host is expecting consolidated Multiple Vdev Restart Response(MVRR) event. */
38794 #define WMI_MULTIPLE_VDEV_RESTART_FLAG_IS_MVRR_EVENT_SUPPORT(flag)  WMI_GET_BITS(flag, 0, 1)
38795 #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_MVRR_EVENT_SUPPORT(flag,val)  WMI_SET_BITS(flag, 0, 1, val)
38796 /* Host is sending phymode_list for each vdev. */
38797 #define WMI_MULTIPLE_VDEV_RESTART_FLAG_IS_PHYMODE_PRESENT(flag)  WMI_GET_BITS(flag, 1, 1)
38798 #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_PHYMODE_PRESENT(flag,val)  WMI_SET_BITS(flag, 1, 1, val)
38799 #define WMI_MULTIPLE_VDEV_RESTART_FLAG_GET_PHYMODE(phymode) WMI_GET_BITS(phymode, 0, 6)
38800 #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_PHYMODE(phymode, val) WMI_SET_BITS(phymode, 0, 6, val)
38801 
38802 /** Indicates that VDEV ID is in bit-map format
38803  *  If this flag is set, FW will determine the vdev IDs from the positions
38804  *  of the bits that are set, and use these vdev IDs for vdev restart.
38805  *
38806  *  This flag should not be set from host unless FW has set the service bit
38807  *  WMI_SERVICE_MULTIPLE_VDEV_RESTART_BITMAP_SUPPORT to indicate it supports
38808  *  this interpretation of the vdev IDs as a bitmap.
38809  *
38810  *  If this flag is set then below is the way it will be parsed
38811  *  vdev_ids[0] = 53 (0011 0101) -> indicates vdev 0,2,4,5 is set
38812  *  vdev_ids[1] = 53 (0000 0101) -> indicates vdev 32,34 is set
38813  *  similar to this the value can be extended in feature for more vdev's
38814  *
38815  *  If flag is not se then default parsing will be as below
38816  *  vdev_ids[0] = 0
38817  *  vdev_ids[1] = 2
38818  *  vdev_ids[2] = 4
38819  *  .
38820  *  .
38821  *  vdev_ids[5] = 34
38822  */
38823 #define WMI_MULTIPLE_VDEV_RESTART_FLAG_BITMAP_SUPPORT(flag)  WMI_GET_BITS(flag, 2, 1)
38824 #define WMI_MULTIPLE_VDEV_RESTART_FLAG_SET_BITMAP_SUPPORT(flag,val)  WMI_SET_BITS(flag, 2, 1, val)
38825 
38826 
38827 /* This command is used whenever host wants to restart multiple
38828  * VDEVs using single command and the VDEV that are restarted will
38829  * need to have same properties they had before restart except for the
38830  * operating channel
38831  */
38832 typedef struct {
38833     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param */
38834     /** pdev_id for identifying the MAC
38835      * See macros starting with WMI_PDEV_ID_ for values.
38836      * In non-DBDC case host should set it to 0
38837      */
38838     A_UINT32 pdev_id;
38839     /** unique id identifying the module, generated by the caller */
38840     A_UINT32 requestor_id;
38841     /** Disable H/W ack.
38842      * During CAC, Our HW shouldn't ack directed frames
38843      */
38844     A_UINT32 disable_hw_ack;
38845     /* Determine the duration of CAC on the given channel 'chan' */
38846     A_UINT32 cac_duration_ms;
38847     A_UINT32 num_vdevs;
38848     /*
38849      * Flags to indicate which parameters are sent as part of the request.
38850      * This field is filled with the bitwise combination of the flag values
38851      * defined by WMI_MULTIPLE_VDEV_RESTART_FLAG_xxx
38852      */
38853     A_UINT32 flags;
38854     A_UINT32 puncture_20mhz_bitmap; /* each bit indicates one 20 MHz BW punctured */
38855 
38856     /* The TLVs follows this structure:
38857      * A_UINT32 vdev_ids[]; <--- Array of vdev IDs, or bitmap of vdev IDs
38858      *     In flags if WMI_MULTIPLE_VDEV_RESTART_FLAG_BITMAP_SUPPORT is set
38859      *     FW will interpret the vdev_ids values as a bitmap, and will use the
38860      *     position of all the bits set within the bitmap to determine the
38861      *     vdev IDs to use for vdev restart.
38862      *     If this flag is set then below is the way it will be parsed
38863      *         vdev_ids[0] = 53 (0011 0101) -> indicates vdev 0,2,4,5 is set
38864      *         vdev_ids[1] = 53 (0000 0101) -> indicates vdev 32,34 is set
38865      *         The array can be extended in feature for more vdevs.
38866      *     If this flag is not se then default parsing will be as below
38867      *         vdev_ids[0] = 0
38868      *         vdev_ids[1] = 2
38869      *         vdev_ids[2] = 4
38870      *         .
38871      *         .
38872      *         vdev_ids[5] = 34
38873      * wmi_channel chan; <------ WMI channel
38874      * A_UINT32 phymode_list[]; <-- Array of Phymode list, with
38875      *    each phymode value stored in bits 5:0 of the A_UINT32.
38876      *    Use the WMI_MULTIPLE_VDEV_RESTART_FLAG_GET/SET_PHYMODE macros
38877      *    to access the phymode value from within each A_UINT32 element.
38878      * A_UINT32 preferred_tx_streams[]; <-- Array of preferred_tx_streams
38879      *    with vdev ID as index.
38880      * A_UINT32 preferred_rx_streams[]; <-- Array of preferred_rx_streams
38881      *    with vdev ID as index.
38882      * wmi_channel dbw_chan; <-- WMI channel
38883      *     optional TLV for dbw_chan
38884      * wmi_dbw_chan_info dbw_chan_info
38885      *     optional TLV used for dbw_chan_info
38886      */
38887 } wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param;
38888 
38889 typedef struct {
38890     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csa_switch_count_status_event_fixed_param */
38891     A_UINT32 tlv_header;
38892     /** pdev_id for identifying the MAC
38893      * See macros starting with WMI_PDEV_ID_ for values.
38894      * In non-DBDC case host should set it to 0
38895      */
38896     A_UINT32 pdev_id;
38897     /** CSA switch count value in the last transmitted beacon */
38898     A_UINT32 current_switch_count;
38899     A_UINT32 num_vdevs;
38900 
38901     /* The TLVs follows this structure:
38902      * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
38903      */
38904 } wmi_pdev_csa_switch_count_status_event_fixed_param;
38905 
38906 typedef struct {
38907     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csc_vdev_list */
38908     A_UINT32 vdev_id;
38909     A_UINT32 current_switch_count; /** CSC switch count value in the last transmitted beacon */
38910 } wmi_csc_vdev_list;
38911 
38912 typedef struct {
38913     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csc_switch_count_status_event_fixed_param */
38914     A_UINT32 tlv_header;
38915     /** pdev_id for identifying the MAC
38916      * See macros starting with WMI_PDEV_ID_ for values.
38917      * In non-DBDC case host should set it to 0
38918      */
38919     A_UINT32 pdev_id;
38920     /** CSC switch count value in the last transmitted beacon */
38921     A_UINT32 current_switch_count;
38922 
38923     /* The TLVs follows this structure:
38924      * struct wmi_csc_vdev_list vdev_info[]; // IDs of vdevs and their current switch countdown values
38925      */
38926 } wmi_pdev_csc_switch_count_status_event_fixed_param;
38927 
38928 /* Operation types for packet routing command */
38929 typedef enum {
38930     WMI_PDEV_ADD_PKT_ROUTING,
38931     WMI_PDEV_DEL_PKT_ROUTING,
38932 } wmi_pdev_pkt_routing_op_code;
38933 
38934 /* Packet routing types based on specific data types */
38935 typedef enum {
38936     WMI_PDEV_ROUTING_TYPE_ARP_IPV4,
38937     WMI_PDEV_ROUTING_TYPE_NS_IPV6,
38938     WMI_PDEV_ROUTING_TYPE_IGMP_IPV4,
38939     WMI_PDEV_ROUTING_TYPE_MLD_IPV6,
38940     WMI_PDEV_ROUTING_TYPE_DHCP_IPV4,
38941     WMI_PDEV_ROUTING_TYPE_DHCP_IPV6,
38942     WMI_PDEV_ROUTING_TYPE_DNS_TCP_IPV4,
38943     WMI_PDEV_ROUTING_TYPE_DNS_TCP_IPV6,
38944     WMI_PDEV_ROUTING_TYPE_DNS_UDP_IPV4,
38945     WMI_PDEV_ROUTING_TYPE_DNS_UDP_IPV6,
38946     WMI_PDEV_ROUTING_TYPE_ICMP_IPV4,
38947     WMI_PDEV_ROUTING_TYPE_ICMP_IPV6,
38948     WMI_PDEV_ROUTING_TYPE_TCP_IPV4,
38949     WMI_PDEV_ROUTING_TYPE_TCP_IPV6,
38950     WMI_PDEV_ROUTING_TYPE_UDP_IPV4,
38951     WMI_PDEV_ROUTING_TYPE_UDP_IPV6,
38952     WMI_PDEV_ROUTING_TYPE_IPV4,
38953     WMI_PDEV_ROUTING_TYPE_IPV6,
38954     WMI_PDEV_ROUTING_TYPE_EAP,
38955     WMI_PDEV_ROUTING_TYPE_VLAN,
38956 } wmi_pdev_pkt_routing_type;
38957 
38958 typedef enum {
38959     WMI_PDEV_WIFIRXCCE_USE_CCE_E  = 0,
38960     WMI_PDEV_WIFIRXCCE_USE_ASPT_E = 1,
38961     WMI_PDEV_WIFIRXCCE_USE_FT_E   = 2,
38962     WMI_PDEV_WIFIRXCCE_USE_CCE2_E = 3,
38963 } wmi_pdev_dest_ring_handler_type;
38964 
38965 typedef enum {
38966     WMI_SOC_TX_PACKET_TYPE_ARP   = 1,
38967     WMI_SOC_TX_PACKET_TYPE_EAPOL = 2,
38968     WMI_SOC_TX_PACKET_TYPE_DHCP  = 3,
38969     WMI_SOC_TX_PACKET_TYPE_DNS   = 4,
38970     WMI_SOC_TX_PACKET_TYPE_ICMP  = 5,
38971 } wmi_soc_tx_packet_type;
38972 
38973 /*
38974  * This command shall be sent only when no VDEV is up.
38975  * If the command is sent after any VDEV is up, target will ignore the command.
38976  */
38977 typedef struct {
38978     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_tx_packet_custom_classify_cmd_fixed_param */
38979     A_UINT32 tlv_header;
38980     /** packet_bitmap:
38981      * bitmap of the packets to be classified,
38982      * Refer to wmi_soc_tx_packet_type for the interpretation of the bits
38983      * within the bitmap.
38984      */
38985     A_UINT32 packet_bitmap;
38986 } wmi_soc_tx_packet_custom_classify_cmd_fixed_param;
38987 
38988 /*
38989  * This command shall be sent only when no VDEV is up.
38990  * If the command is sent after any VDEV is up, target will ignore the command.
38991  */
38992 typedef struct {
38993     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pkt_routing_cmd_fixed_param */
38994     A_UINT32 tlv_header;
38995     /** Identifies pdev on which routing needs to be applied */
38996     A_UINT32 pdev_id;
38997     /** Indicates the routing operation type: add/delete */
38998     A_UINT32 op_code; /* wmi_pdev_pkt_routing_op_code */
38999     /** Bitmap of multiple pkt routing types for a given destination ring and meta data */
39000     A_UINT32 routing_type_bitmap; /* see wmi_pdev_pkt_routing_type */
39001     /** 5 bits [4:0] are used to specify the destination ring where the CCE matched
39002       * packet needs to be routed.
39003       */
39004     A_UINT32 dest_ring;
39005     /** 16 bits [15:0] meta data can be passed to CCE. When the superrule matches,
39006       * CCE copies this back in RX_MSDU_END_TLV.
39007       */
39008     A_UINT32 meta_data;
39009     /**
39010      * Indicates the dest ring handler type: CCE, APST, FT, CCE2
39011      * Refer to wmi_pdev_dest_ring_handler_type / WMI_PDEV_WIFIRXCCE_USE_xxx
39012      */
39013     A_UINT32 dest_ring_handler;
39014 } wmi_pdev_update_pkt_routing_cmd_fixed_param;
39015 
39016 typedef enum {
39017     WMI_CALIBRATION_NO_FEATURE = 0, /* The board was calibrated with a meta which did not have this feature */
39018     WMI_CALIBRATION_OK,             /* The calibration status is OK */
39019     WMI_CALIBRATION_NOT_OK,         /* The calibration status is NOT OK */
39020 } WMI_CALIBRATION_STATUS;
39021 
39022 #define WMI_BOARD_MCN_STRING_MAX_SIZE 19
39023 
39024 /**
39025  * WMI_BOARD_MCN_STRING_BUF_SIZE : represents the number of elements in board_mcn_detail.
39026  * Since board_mcn_detail is of type A_UINT8, the value of WMI_BOARD_MCN_STRING_BUF_SIZE
39027  * should be multiple of 4 for alignment reason. And the last byte byte is reserved for
39028  * null-terminator
39029  */
39030 #define WMI_BOARD_MCN_STRING_BUF_SIZE (WMI_BOARD_MCN_STRING_MAX_SIZE+1) /* null-terminator */
39031 
39032 typedef struct {
39033     A_UINT32 tlv_header;            /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_event_fixed_param  */
39034     A_UINT32 software_cal_version;  /* Current software level calibration data version */
39035     A_UINT32 board_cal_version;     /* Calibration data version programmed on chip */
39036     A_UINT32 cal_status;            /* filled with WMI_CALIBRATION_STATUS enum value */
39037 
39038     /* board_mcn_detail:
39039      * Provides board's MCN (Material Control Number) information for the host
39040      * to display. This is used to track the Hardware level revisions/versions.
39041      * This array carries the ASCII values of the MCN to the host. And host
39042      * would just print this in a string format whenever user requests.
39043      * Note: On a big-endian host, the 4 bytes within each A_UINT32 portion
39044      * of a WMI message will be automatically byteswapped by the copy engine
39045      * as the messages are transferred between host and target, to convert
39046      * between the target's little-endianness and the host's big-endianness.
39047      * Consequently, a big-endian host will have to manually unswap the bytes
39048      * within the board_mcn_detail string buffer to get the bytes back into
39049      * the desired natural order.
39050      */
39051     A_UINT8 board_mcn_detail[WMI_BOARD_MCN_STRING_BUF_SIZE];
39052     /** pdev_id for identifying the MAC
39053      * See macros starting with WMI_PDEV_ID_ for values.
39054      */
39055     A_UINT32 pdev_id;
39056 } wmi_pdev_check_cal_version_event_fixed_param;
39057 
39058 typedef struct {
39059     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_cmd_fixed_param */
39060     /** pdev_id for identifying the MAC
39061      * See macros starting with WMI_PDEV_ID_ for values.
39062      */
39063     A_UINT32 pdev_id;
39064 } wmi_pdev_check_cal_version_cmd_fixed_param;
39065 
39066 typedef struct {
39067     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_diversity_gain_cmd_fixed_param */
39068     /** Identifies pdev on which diversity gain to be applied */
39069     A_UINT32 pdev_id;
39070     /** The number of spatial stream */
39071     A_UINT32 nss;
39072     /** The number of gains */
39073     A_UINT32 num_gains;
39074     /*
39075      * This fixed_param TLV is followed by other TLVs:
39076      *    A_UINT8 diversity_gains[num_gains]; (gain is in dB units)
39077      */
39078 } wmi_pdev_set_diversity_gain_cmd_fixed_param;
39079 
39080 /* flags for unit_test_event  */
39081 #define WMI_UNIT_TEST_EVENT_FLAG_STATUS         0   /* 0 = success, 1 = fail */
39082 #define WMI_UNIT_TEST_EVENT_FLAG_DONE           1   /* 0 = not done, 1 = done  */
39083 
39084 /* from bit 2 to bit 31 are reserved */
39085 
39086 #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_SUCCESS(flag) do { \
39087         (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
39088      } while (0)
39089 
39090 #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_FAIL(flag) do { \
39091         (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
39092      } while (0)
39093 
39094 #define WMI_GET_UNIT_TEST_EVENT_FLAG_STSTUS(flag) \
39095         ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS))
39096 
39097 #define WMI_SET_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
39098         (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
39099      } while (0)
39100 
39101 #define WMI_CLR_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
39102         (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
39103      } while (0)
39104 
39105 #define WMI_GET_UNIT_TEST_EVENT_FLAG_DONE(flag) \
39106         ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE))
39107 
39108 typedef struct {
39109     /* TLV tag and len; tag equals WMI_UNIT_TEST_EVENTID */
39110     A_UINT32 tlv_header;
39111     /* unique id identifying the VDEV, generated by the caller */
39112     A_UINT32 vdev_id;
39113     /* Identify the wlan module */
39114     A_UINT32 module_id;
39115     /* unique id identifying the unit test cmd, generated by the caller */
39116     A_UINT32 diag_token;
39117     /* flag for the status of the unit_test_cmd */
39118     A_UINT32 flag;
39119     /* data length number of bytes for current dump */
39120     A_UINT32 payload_len;
39121     /* TLV/Payload after this structure is sent in little endian
39122      * format for the length mentioned in this structure.
39123      * A_UINT8 payload[1];
39124      */
39125 } wmi_unit_test_event_fixed_param;
39126 
39127 /* Definition of latency levels */
39128 typedef enum {
39129     WMI_WLM_LL_NORMAL = 0x0,
39130     /* DEPRECATED */ WMI_WLM_LL_MODERATE = 0x1,
39131     WMI_WLM_LL_XR = 0x1,
39132     WMI_WLM_LL_LOW = 0x2,
39133     WMI_WLM_LL_ULTRA_LOW = 0x3,
39134 } WMI_WLM_LATENCY_LEVEL;
39135 
39136 typedef struct {
39137     A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_vdev_latency_event_fixed_param */
39138     /** The latency level for specified vdev_id */
39139     A_UINT32 vdev_id;
39140     /** latency level enum WMI_WLM_LATENCY_LEVEL honored by FW */
39141     A_UINT32 latency_level;
39142 } wmi_vdev_latency_event_fixed_param;
39143 
39144 /*
39145 * Lay out of flags in wmi_wlm_config_cmd_fixed_param
39146 *
39147 * |31 19|  18 | 17|16 14| 13 | 12| 11 | 10 |  9  |  8 |7  6|5  4|3  2| 1 | 0 |
39148 * +-----+-----+---+-----+----+---+----+----+-----+----+----+----+----+---+---+
39149 * | RSVD|SRATE|RTS| NSS |EDCA|TRY|SSLP|CSLP|DBMPS|RSVD|Roam|RSVD|DWLT|DFS|SUP|
39150 * +------------------------------+---------------+---------+-----------------+
39151 * |              WAL             |    PS         |  Roam   |     Scan        |
39152 *
39153 * Flag values:
39154 *     TRY: (1) enable short limit for retrying unacked tx, where the limit is
39155 *              based on the traffic's latency level
39156 *          (0) default tx retry behavior
39157 *    EDCA: (1) Apply VO parameters on BE
39158 *          (0) default behavior
39159 *     NSS: (0) no Nss limits, other than those negotiatied during association
39160 *          (1) during 2-chain operation, tx only a single spatial stream
39161 *          (2) - (7) reserved / invalid
39162 *     RTS: (0) default protection
39163 *          (1) always enable RTS/CTS protection
39164 *   SRATE: (0) default secondary rate policy
39165 *          (1) disable secondary rate
39166 */
39167 /* bit 0-3 of flags is used for scan operation */
39168 /* bit 0: Avoid scan request from HLOS if bit is set */
39169 
39170 #define WLM_FLAGS_SCAN_SUPPRESS  1  /* suppress all scan request */
39171 
39172 /* bit 1: WLM_FLAGS_SCAN_SKIP_DFS, skip dfs channel if bit is set */
39173 
39174 #define WLM_FLAGS_SCAN_SKIP_DFS  1  /* skip dfs channel operation */
39175 
39176 /* bit 2-3: define policy of dwell time/duration of each foreign channel
39177    (b3 b2)
39178    (0  0 ): Default dwell time
39179    (0  1 ): WLM_FLAGS_STICK_SCAN_DWELL_TIME : Stick to original active/passive dwell time, but split
39180    foreign channel dwell times into fitting into min (dl_latency, ul_latency). Note it can increase
39181    overall scan duration.
39182    (1  0 ): WLM_FLAGS_SHRINK_SCAN_DWELL_TIME: Shrink active/passive dwell time to
39183    min(dl_latency, ul_latency, dwell_time). It may reduce overall scan duration, but it may decrease
39184    the accuracy of scan result.
39185    (1  1 ): reserved
39186 */
39187 #define WLM_FLAGS_DEFAULT_SCAN_DWELL_TIME   0 /* Default scan dwell time */
39188 #define WLM_FLAGS_STICK_SCAN_DWELL_TIME     1 /* Shrink off channel time but extend overall scan duration */
39189 #define WLM_FLAGS_SHRINK_SCAN_DWELL_TIME    2 /* Shrink scan off channel time */
39190 
39191 /* bit 4-5: reserved for scan */
39192 
39193 /* bit 6-7 of flags is used for roaming operation */
39194 /* bit 6-7: define roaming policy:
39195    (b7 b6)
39196    (0  0 ): WLM_FLAGS_ROAM_ALLOW: Default behavior, allow roaming in all scenarios
39197    (0  1 ): WLM_FLAGS_ROAM_SUPPRESS: Disallow all roaming
39198    (1  0 ): WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM: Allow final bmiss roaming only
39199    (1  1 ): reserved
39200 */
39201 #define WLM_FLAGS_ROAM_ALLOW     0
39202 #define WLM_FLAGS_ROAM_SUPPRESS  1
39203 #define WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM 2
39204 
39205 /* bit 8: reserved for roaming */
39206 
39207 /* bit 9-11 of flags is used for powersave operation */
39208 /* bit 9: WLM_FLAGS_PS_DISABLE_BMPS, disable BMPS if bit is set */
39209 
39210 #define WLM_FLAGS_PS_DISABLE_BMPS 1 /* disable BMPS */
39211 
39212 /* bit 10: WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE, disable css power collapse if bit is set */
39213 
39214 #define WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE  1  /* disable css power collapse */
39215 
39216 /* bit 11: WLM_FLAGS_PS_DISABLE_SYS_SLEEP, disable sys sleep if bit is set */
39217 
39218 #define WLM_FLAGS_PS_DISABLE_SYS_SLEEP  1  /* disable sys sleep */
39219 
39220 
39221 /* bit 17-31 of flags is reserved for powersave and WAL */
39222 /* bit 23: WLM_FLAGS_PS_DISABLE_MLO_PROBE_SCAN,
39223  *     disable MLO probe scan if bit is set
39224  */
39225 #define WLM_FLAGS_PS_DISABLE_MLO_PROBE_SCAN  1  /* disable MLO probe scan */
39226 
39227 /* bit 24: WLM_FLAGS_PS_DISABLE_ULL_FORCED_MLMR,
39228  *     Disable forced MLMR on ULL if bit is set.
39229  *     (MLMR may still happen due to other reasons.)
39230  */
39231 #define WLM_FLAGS_PS_DISABLE_ULL_FORCED_MLMR  1 /* disable forced MLMR on ULL */
39232 
39233 /* bit 25: WLM_FLAGS_PS_DISABLE_ULL_FORCED_EMLSR,
39234  *     Disable forced EMLSR on ULL if bit is set.
39235  *     (eMLSR may still happen due to other reasons.)
39236  */
39237 #define WLM_FLAGS_PS_DISABLE_ULL_FORCED_EMLSR  1 /* disable forced EMLSR on ULL */
39238 
39239 #define WLM_FLAGS_SCAN_IS_SUPPRESS(flag)                  WMI_GET_BITS(flag, 0, 1)
39240 #define WLM_FLAGS_SCAN_SET_SUPPRESS(flag, val)            WMI_SET_BITS(flag, 0, 1, val)
39241 #define WLM_FLAGS_SCAN_IS_SKIP_DFS(flag)                  WMI_GET_BITS(flag, 1, 1)
39242 #define WLM_FLAGS_SCAN_SET_SKIP_DFS(flag, val)            WMI_SET_BITS(flag, 1, 1, val)
39243 #define WLM_FLAGS_SCAN_GET_DWELL_TIME_POLICY(flag)        WMI_GET_BITS(flag, 2, 2)
39244 #define WLM_FLAGS_SCAN_SET_DWELL_TIME_POLICY(flag, val)   WMI_SET_BITS(flag, 2, 2, val)
39245 #define WLM_FLAGS_TSF_LATENCY_COMPENSATE_ENABLED_GET(flag) WMI_GET_BITS(flag, 4, 1)
39246 #define WLM_FLAGS_TSF_LATENCY_COMPENSATE_ENABLED_SET(flag) WMI_SET_BITS(flag, 4, 1, val)
39247 #define WLM_FLAGS_ROAM_GET_POLICY(flag)                   WMI_GET_BITS(flag, 6, 2)
39248 #define WLM_FLAGS_ROAM_SET_POLICY(flag, val)              WMI_SET_BITS(flag, 6, 2, val)
39249 #define WLM_FLAGS_PS_IS_BMPS_DISABLED(flag)               WMI_GET_BITS(flag, 9, 1)
39250 #define WLM_FLAGS_PS_IS_CSS_CLPS_DISABLED(flag)           WMI_GET_BITS(flag, 10, 1)
39251 #define WLM_FLAGS_PS_SET_CSS_CLPS_DISABLE(flag, val)      WMI_SET_BITS(flag, 10, 1, val)
39252 #define WLM_FLAGS_PS_IS_SYS_SLP_DISABLED(flag)            WMI_GET_BITS(flag, 11, 1)
39253 #define WLM_FLAGS_PS_SET_SYS_SLP_DISABLE(flag, val)       WMI_SET_BITS(flag, 11, 1, val)
39254 #define WLM_FLAGS_WAL_LIMIT_TRY_ENABLED(flag)             WMI_GET_BITS(flag, 12, 1)
39255 #define WLM_FLAGS_WAL_LIMIT_TRY_SET(flag, val)            WMI_SET_BITS(flag, 12, 1, val)
39256 #define WLM_FLAGS_WAL_ADJUST_EDCA_ENABLED(flag)           WMI_GET_BITS(flag, 13, 1)
39257 #define WLM_FLAGS_WAL_ADJUST_EDCA_SET(flag, val)          WMI_SET_BITS(flag, 13, 1, val)
39258 #define WLM_FLAGS_WAL_1NSS_ENABLED(flag)                 (WMI_GET_BITS(flag, 14, 3) & 0x1)
39259 #define WLM_FLAGS_WAL_NSS_SET(flag, val)                  WMI_SET_BITS(flag, 14, 3, val)
39260 #define WLM_FLAGS_WAL_ALWAYS_RTS_PROTECTION(flag)         WMI_GET_BITS(flag, 17, 1)
39261 #define WLM_FLAGS_WAL_RTS_PROTECTION_SET(flag, val)       WMI_SET_BITS(flag, 17, 1, val)
39262 #define WLM_FLAGS_WAL_DISABLE_SECONDARY_RATE(flag)        WMI_GET_BITS(flag, 18, 1)
39263 #define WLM_FLAGS_WAL_SECONDARY_RATE_SET(flag, val)       WMI_SET_BITS(flag, 18, 1, val)
39264 #define WLM_FLAGS_PS_IS_PCIE_L11_ENABLED(flag)            WMI_GET_BITS(flag, 19, 1)
39265 #define WLM_FLAGS_PS_SET_PCIE_L11_ENABLE(flag, val)       WMI_SET_BITS(flag, 19, 1, val)
39266 #define WLM_FLAGS_PS_IS_PHYRF_PS_ENABLED(flag)            WMI_GET_BITS(flag, 20, 1)
39267 #define WLM_FLAGS_PS_SET_PHYRF_PS_ENABLE(flag, val)       WMI_SET_BITS(flag, 20, 1, val)
39268 #define WLM_FLAGS_SCAN_IS_SPLIT_PAS_CH_ENABLED(flag)      WMI_GET_BITS(flag, 21, 1)
39269 #define WLM_FLAGS_SCAN_SET_SPLIT_PAS_CH_ENABLE(flag, val) WMI_SET_BITS(flag, 21, 1, val)
39270 #define WLM_FLAGS_SCAN_IS_ADAPT_SCAN_ENABLED(flag)        WMI_GET_BITS(flag, 22, 1)
39271 #define WLM_FLAGS_SCAN_SET_ADAPT_SCAN_ENABLE(flag, val)   WMI_SET_BITS(flag, 22, 1, val)
39272 #define WLM_FLAGS_PS_IS_MLO_PROBE_SCAN_DISABLED(flag)      WMI_GET_BITS(flag, 23, 1)
39273 #define WLM_FLAGS_PS_SET_MLO_PROBE_SCAN_DISABLE(flag, val) WMI_SET_BITS(flag, 23, 1, val)
39274 #define WLM_FLAGS_PS_IS_ULL_FORCED_MLMR_DISABLED(flag)      WMI_GET_BITS(flag, 24, 1)
39275 #define WLM_FLAGS_PS_SET_ULL_FORCED_MLMR_DISABLE(flag, val) WMI_SET_BITS(flag, 24, 1, val)
39276 #define WLM_FLAGS_PS_IS_ULL_FORCED_EMLSR_DISABLED(flag)      WMI_GET_BITS(flag, 25, 1)
39277 #define WLM_FLAGS_PS_SET_ULL_FORCED_EMLSR_DISABLE(flag, val) WMI_SET_BITS(flag, 25, 1, val)
39278 #define WLM_FLAGS_SET_FORCE_DEFAULT_LATENCY(flag, val)    WMI_SET_BITS(flag, 0, 1, val)
39279 #define WLM_FLAGS_GET_FORCE_DEFAULT_LATENCY(flag)         WMI_GET_BITS(flag, 0, 1)
39280 
39281 #define WLM_MAX_HOST_CLIENTS 5
39282 
39283 typedef struct {
39284     /** TLV tag and len; tag equals WMI_WLM_CONFIG_CMD_fixed_param */
39285     A_UINT32 tlv_header;
39286     /* VDEV identifier */
39287     A_UINT32 vdev_id;
39288     /*
39289      * Refer to WMI_WLM_LATENCY_LEVEL
39290      * Once latency change detected, WLM will notify modules e.g. STAPS or SCAN/ROAM,
39291      * who subscribed this event. And subscribers, like SCAN, may disable/cutoff offchan
39292      * operation to support lower latency of WLAN.
39293      */
39294     A_UINT32 latency_level;
39295     /*
39296      * represent uplink latency in ms
39297      * This parameter will be used by STAPS module to decide timing parameters, like
39298      * ITO or SPEC wakeup interval. For SCAN/ROAM, it may used to calculate offchan
39299      * durations.
39300      * For host and FW with multi client LL feature enabled, this field is obsolete.
39301      */
39302     A_UINT32 ul_latency;
39303     /*
39304      * represent downlink latency in ms
39305      * Similar usage as ul_latency
39306      * For host and FW with multi client LL feature enabled, this field is obsolete.
39307      */
39308     A_UINT32 dl_latency;
39309     /*
39310      * flags for each client of WLM, refer to WLM_FLAGS_ definitions above.
39311      * For host and FW with multi client LL feature enabled, this field is obsolete.
39312      */
39313     A_UINT32 flags;
39314     /*
39315      * bit 0 used as force reset:
39316      * to override the latency level as default
39317      * for all the wlm clients
39318      */
39319     A_UINT32 flags_ext;
39320     /*
39321      * clients of WLM Arbiter
39322      * WLM_MAX_HOST_CLIENTS 5
39323      */
39324     A_UINT32 client_id_bitmask;
39325 } wmi_wlm_config_cmd_fixed_param;
39326 
39327 /* Broadcast TWT enable/disable for both REQUESTER and RESPONDER */
39328 #define TWT_EN_DIS_FLAGS_GET_BTWT(flag)         WMI_GET_BITS(flag, 0, 1)
39329 #define TWT_EN_DIS_FLAGS_SET_BTWT(flag, val)    WMI_SET_BITS(flag, 0, 1, val)
39330 
39331 /* legacy MBSSID enable/disable */
39332 #define TWT_EN_DIS_FLAGS_GET_L_MBSSID(flag)       WMI_GET_BITS(flag, 1, 1)
39333 #define TWT_EN_DIS_FLAGS_SET_L_MBSSID(flag, val)  WMI_SET_BITS(flag, 1, 1, val)
39334 
39335 /* 11ax MBSSID enable/disable */
39336 #define TWT_EN_DIS_FLAGS_GET_AX_MBSSID(flag)      WMI_GET_BITS(flag, 2, 1)
39337 #define TWT_EN_DIS_FLAGS_SET_AX_MBSSID(flag, val) WMI_SET_BITS(flag, 2, 1, val)
39338 
39339 /* Configuration of TWT Modes,
39340  * If this BIT is set BIT4/5 will be used in FW, else BIT4/5 will be ignored.
39341  * Which means when we receive WMI_TWT_ENABLE_CMDID command from host,
39342  * without BIT3 set we will enable both REQUESTER/RESPONDER.
39343  *
39344  * Same interpretation is used in WMI_TWT_DISABLE_CMDID, if BIT3 is not set
39345  * we will disable both REQUESTER and RESPONDER.
39346  */
39347 #define TWT_EN_DIS_FLAGS_GET_SPLIT_CONFIG(flag)      WMI_GET_BITS(flag, 3, 1)
39348 #define TWT_EN_DIS_FLAGS_SET_SPLIT_CONFIG(flag, val) WMI_SET_BITS(flag, 3, 1, val)
39349 
39350 /*
39351  * The flags are used both in WMI_TWT_ENABLE_CMDID and WMI_TWT_DISABLE_CMDID.
39352  *
39353  * BIT4 represents whether the it is for REQUESTER or RESPONDER.
39354  * BIT5 represents whether it is individual or broadcast mode.
39355  *
39356  * For instance, in WMI_TWT_ENABLE_CMDID if BIT4=0 and BIT5=0, then we will
39357  * enable only Requester, we will not change any configuration of RESPONDER.
39358  *
39359  * Same way in WMI_TWT_DISABLE_CMDID if BIT4=0 and BIT5=0, then we will only
39360  * disable Individual and Broadcast REQUESTER, we will not alter any RESPONDER
39361  * configuration.
39362  *
39363  * If host is enabling or disabling both REQUESTER and RESPONDER host will
39364  * send two WMI commands, one for REQUESTER and one for RESPONDER.
39365  *
39366  * WMI_TWT_ENABLE_CMDID command flags description,
39367  * |----------------------------------------------------------------------|
39368  * |BIT4=0, BIT5=0  | Enable Individual TWT requester                     |
39369  * |----------------------------------------------------------------------|
39370  * |BIT4=0, BIT5=1  | Enable both Individual and Broadcast TWT requester  |
39371  * |----------------------------------------------------------------------|
39372  * |BIT4=1, BIT5=0  | Enable Individual TWT responder                     |
39373  * |----------------------------------------------------------------------|
39374  * |BIT4=1, BIT5=1  | Enable both Individual and Broadcast TWT responder  |
39375  * |----------------------------------------------------------------------|
39376  *
39377  *
39378  * WMI_TWT_DISABLE_CMDID command flags description,
39379  * |----------------------------------------------------------------------|
39380  * |BIT4=0, BIT5=0  | Disable both Individual and Broadcast TWT requester |
39381  * |----------------------------------------------------------------------|
39382  * |BIT4=0, BIT5=1  | Disable Broadcast TWT requester                     |
39383  * |----------------------------------------------------------------------|
39384  * |BIT4=1, BIT5=0  | Disable both Individual and broadcast TWT responder |
39385  * |----------------------------------------------------------------------|
39386  * |BIT4=1, BIT5=1  | Disable Broadcast TWT responder                     |
39387  * |----------------------------------------------------------------------|
39388  *
39389  * If user has enabled only individual requester at any point and after
39390  * sometime if user wants to enable broadcast requester then user cannot
39391  * directly send another WMI_TWT_ENABLE_CMDID with broadcast configuration,
39392  * user has to disable TWT requester first and then enable both individual
39393  * requester and broadcast requester. Same way for RESPONDER.
39394  *
39395  */
39396 /* 0: requester; 1: responder */
39397 #define TWT_EN_DIS_FLAGS_GET_REQ_RESP(flag)      WMI_GET_BITS(flag, 4, 1)
39398 #define TWT_EN_DIS_FLAGS_SET_REQ_RESP(flag, val) WMI_SET_BITS(flag, 4, 1, val)
39399 
39400 /* 0: iTWT; 1: bTWT */
39401 #define TWT_EN_DIS_FLAGS_GET_I_B_TWT(flag)      WMI_GET_BITS(flag, 5, 1)
39402 #define TWT_EN_DIS_FLAGS_SET_I_B_TWT(flag, val) WMI_SET_BITS(flag, 5, 1, val)
39403 
39404 /* 0: bTWT; 1: rTWT */
39405 #define TWT_EN_DIS_FLAGS_GET_B_R_TWT(flag)      WMI_GET_BITS(flag, 6, 1)
39406 #define TWT_EN_DIS_FLAGS_SET_B_R_TWT(flag, val) WMI_SET_BITS(flag, 6, 1, val)
39407 
39408 /*
39409  * disable autonomous bTWT session delete feature
39410  * This feature will delete client triggered session when number of clients
39411  * joined decreases to 0.
39412  */
39413 #define TWT_EN_DIS_FLAGS_GET_DIS_BTWT_AUTO_DELETE(flag) \
39414     WMI_GET_BITS(flag, 7, 1)
39415 #define TWT_EN_DIS_FLAGS_SET_DIS_BTWT_AUTO_DELETE(flag, val) \
39416     WMI_SET_BITS(flag, 7, 1, val)
39417 
39418 typedef struct {
39419     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_cmd_fixed_param  */
39420     /** 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
39421      */
39422     A_UINT32 pdev_id;
39423     A_UINT32 sta_cong_timer_ms;     /* STA TWT congestion timer TO value in terms of ms */
39424     A_UINT32 mbss_support;          /* Reserved */
39425     A_UINT32 default_slot_size;              /* This is the default value for the TWT slot setup by AP (units = microseconds) */
39426     A_UINT32 congestion_thresh_setup;        /* Minimum congestion required to start setting up TWT sessions */
39427     /*
39428      * The congestion parameters below are in percent of occupied airtime.
39429      */
39430     A_UINT32 congestion_thresh_teardown;     /* Minimum congestion below which TWT will be torn down */
39431     A_UINT32 congestion_thresh_critical;     /* Threshold above which TWT will not be active */
39432     /*
39433      * The interference parameters below use an abstract method of evaluating
39434      * interference.  The parameters are in percent, ranging from 0 for no
39435      * interference, to 100 for interference extreme enough to completely
39436      * block the signal of interest.
39437      */
39438     A_UINT32 interference_thresh_teardown;   /* Minimum interference above that TWT will not be active */
39439     A_UINT32 interference_thresh_setup;      /* Minimum interference below that TWT session can be setup */
39440     A_UINT32 min_no_sta_setup;               /* Minimum no of STA required to start TWT setup */
39441     A_UINT32 min_no_sta_teardown;            /* Minimum no of STA below which TWT will be torn down */
39442     A_UINT32 no_of_bcast_mcast_slots;        /* Number of default slot sizes reserved for BCAST/MCAST delivery */
39443     A_UINT32 min_no_twt_slots;               /* Minimum no of available slots for TWT to be operational */
39444     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) */
39445     /*
39446      * The below interval parameters have units of milliseconds.
39447      */
39448     A_UINT32 mode_check_interval;            /* Interval between two successive check to decide the mode of TWT */
39449     A_UINT32 add_sta_slot_interval;          /* Interval between decisions making to create TWT slots for STAs */
39450     A_UINT32 remove_sta_slot_interval;       /* Interval between decisions making to remove TWT slot of STAs */
39451     A_UINT32 flags;                          /* enable/disable flags, refer to MACROs TWT_EN_DIS_FLAGS_* (TWT_EN_DIS_FLAGS_GET_BTWT etc.) */
39452 } wmi_twt_enable_cmd_fixed_param;
39453 
39454 /* status code of enabling TWT */
39455 typedef enum _WMI_ENABLE_TWT_STATUS_T {
39456     WMI_ENABLE_TWT_STATUS_OK,              /* enabling TWT successfully completed */
39457     WMI_ENABLE_TWT_STATUS_ALREADY_ENABLED, /* TWT already enabled */
39458     WMI_ENABLE_TWT_STATUS_NOT_READY,       /* FW not ready for enabling TWT */
39459     WMI_ENABLE_TWT_INVALID_PARAM,          /* invalid parameters */
39460     WMI_ENABLE_TWT_STATUS_UNKNOWN_ERROR,   /* enabling TWT failed with an unknown reason */
39461 } WMI_ENABLE_TWT_STATUS_T;
39462 
39463 typedef struct {
39464     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_complete_event_fixed_param */
39465     /** 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 */
39466     A_UINT32 pdev_id;
39467     A_UINT32 status;        /* WMI_ENABLE_TWT_STATUS_T */
39468 } wmi_twt_enable_complete_event_fixed_param;
39469 
39470 typedef struct {
39471     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_cmd_fixed_param  */
39472     /** 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 */
39473     A_UINT32 pdev_id;       /* host should never set it to WMI_PDEV_ID_SOC  */
39474     A_UINT32 flags;         /* enable/disable flags, refer to MACROs TWT_EN_DIS_FLAGS_* (TWT_EN_DIS_FLAGS_GET_BTWT etc.) */
39475     A_UINT32 reason_code;   /* refer to WMI_DISABLE_TWT_REASON_T */
39476 } wmi_twt_disable_cmd_fixed_param;
39477 
39478 typedef struct {
39479     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_complete_event_fixed_param */
39480     A_UINT32 pdev_id;
39481     A_UINT32 status; /* refer to WMI_DISABLE_TWT_STATUS_T enum */
39482 } wmi_twt_disable_complete_event_fixed_param;
39483 
39484 typedef struct {
39485     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_vdev_config_cmd_fixed_param */
39486     /** pdev_id for identifying the MAC.
39487      * See macros starting with WMI_PDEV_ID_ for values.
39488      */
39489     A_UINT32 pdev_id;
39490     A_UINT32 vdev_id;
39491     /* TWT support flag to be applied to the vdev
39492      * 0 = ITWT, BTWT and RTWT are disabled.
39493      * 1 = ITWT is enabled
39494      * 2 = ITWT and BTWT are enabled
39495      * 3 = ITWT, BTWT and RTWT are enabled
39496      */
39497     A_UINT32 twt_support;
39498 } wmi_twt_vdev_config_cmd_fixed_param;
39499 
39500 /* status code of TWT Disable */
39501 typedef enum _WMI_DISABLE_TWT_STATUS_T {
39502     WMI_DISABLE_TWT_STATUS_OK,                  /*  Disabling TWT successfully completed */
39503     WMI_DISABLE_TWT_STATUS_ROAM_IN_PROGRESS,    /* Roaming in progress */
39504     WMI_DISABLE_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
39505     WMI_DISABLE_TWT_STATUS_SCAN_IN_PROGRESS,    /* Scan in progress */
39506 } WMI_DISABLE_TWT_STATUS_T;
39507 
39508 /* Host reason code of TWT Disable command : Set by Host */
39509 typedef enum _WMI_DISABLE_TWT_REASON_T {
39510     /* Host will set one of below reason code while disabling TWT */
39511     WMI_DISABLE_TWT_REASON_NONE,                        /* Normal case */
39512     WMI_DISABLE_TWT_REASON_CONCURRENCY_SCC,             /* Concurrency case SCC */
39513     WMI_DISABLE_TWT_REASON_CONCURRENCY_MCC,             /* Concurrency case MCC */
39514     WMI_DISABLE_TWT_REASON_CHANGE_CONGESTION_TIMEOUT,   /* To change congestion time */
39515     WMI_DISABLE_TWT_REASON_P2P_GO_NOA,                  /* P2P GO NOA reason */
39516 } WMI_DISABLE_TWT_REASON_T;
39517 
39518 /* Notification event ID to Host */
39519 typedef enum _WMI_TWT_NOTIFICATION_ID_T {
39520     WMI_TWT_NOTIFY_EVENT_READY = 1,
39521     WMI_TWT_NOTIFY_EVENT_AP_TWT_REQ_BIT_SET = 2,
39522     WMI_TWT_NOTIFY_EVENT_AP_TWT_REQ_BIT_CLEAR = 3,
39523 } WMI_TWT_NOTIFICATION_ID_T;
39524 
39525 typedef struct {
39526     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_notify_event_fixed_param */
39527     A_UINT32 vdev_id;      /* vdev id of TWT notify event */
39528     A_UINT32 event_id;     /* refer to WMI_TWT_NOTIFICATION_ID_T */
39529 } wmi_twt_notify_event_fixed_param;
39530 
39531 /* from IEEE 802.11ah section 9.4.2.200 */
39532 typedef enum _WMI_TWT_COMMAND_T {
39533     WMI_TWT_COMMAND_REQUEST_TWT    = 0,
39534     WMI_TWT_COMMAND_SUGGEST_TWT    = 1,
39535     WMI_TWT_COMMAND_DEMAND_TWT     = 2,
39536     WMI_TWT_COMMAND_TWT_GROUPING   = 3,
39537     WMI_TWT_COMMAND_ACCEPT_TWT     = 4,
39538     WMI_TWT_COMMAND_ALTERNATE_TWT  = 5,
39539     WMI_TWT_COMMAND_DICTATE_TWT    = 6,
39540     WMI_TWT_COMMAND_REJECT_TWT     = 7,
39541 } WMI_TWT_COMMAND_T;
39542 
39543 /* TWT command, refer to WMI_TWT_COMMAND_T */
39544 #define TWT_FLAGS_GET_CMD(flag)                 WMI_GET_BITS(flag, 0, 8)
39545 #define TWT_FLAGS_SET_CMD(flag, val)            WMI_SET_BITS(flag, 0, 8, val)
39546 
39547 /* 0 means Individual TWT, 1 means Broadcast TWT */
39548 #define TWT_FLAGS_GET_BROADCAST(flag)           WMI_GET_BITS(flag, 8, 1)
39549 #define TWT_FLAGS_SET_BROADCAST(flag, val)      WMI_SET_BITS(flag, 8, 1, val)
39550 
39551 /* 0 means non-Trigger-enabled TWT, 1 means  means Trigger-enabled TWT */
39552 #define TWT_FLAGS_GET_TRIGGER(flag)             WMI_GET_BITS(flag, 9, 1)
39553 #define TWT_FLAGS_SET_TRIGGER(flag, val)        WMI_SET_BITS(flag, 9, 1, val)
39554 
39555 /* flow type 0 means announced TWT, 1 means un-announced TWT */
39556 #define TWT_FLAGS_GET_FLOW_TYPE(flag)           WMI_GET_BITS(flag, 10, 1)
39557 #define TWT_FLAGS_SET_FLOW_TYPE(flag, val)      WMI_SET_BITS(flag, 10, 1, val)
39558 
39559 /* 0 means TWT protection is required, 1 means TWT protection is not required */
39560 #define TWT_FLAGS_GET_PROTECTION(flag)          WMI_GET_BITS(flag, 11, 1)
39561 #define TWT_FLAGS_SET_PROTECTION(flag, val)     WMI_SET_BITS(flag, 11, 1, val)
39562 
39563 /* B-TWT ID 0: 0 means non-0 B-TWT ID or I-TWT, 1 means B-TWT ID 0 */
39564 #define TWT_FLAGS_GET_BTWT_ID0(flag)            WMI_GET_BITS(flag, 12, 1)
39565 #define TWT_FLAGS_SET_BTWT_ID0(flag, val)       WMI_SET_BITS(flag, 12, 1, val)
39566 
39567 /* 0 means TWT Information frame is enabled, 1 means TWT Information frame is disabled */
39568 #define TWT_FLAGS_GET_TWT_INFO_FRAME_DISABLED(flag)      WMI_GET_BITS(flag, 13, 1)
39569 #define TWT_FLAGS_SET_TWT_INFO_FRAME_DISABLED(flag, val) WMI_SET_BITS(flag, 13, 1, val)
39570 
39571 /*
39572  * 1 means PM_RESPONDER_MODE information sent in BIT15 is valid, 0 means it is not valid.
39573  * Will be used for backward compatibility if host uses older FW versions
39574  * then value will be 0 so host will not consider the BIT15 value.
39575  */
39576 #define TWT_FLAGS_GET_PM_RESPONDER_MODE_VALID(flag)      WMI_GET_BITS(flag, 14, 1)
39577 #define TWT_FLAGS_SET_PM_RESPONDER_MODE_VALID(flag, val) WMI_SET_BITS(flag, 14, 1, val)
39578 
39579 /* 1 means PM_RESPONDER_MODE supported, 0 means not supported */
39580 #define TWT_FLAGS_GET_PM_RESPONDER_MODE(flag)      WMI_GET_BITS(flag, 15, 1)
39581 #define TWT_FLAGS_SET_PM_RESPONDER_MODE(flag, val) WMI_SET_BITS(flag, 15, 1, val)
39582 
39583 typedef struct {
39584     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_ack_event_fixed_param */
39585     A_UINT32 vdev_id;       /* VDEV identifier */
39586     wmi_mac_addr peer_macaddr; /* peer MAC address */
39587     A_UINT32 dialog_id;     /* TWT dialog ID */
39588     A_UINT32 twt_cmd;       /* TWT command for which this ack is sent */
39589     A_UINT32 status;        /* Status code corresponding to twt_cmd.
39590                              * This status field contains a value from the
39591                              * status enum corresponding to the twt_cmd type
39592                              * (WMI_ADD_TWT_STATUS_T, WMI_DEL_TWT_STATUS_T,
39593                              * WMI_PAUSE_TWT_STATUS_T, etc.)
39594                              */
39595 } wmi_twt_ack_event_fixed_param;
39596 
39597 typedef struct {
39598     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_cmd_fixed_param  */
39599     A_UINT32 vdev_id;       /* VDEV identifier */
39600     wmi_mac_addr peer_macaddr;      /* peer MAC address */
39601     A_UINT32 dialog_id; /* TWT dialog_id (< 0xFF) is per peer, I-TWT & B-TWT use different diaglog ID */
39602 
39603     /* 1. wake_intvl_mantis must be <= 0xFFFF
39604      * 2. wake_intvl_us must be divided evenly by wake_intvl_mantis,
39605      *    i.e., wake_intvl_us % wake_intvl_mantis == 0
39606      * 3. the quotient of wake_intvl_us/wake_intvl_mantis must be 2 to N-th(0<=N<=31) power,
39607      *    i.e., wake_intvl_us/wake_intvl_mantis == 2^N, 0<=N<=31
39608      */
39609     A_UINT32 wake_intvl_us;         /* TWT Wake Interval in units of us */
39610     A_UINT32 wake_intvl_mantis;     /* TWT Wake Interval Mantissa */
39611 
39612     /* wake_dura_us must be divided evenly by 256, i.e., wake_dura_us % 256 == 0 */
39613     A_UINT32 wake_dura_us;          /* TWT Wake Duration in units of us, must be <= 65280 (0xFF00) */
39614 
39615     A_UINT32 sp_offset_us;          /* this long time after TWT setup the 1st SP will start */
39616     A_UINT32 flags;                 /* TWT flags, refer to MACROs TWT_FLAGS_*(TWT_FLAGS_GET_CMD etc) */
39617 
39618     /* Broadcast TWT(B-TWT) Persistence, when used in Add/update Dialog,
39619      * indicates for how long(in units of TBTTs) current B-TWT session
39620      * parameters will not be changed.
39621      * Refer to 11ax spec session "9.4.2.199 TWT element" for more info.
39622      */
39623     A_UINT32 b_twt_persistence;
39624 
39625     /* Broadcast TWT(B-TWT) Recommendation, refer to section
39626      * "9.4.2.199 TWT element" of latest 11ax draft
39627      */
39628     A_UINT32 b_twt_recommendation;
39629 
39630     /* Min tolerance limit of wake interval.
39631      * If this variable is set to 0 by host, FW will ignore it.
39632      */
39633     A_UINT32 min_wake_intvl_us;
39634 
39635    /* Max tolerance limit of wake interval.
39636     * If this variable is set to 0 by host, FW will ignore it.
39637     */
39638     A_UINT32 max_wake_intvl_us;
39639 
39640    /* Min tolerance limit of wake duration.
39641     * If this variable is set to 0 by host, FW will ignore it.
39642     */
39643     A_UINT32 min_wake_dura_us;
39644 
39645    /* Max tolerance limit of wake duration.
39646     * If this variable is set to 0 by host, FW will ignore it.
39647     */
39648     A_UINT32 max_wake_dura_us;
39649 
39650     /*
39651      * Service period start TSF (absolute)
39652      * If sp_start_tsf_lo == sp_start_tsf_hi == 0, the specification
39653      * is invalid, and shall be ignored.
39654      */
39655     A_UINT32 sp_start_tsf_lo; /* bits 31:0 */
39656     A_UINT32 sp_start_tsf_hi; /* bits 63:32 */
39657 
39658     /*
39659      * In announced mode, wait for announce timeout before explicit announce
39660      * using QoS NULL.
39661      * If set to 0, FW will send QoS NULL immediately.
39662      */
39663     A_UINT32 announce_timeout_us;
39664 
39665     A_UINT32 link_id_bitmap;
39666 
39667     /* parameters required for R-TWT feature */
39668     A_UINT32 r_twt_dl_tid_bitmap;
39669     A_UINT32 r_twt_ul_tid_bitmap;
39670 } wmi_twt_add_dialog_cmd_fixed_param;
39671 
39672 /* status code of adding TWT dialog */
39673 typedef enum _WMI_ADD_TWT_STATUS_T {
39674     WMI_ADD_TWT_STATUS_OK,                  /* adding TWT dialog successfully completed */
39675     WMI_ADD_TWT_STATUS_TWT_NOT_ENABLED,     /* TWT not enabled */
39676     WMI_ADD_TWT_STATUS_USED_DIALOG_ID,      /* TWT dialog ID is already used */
39677     WMI_ADD_TWT_STATUS_INVALID_PARAM,       /* invalid parameters */
39678     WMI_ADD_TWT_STATUS_NOT_READY,           /* FW not ready */
39679     WMI_ADD_TWT_STATUS_NO_RESOURCE,         /* FW resource exhausted */
39680     WMI_ADD_TWT_STATUS_NO_ACK,              /* peer AP/STA did not ACK the request/response frame */
39681     WMI_ADD_TWT_STATUS_NO_RESPONSE,         /* peer AP did not send the response frame */
39682     WMI_ADD_TWT_STATUS_DENIED,              /* AP did not accept the request */
39683     WMI_ADD_TWT_STATUS_UNKNOWN_ERROR,       /* adding TWT dialog failed with an unknown reason */
39684     WMI_ADD_TWT_STATUS_AP_PARAMS_NOT_IN_RANGE,  /* peer AP wake interval, duration not in range */
39685     WMI_ADD_TWT_STATUS_AP_IE_VALIDATION_FAILED, /* peer AP IE Validation Failed */
39686     WMI_ADD_TWT_STATUS_ROAM_IN_PROGRESS,    /* Roaming in progress */
39687     WMI_ADD_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
39688     WMI_ADD_TWT_STATUS_SCAN_IN_PROGRESS,    /* Scan in progress */
39689     WMI_ADD_TWT_STATUS_DIALOG_ID_BUSY,      /* FW is in the process of handling this dialog */
39690     WMI_ADD_TWT_STATUS_BTWT_NOT_ENBABLED,   /* Broadcast TWT is not enabled */
39691     WMI_ADD_TWT_STATUS_RTWT_NOT_ENBABLED,   /* Restricted TWT is not enabled */
39692     WMI_ADD_TWT_STATUS_LINK_SWITCH_IN_PROGRESS, /* Link switch is ongoing */
39693     WMI_ADD_TWT_STATUS_UNSUPPORTED_MODE_MLMR,   /* Unsupported in MLMR mode */
39694 } WMI_ADD_TWT_STATUS_T;
39695 
39696 typedef struct {
39697     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_additional_params */
39698     A_UINT32 flags;         /* TWT flags, refer to MACROs TWT_FLAGS_*(TWT_FLAGS_GET_CMD etc) */
39699     A_UINT32 wake_dur_us;   /* Wake duration in uS */
39700     A_UINT32 wake_intvl_us; /* Wake Interval in uS */
39701     A_UINT32 sp_offset_us;  /* SP Starting Offset */
39702     A_UINT32 sp_tsf_us_lo;  /* SP start TSF bits 31:0 */
39703     A_UINT32 sp_tsf_us_hi;  /* SP start TSF bits 63:32 */
39704 } wmi_twt_add_dialog_additional_params;
39705 
39706 typedef struct {
39707     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_complete_event_fixed_param */
39708     A_UINT32 vdev_id;       /* VDEV identifier */
39709     wmi_mac_addr peer_macaddr; /* peer MAC address */
39710     A_UINT32 dialog_id;     /* TWT dialog ID */
39711     A_UINT32 status;        /* refer to WMI_ADD_TWT_STATUS_T */
39712 /*
39713  * This fixed_param TLV is followed by the below TLVs:
39714  * wmi_twt_add_dialog_additional_params twt_params[]; // TWT params received
39715  *                                                    // from peer
39716  */
39717 } wmi_twt_add_dialog_complete_event_fixed_param;
39718 
39719 typedef struct {
39720     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_cmd_fixed_param  */
39721     A_UINT32 vdev_id;       /* VDEV identifier */
39722     wmi_mac_addr peer_macaddr; /* peer MAC address */
39723     A_UINT32 dialog_id;     /* TWT dialog ID */
39724     /* Broadcast TWT(B-TWT) Persistence, when used in Del Dialog,
39725      * indicates for how long(in units of TBTTs) current B-TWT session
39726      * parameters will be present.
39727      * Refer to 11ax spec session "9.4.2.199 TWT element" for more info.
39728      */
39729     A_UINT32 b_twt_persistence;
39730     A_UINT32 is_bcast_twt;
39731 } wmi_twt_del_dialog_cmd_fixed_param;
39732 
39733 /* status code of deleting TWT dialog */
39734 typedef enum _WMI_DEL_TWT_STATUS_T {
39735     WMI_DEL_TWT_STATUS_OK,                  /* deleting TWT dialog successfully completed */
39736     WMI_DEL_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
39737     WMI_DEL_TWT_STATUS_INVALID_PARAM,       /* invalid parameters */
39738     WMI_DEL_TWT_STATUS_DIALOG_ID_BUSY,      /* FW is in the process of handling this dialog */
39739     WMI_DEL_TWT_STATUS_NO_RESOURCE,         /* FW resource exhausted */
39740     WMI_DEL_TWT_STATUS_NO_ACK,              /* peer AP/STA did not ACK the request/response frame */
39741     WMI_DEL_TWT_STATUS_UNKNOWN_ERROR,       /* deleting TWT dialog failed with an unknown reason */
39742     WMI_DEL_TWT_STATUS_PEER_INIT_TEARDOWN,  /* Peer Initiated Teardown */
39743     WMI_DEL_TWT_STATUS_ROAMING,             /* Reason Roaming Start*/
39744     WMI_DEL_TWT_STATUS_CONCURRENCY,         /* Teardown due to concurrency */
39745     WMI_DEL_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
39746     WMI_DEL_TWT_STATUS_SCAN_IN_PROGRESS,    /* Reason Scan in progress */
39747     WMI_DEL_TWT_STATUS_CHANGE_CONGESTION_TIMEOUT,   /* Congestion timeout changed */
39748     WMI_DEL_TWT_STATUS_P2P_GO_NOA,                  /* P2P GO NOA */
39749 } WMI_DEL_TWT_STATUS_T;
39750 
39751 typedef struct {
39752     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_complete_event_fixed_param */
39753     A_UINT32 vdev_id;       /* VDEV identifier */
39754     wmi_mac_addr peer_macaddr; /* peer MAC address */
39755     A_UINT32 dialog_id;     /* TWT dialog ID */
39756     A_UINT32 status;        /* refer to WMI_DEL_TWT_STATUS_T */
39757 } wmi_twt_del_dialog_complete_event_fixed_param;
39758 
39759 typedef struct {
39760     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_cmd_fixed_param  */
39761     A_UINT32 vdev_id;       /* VDEV identifier */
39762     wmi_mac_addr peer_macaddr; /* peer MAC address */
39763     A_UINT32 dialog_id;     /* TWT dialog ID */
39764 } wmi_twt_pause_dialog_cmd_fixed_param;
39765 
39766 /* status code of pausing TWT dialog */
39767 typedef enum _WMI_PAUSE_TWT_STATUS_T {
39768     WMI_PAUSE_TWT_STATUS_OK,                  /* pausing TWT dialog successfully completed */
39769     WMI_PAUSE_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
39770     WMI_PAUSE_TWT_STATUS_INVALID_PARAM,       /* invalid parameters */
39771     WMI_PAUSE_TWT_STATUS_DIALOG_ID_BUSY,      /* FW is in the process of handling this dialog */
39772     WMI_PAUSE_TWT_STATUS_NO_RESOURCE,         /* FW resource exhausted */
39773     WMI_PAUSE_TWT_STATUS_NO_ACK,              /* peer AP/STA did not ACK the request/response frame */
39774     WMI_PAUSE_TWT_STATUS_UNKNOWN_ERROR,       /* pausing TWT dialog failed with an unknown reason */
39775     WMI_PAUSE_TWT_STATUS_ALREADY_PAUSED,      /* The TWT dialog is already paused */
39776     WMI_PAUSE_TWT_STATUS_TWT_INFO_FRM_NOT_SUPPORTED, /* TWT information frame is not supported by AP */
39777     WMI_PAUSE_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
39778     WMI_PAUSE_TWT_STATUS_ROAM_IN_PROGRESS,    /* Roam in progress */
39779     WMI_PAUSE_TWT_STATUS_SCAN_IN_PROGRESS,    /* Scan in progress */
39780 } WMI_PAUSE_TWT_STATUS_T;
39781 
39782 typedef struct {
39783     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_complete_event_fixed_param */
39784     A_UINT32 vdev_id;       /* VDEV identifier */
39785     wmi_mac_addr peer_macaddr; /* peer MAC address */
39786     A_UINT32 dialog_id;     /* TWT dialog ID */
39787     A_UINT32 status;        /* refer to WMI_PAUSE_TWT_STATUS_T */
39788 } wmi_twt_pause_dialog_complete_event_fixed_param;
39789 
39790 typedef struct {
39791     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_cmd_fixed_param  */
39792     A_UINT32 vdev_id;       /* VDEV identifier */
39793     wmi_mac_addr peer_macaddr; /* peer MAC address */
39794     A_UINT32 dialog_id;     /* TWT dialog ID */
39795     A_UINT32 sp_offset_us;  /* this long time after TWT resumed the 1st SP will start */
39796     A_UINT32 next_twt_size; /* Next TWT subfield Size, refer to IEEE 802.11ax section "9.4.1.60 TWT Information field" */
39797 } wmi_twt_resume_dialog_cmd_fixed_param;
39798 
39799 /* status code of resuming TWT dialog */
39800 typedef enum _WMI_RESUME_TWT_STATUS_T {
39801     WMI_RESUME_TWT_STATUS_OK,                  /* resuming TWT dialog successfully completed */
39802     WMI_RESUME_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
39803     WMI_RESUME_TWT_STATUS_INVALID_PARAM,       /* invalid parameters */
39804     WMI_RESUME_TWT_STATUS_DIALOG_ID_BUSY,      /* FW is in the process of handling this dialog */
39805     WMI_RESUME_TWT_STATUS_NOT_PAUSED,          /* dialog not paused currently */
39806     WMI_RESUME_TWT_STATUS_NO_RESOURCE,         /* FW resource exhausted */
39807     WMI_RESUME_TWT_STATUS_NO_ACK,              /* peer AP/STA did not ACK the request/response frame */
39808     WMI_RESUME_TWT_STATUS_UNKNOWN_ERROR,       /* resuming TWT dialog failed with an unknown reason */
39809     WMI_RESUME_TWT_STATUS_TWT_INFO_FRM_NOT_SUPPORTED, /* TWT information frame is not supported by AP */
39810     WMI_RESUME_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
39811     WMI_RESUME_TWT_STATUS_ROAM_IN_PROGRESS,    /* Roam in progress */
39812     WMI_RESUME_TWT_STATUS_SCAN_IN_PROGRESS,    /* Scan in progress */
39813 } WMI_RESUME_TWT_STATUS_T;
39814 
39815 typedef struct {
39816     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_complete_event_fixed_param */
39817     A_UINT32 vdev_id;       /* VDEV identifier */
39818     wmi_mac_addr peer_macaddr; /* peer MAC address */
39819     A_UINT32 dialog_id;     /* TWT dialog ID */
39820     A_UINT32 status;        /* refer to WMI_RESUME_TWT_STATUS_T */
39821 } wmi_twt_resume_dialog_complete_event_fixed_param;
39822 
39823 typedef struct {
39824     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_nudge_dialog_cmd_fixed_param  */
39825     A_UINT32 vdev_id;       /* VDEV identifier */
39826     wmi_mac_addr peer_macaddr; /* peer MAC address */
39827     A_UINT32 dialog_id;     /* TWT dialog ID */
39828     A_UINT32 suspend_duration_ms;  /* this long time after TWT paused the 1st SP will start (millisecond) */
39829     A_UINT32 next_twt_size; /* Next TWT subfield Size, refer to IEEE 802.11ax section "9.4.1.60 TWT Information field" */
39830     A_INT32 sp_start_offset; /* Next TWT service period will be offset by this time (microsecond) */
39831 } wmi_twt_nudge_dialog_cmd_fixed_param;
39832 
39833 /* status code of nudging TWT dialog */
39834 typedef enum _WMI_TWT_NUDGE_STATUS_T {
39835     WMI_NUDGE_TWT_STATUS_OK,                  /* nudging TWT dialog successfully completed */
39836     WMI_NUDGE_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID doesn't exist */
39837     WMI_NUDGE_TWT_STATUS_INVALID_PARAM,       /* invalid parameters */
39838     WMI_NUDGE_TWT_STATUS_DIALOG_ID_BUSY,      /* FW is in the process of handling this dialog */
39839     WMI_NUDGE_TWT_STATUS_NO_RESOURCE,         /* FW resource exhausted */
39840     WMI_NUDGE_TWT_STATUS_NO_ACK,              /* peer AP/STA did not ACK the request/response frame */
39841     WMI_NUDGE_TWT_STATUS_UNKNOWN_ERROR,       /* nudging TWT dialog failed with an unknown reason */
39842     WMI_NUDGE_TWT_STATUS_ALREADY_PAUSED,      /* The TWT dialog is already paused */
39843     WMI_NUDGE_TWT_STATUS_TWT_INFO_FRM_NOT_SUPPORTED, /* TWT information frame is not supported by AP */
39844     WMI_NUDGE_TWT_STATUS_CHAN_SW_IN_PROGRESS, /* Channel switch in progress */
39845     WMI_NUDGE_TWT_STATUS_ROAM_IN_PROGRESS,    /* Roam in progress */
39846     WMI_NUDGE_TWT_STATUS_SCAN_IN_PROGRESS,    /* Scan in progress */
39847 } WMI_TWT_NUDGE_STATUS_T;
39848 
39849 typedef struct {
39850     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_nudge_dialog_complete_event_fixed_param */
39851     A_UINT32 vdev_id;       /* VDEV identifier */
39852     wmi_mac_addr peer_macaddr; /* peer MAC address */
39853     A_UINT32 dialog_id;     /* TWT dialog ID */
39854     A_UINT32 status;        /* refer to WMI_NUDGE_TWT_STATUS_T */
39855     A_UINT32 sp_tsf_us_lo;  /* SP resume TSF bits 31:0 */
39856     A_UINT32 sp_tsf_us_hi;  /* SP resume TSF bits 63:32 */
39857 } wmi_twt_nudge_dialog_complete_event_fixed_param;
39858 
39859 typedef struct {
39860     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_btwt_invite_sta_cmd_fixed_param  */
39861     A_UINT32 vdev_id;       /* VDEV identifier */
39862     wmi_mac_addr peer_macaddr; /* peer MAC address */
39863     A_UINT32 dialog_id;     /* TWT dialog ID */
39864     /* parameters required for R-TWT feature */
39865     A_UINT32 r_twt_dl_tid_bitmap;
39866     A_UINT32 r_twt_ul_tid_bitmap;
39867 } wmi_twt_btwt_invite_sta_cmd_fixed_param;
39868 
39869 /* status code of inviting STA to B-TWT dialog */
39870 typedef enum _WMI_TWT_BTWT_INVITE_STA_STATUS_T {
39871     WMI_TWT_BTWT_INVITE_STA_STATUS_OK,                  /* inviting STA to B-TWT successfully completed */
39872     WMI_TWT_BTWT_INVITE_STA_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
39873     WMI_TWT_BTWT_INVITE_STA_STATUS_INVALID_PARAM,       /* invalid parameters */
39874     WMI_TWT_BTWT_INVITE_STA_STATUS_DIALOG_ID_BUSY,      /* FW is in the process of handling this dialog */
39875     WMI_TWT_BTWT_INVITE_STA_STATUS_ALREADY_JOINED,      /* peer STA already joined the session */
39876     WMI_TWT_BTWT_INVITE_STA_STATUS_NO_RESOURCE,         /* FW resource exhausted */
39877     WMI_TWT_BTWT_INVITE_STA_STATUS_NO_ACK,              /* peer STA did not ACK the request/response frame */
39878     WMI_TWT_BTWT_INVITE_STA_STATUS_UNKNOWN_ERROR,       /* failed with an unknown reason */
39879 } WMI_TWT_BTWT_INVITE_STA_STATUS_T;
39880 
39881 typedef struct {
39882     A_UINT32 tlv_header;    /* TLV tag and len; tag equals wmi_twt_btwt_invite_sta_complete_event_fixed_param */
39883     A_UINT32 vdev_id;       /* VDEV identifier */
39884     wmi_mac_addr peer_macaddr; /* peer MAC address */
39885     A_UINT32 dialog_id;     /* TWT dialog ID */
39886     A_UINT32 status;        /* refer to WMI_TWT_BTWT_INVITE_STA_STATUS_T */
39887 } wmi_twt_btwt_invite_sta_complete_event_fixed_param;
39888 
39889 typedef struct {
39890     A_UINT32 tlv_header;    /* TLV tag and len; tag equals wmi_twt_btwt_remove_sta_cmd_fixed_param  */
39891     A_UINT32 vdev_id;       /* VDEV identifier */
39892     wmi_mac_addr peer_macaddr; /* peer MAC address */
39893     A_UINT32 dialog_id;     /* TWT dialog ID */
39894     /* parameters required for R-TWT feature */
39895     A_UINT32 r_twt_dl_tid_bitmap;
39896     A_UINT32 r_twt_ul_tid_bitmap;
39897 } wmi_twt_btwt_remove_sta_cmd_fixed_param;
39898 
39899 /* status code of removing STA from B-TWT dialog */
39900 typedef enum _WMI_TWT_BTWT_REMOVE_STA_STATUS_T {
39901     WMI_TWT_BTWT_REMOVE_STA_STATUS_OK,                  /* removing STA from B-TWT successfully completed */
39902     WMI_TWT_BTWT_REMOVE_STA_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
39903     WMI_TWT_BTWT_REMOVE_STA_STATUS_INVALID_PARAM,       /* invalid parameters */
39904     WMI_TWT_BTWT_REMOVE_STA_STATUS_DIALOG_ID_BUSY,      /* FW is in the process of handling this dialog */
39905     WMI_TWT_BTWT_REMOVE_STA_STATUS_NOT_JOINED,          /* peer STA not joined yet */
39906     WMI_TWT_BTWT_REMOVE_STA_STATUS_NO_RESOURCE,         /* FW resource exhausted */
39907     WMI_TWT_BTWT_REMOVE_STA_STATUS_NO_ACK,              /* peer STA did not ACK the request/response frame */
39908     WMI_TWT_BTWT_REMOVE_STA_STATUS_UNKNOWN_ERROR,       /* failed with an unknown reason */
39909 } WMI_TWT_BTWT_REMOVE_STA_STATUS_T;
39910 
39911 typedef struct {
39912     A_UINT32 tlv_header;    /* TLV tag and len; tag equals wmi_twt_btwt_remove_sta_complete_event_fixed_param */
39913     A_UINT32 vdev_id;       /* VDEV identifier */
39914     wmi_mac_addr peer_macaddr; /* peer MAC address */
39915     A_UINT32 dialog_id;     /* TWT dialog ID */
39916     A_UINT32 status;        /* refer to WMI_TWT_BTWT_REMOVE_STA_STATUS_T */
39917 } wmi_twt_btwt_remove_sta_complete_event_fixed_param;
39918 
39919 typedef enum {
39920     WMI_DMA_RING_CONFIG_MODULE_SPECTRAL,
39921     WMI_DMA_RING_CONFIG_MODULE_RTT,
39922     WMI_DMA_RING_CONFIG_MODULE_CV_UPLOAD,
39923     WMI_DMA_RING_CONFIG_MODULE_WIFI_RADAR,
39924 } WMI_DMA_RING_SUPPORTED_MODULE;
39925 
39926 typedef struct {
39927     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_DMA_RING_CAPABILITIES */
39928     A_UINT32 pdev_id;
39929     A_UINT32 mod_id;     /* see WMI_DMA_RING_SUPPORTED_MODULE */
39930     A_UINT32 ring_elems_min; /* minimum spaces in the DMA ring for this pdev */
39931     A_UINT32 min_buf_size; /* minimum size in bytes of each buffer in the DMA ring */
39932     A_UINT32 min_buf_align; /* minimum alignment in bytes of each buffer in the DMA ring */
39933 
39934     /**************************************************************************
39935      * DON'T ADD ANY FURTHER FIELDS HERE -
39936      * It would cause the size of the READY_EXT message within some targets
39937      * to exceed the size of the buffer used for the message.
39938      **************************************************************************/
39939 } WMI_DMA_RING_CAPABILITIES;
39940 
39941 typedef struct {
39942     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_ wmi_chan_rf_characterization_info */
39943 
39944     /**
39945      * [7:0]  : channel metric -  0 = unusable, 1 = worst, 100 = best
39946      * [11:8] : channel BW - This bit-field uses values compatible with
39947      *          enum definitions used internally within the target's
39948      *          halphy code.  This bit field uses wmi_channel_width.
39949      * [15:12]: Reserved
39950      * [31:16]: Frequency - Center frequency of the channel for which
39951      *          the RF characterisation info applies (MHz)
39952      */
39953     A_UINT32 freq_info;
39954 
39955     /**************************************************************************
39956      * DON'T ADD ANY FURTHER FIELDS HERE -
39957      * It would cause the size of the READY_EXT message within some targets
39958      * to exceed the size of the buffer used for the message.
39959      **************************************************************************/
39960 } WMI_CHAN_RF_CHARACTERIZATION_INFO;
39961 
39962 #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC   0x000000ff
39963 #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC_S 0
39964 #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW            0x00000f00
39965 #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW_S          8
39966 #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ          0xffff0000
39967 #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ_S        16
39968 
39969 #define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_SET(dword,val) \
39970             WMI_F_RMW((dword)->freq_info,(val), \
39971             WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC)
39972 #define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_GET(dword) \
39973             WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC)
39974 
39975 #define WMI_CHAN_RF_CHARACTERIZATION_BW_SET(dword, val) \
39976             WMI_F_RMW((dword)->freq_info,(val), \
39977             WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW)
39978 #define WMI_CHAN_RF_CHARACTERIZATION_BW_GET(dword) \
39979             WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW)
39980 
39981 #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_SET(dword, val) \
39982             WMI_F_RMW((dword)->freq_info,(val), \
39983             WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ)
39984 
39985 #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_GET(dword) \
39986             WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ)
39987 
39988 typedef struct {
39989     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_COEX_FIX_CHANNEL_CAPABILITIES */
39990     /**************************************************************************
39991     * 1: SAP fix channel has higher priority than ACS
39992     * 0: SAP fix channel has lower priority than ACS
39993     **************************************************************************/
39994     A_UINT32 fix_channel_priority;
39995 } WMI_COEX_FIX_CHANNEL_CAPABILITIES;
39996 
39997 
39998 
39999 #define WMI_DMA_RING_PADDR_LO_S 0
40000 #define WMI_DMA_RING_PADDR_LO   0xffffffff
40001 
40002 #define WMI_DMA_RING_BASE_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
40003 #define WMI_DMA_RING_BASE_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
40004 
40005 #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
40006 #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
40007 
40008 #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
40009 #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
40010 
40011 #define WMI_DMA_RING_PADDR_HI_S 0
40012 #define WMI_DMA_RING_PADDR_HI   0xffff
40013 
40014 #define WMI_DMA_RING_BASE_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
40015 #define WMI_DMA_RING_BASE_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
40016 
40017 #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
40018 #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
40019 
40020 #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
40021 #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
40022 
40023 typedef struct {
40024     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_req_fixed_param */
40025     A_UINT32 pdev_id;
40026     A_UINT32 mod_id;            /* see WMI_DMA_RING_SUPPORTED_MODULE */
40027     /**
40028      * Bits 31:0:   base address of ring [31:0]
40029      */
40030     A_UINT32 base_paddr_lo;
40031     /**
40032      * Bits 15:0:   base address of ring [47:32]
40033      * Bits 31:16:  reserved (set to 0x0)
40034      */
40035     A_UINT32 base_paddr_hi;
40036     /**
40037      * Bits 31:0:   address of head index [31:0]
40038      */
40039     A_UINT32 head_idx_paddr_lo;
40040     /**
40041      * Bits 15:0:   address of head index [47:32]
40042      * Bits 31:16:  reserved (set to 0x0)
40043      */
40044     A_UINT32 head_idx_paddr_hi;
40045     /**
40046      * Bits 31:0:   address of tail index [31:0]
40047      */
40048     A_UINT32 tail_idx_paddr_lo;
40049     /**
40050      * Bits 15:0:   address of tail index [47:32]
40051      * Bits 31:16:  reserved (set to 0x0)
40052      */
40053     A_UINT32 tail_idx_paddr_hi;
40054     A_UINT32 num_elems;          /** Number of elems in the ring */
40055     A_UINT32 buf_size;           /** size of allocated buffer in bytes */
40056 
40057     A_UINT32 num_resp_per_event; /** Number of wmi_dma_buf_release_entry packed together */
40058 
40059     /**
40060      * This parameter specifies the timeout in milliseconds.
40061      * Target should timeout and send whatever resp it has if this time expires.
40062      */
40063     A_UINT32 event_timeout_ms;
40064 } wmi_dma_ring_cfg_req_fixed_param;
40065 
40066 typedef struct {
40067     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_rsp_fixed_param */
40068     A_UINT32 pdev_id;
40069     A_UINT32 mod_id;        /* see WMI_DMA_RING_SUPPORTED_MODULE */
40070     A_UINT32 cfg_status;    /** Configuration status; see A_STATUS */
40071 } wmi_dma_ring_cfg_rsp_fixed_param;
40072 
40073 typedef struct {
40074     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_fixed_param */
40075     A_UINT32 pdev_id;       /** ID of pdev whose DMA ring produced the data */
40076     A_UINT32 mod_id;        /* see WMI_DMA_RING_SUPPORTED_MODULE */
40077     A_UINT32 num_buf_release_entry;
40078     A_UINT32 num_meta_data_entry;
40079     /* This TLV is followed by another TLV of array of structs.
40080      * wmi_dma_buf_release_entry entries[num_buf_release_entry];
40081      * wmi_dma_buf_release_spectral_meta_data meta_datat[num_meta_data_entry];
40082      * wmi_dma_buf_release_cv_upload_meta_data cv_meta_data[num_meta_data_entry]
40083      * wmi_dma_buf_release_cqi_upload_meta_data
40084      *     cqi_meta_data[num_meta_data_entry]
40085      * wmi_dma_buf_release_wifi_radar_meta_data
40086      *     wifi_radar_meta_data[num_meta_data_entry]
40087      */
40088 } wmi_dma_buf_release_fixed_param;
40089 
40090 typedef struct {
40091     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_entry */
40092     /**
40093      * Bits 31:0:   address of data [31:0]
40094      */
40095     A_UINT32 paddr_lo;
40096     /**
40097      * Bits 11:0:   address of data [43:32]
40098      * Bits 31:12:  host context data [19:0]
40099      */
40100     A_UINT32 paddr_hi;
40101 } wmi_dma_buf_release_entry;
40102 
40103 typedef struct {
40104     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_spectral_meta_data */
40105     /**
40106      * meta data information.
40107      * Host uses the noise floor values as one of the major parameter
40108      * to classify the spectral data.
40109      * This information will not be provided by ucode unlike the fft reports
40110      * which gets DMAed to DDR buffer.
40111      * Hence sending the NF values in dBm units as meta data information.
40112      */
40113     A_INT32 noise_floor[WMI_MAX_CHAINS];
40114     /**
40115      * The time taken by target in micro seconds to complete the reset routine
40116      * and re-initiate the spectral scan.
40117      * If the delay is 0, the WAR to bookkeep the timestamp won't be exercised
40118      * in HOST.
40119      */
40120     A_UINT32 reset_delay;
40121     /**
40122      * Current center freq1 (MHz units)
40123      */
40124     A_UINT32 freq1;
40125     /**
40126      * Current center freq2 (MHz units)
40127      */
40128     A_UINT32 freq2;
40129     /**
40130      * Channel Width (MHz units)
40131      */
40132     A_UINT32 ch_width;
40133 } wmi_dma_buf_release_spectral_meta_data;
40134 
40135 typedef enum {
40136     NO_SCALING = 0, /* No bin scaling*/
40137     /**
40138      * scaled_bin_mag = bin_mag *
40139      *                  sqrt(10^(max(legacy_max_gain - default_agc_max_gain + low_level_offset - RSSI_corr,
40140      *                  (agc_total_gain_db < default_agc_max_gain) * high_level_offset)/10)) *
40141      *                  2^(DET{0,1,2}_SPECTRAL_SCAN_BIN_SCALE - legacy_spectral_scan_bin_scale)
40142      */
40143     AGC_GAIN_RSSI_CORR_BASED = 1,
40144 } WMI_SPECTRAL_SCALING_FORMULA_ID;
40145 
40146 typedef struct {
40147     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_bin_scaling_params */
40148     A_UINT32 pdev_id;   /* ID of pdev to which the scaling parameters are to be applied */
40149     WMI_SPECTRAL_SCALING_FORMULA_ID formula_id; /* Represets the formula to be used */
40150     A_UINT32 low_level_offset; /* low level offset for fine tuning the scaling factor based on RSSI and AGC gain */
40151     A_UINT32 high_level_offset; /* high level offset for fine tuning the scaling factor based on RSSI and AGC gain */
40152     A_UINT32 rssi_thr; /* RSSI threshold to be used to adjust the inband power of the given spectral report */
40153     A_UINT32 default_agc_max_gain;/* DEFAULT AGC MAX GAIN used. Fetched from register RXTD_RADAR_SBS_CTRL_1_L bits20:13 */
40154 
40155     /**************************************************************************
40156      * DON'T ADD ANY FURTHER FIELDS HERE -
40157      * It would cause the size of the READY_EXT message within some targets
40158      * to exceed the size of the buffer used for the message.
40159      **************************************************************************/
40160 } wmi_spectral_bin_scaling_params;
40161 
40162 #define WMI_SPECTRAL_BW_CAPS_GET(bw_caps, index) WMI_GET_BITS(bw_caps, index, 1)
40163 #define WMI_SPECTRAL_BW_CAPS_SET(bw_caps, index, value) WMI_SET_BITS(bw_caps, index, 1, value)
40164 
40165 #define WMI_SPECTRAL_FFT_SIZE_CAPS_GET(fft_size_caps, index) WMI_GET_BITS(ft_size_caps, index, 1)
40166 #define WMI_SPECTRAL_FFT_SIZE_CAPS_SET(fft_size_caps, index, value) WMI_SET_BITS(fft_size_caps, index, 1, value)
40167 
40168 typedef struct {
40169     A_UINT32 tlv_header;   /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_scan_bw_capabilities */
40170     A_UINT32 pdev_id;      /* ID of pdev for which the bandwidth capabilities are advertised */
40171     A_UINT32 sscan_mode;   /* scan mode to denote whether this is a normal/agile scan (refer to wmi_spectral_scan_mode) */
40172     A_UINT32 operating_bw; /* Operating bandwidth which supports the bandwidth capabilities,  as per enum wmi_channel_width */
40173     union {
40174         struct {           /* To indicate the scan bandwidths support for the operating bandwidth and scan mode */
40175             A_UINT32 supports_sscan_bw_20:1,
40176                      supports_sscan_bw_40:1,
40177                      supports_sscan_bw_80:1,
40178                      supports_sscan_bw_160:1,
40179                      supports_sscan_bw_80p80:1,
40180                      supports_sscan_bw_320:1,
40181                      reserved:26;
40182         };
40183         A_UINT32 supported_flags;
40184     };
40185 } wmi_spectral_scan_bw_capabilities;
40186 
40187 typedef struct {
40188     A_UINT32 tlv_header;  /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_fft_size_capabilities */
40189     A_UINT32 pdev_id;     /* ID of pdev for which the bandwidth capabilities are advertised */
40190     A_UINT32 sscan_bw;    /* sscan bandwidth, as per enum wmi_channel_width */
40191     union {
40192         struct {          /* To indicate the scan FFT sizes supported in the sscan bandwidth */
40193             A_UINT32 supports_fft_size_1:1,
40194                      supports_fft_size_2:1,
40195                      supports_fft_size_3:1,
40196                      supports_fft_size_4:1,
40197                      supports_fft_size_5:1,
40198                      supports_fft_size_6:1,
40199                      supports_fft_size_7:1,
40200                      supports_fft_size_8:1,
40201                      supports_fft_size_9:1,
40202                      supports_fft_size_10:1,
40203                      supports_fft_size_11:1,
40204                      reserved:21;
40205         };
40206         A_UINT32 supported_flags;
40207     };
40208 } wmi_spectral_fft_size_capabilities;
40209 
40210 typedef struct {
40211     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_ctl_failsafe_event_params */
40212     A_UINT32 pdev_id;   /* ID of pdev to which ctl failsafe status is sent */
40213     A_UINT32 ctl_FailsafeStatus; /* To indicate if Failsafe value is imposed on CTL. 0- Success, 1- Failsafe imposed */
40214 } wmi_pdev_ctl_failsafe_check_fixed_param;
40215 
40216 typedef struct {
40217     A_UINT32 tlv_header;  /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_runtime_dpd_recal_cmd_fixed_param  */
40218     A_UINT32 enable;      /* Enable/disable */
40219 
40220     /* Thermal Thresholds,
40221      * DPD recalibration will be triggered, when current temperature is
40222      * either greater than (tmpt_base_c + dlt_tmpt_c_h),
40223      * or less than (tmpt_base_c + dlt_tmpt_c_l).
40224      * Here tmpt_base_c is the temperature in centigrade when first run dpd calibration.
40225      */
40226     A_UINT32 dlt_tmpt_c_h;
40227     A_UINT32 dlt_tmpt_c_l;
40228 
40229     /* cooling_time_ms
40230      * The time (in milliseconds) expected to be needed for the unit
40231      * to cool from dlt_tmpt_c_h to dlt_tmpt_c_l.
40232      */
40233     A_UINT32 cooling_time_ms;
40234 
40235     /*  Max duration for dpd re-cal. Unit: ms */
40236     A_UINT32 dpd_dur_max_ms;
40237 } wmi_runtime_dpd_recal_cmd_fixed_param;
40238 
40239 typedef enum {
40240     WMI_ROAM_TRIGGER_REASON_NONE = 0,
40241     WMI_ROAM_TRIGGER_REASON_PER,
40242     WMI_ROAM_TRIGGER_REASON_BMISS,
40243     WMI_ROAM_TRIGGER_REASON_LOW_RSSI,
40244     WMI_ROAM_TRIGGER_REASON_HIGH_RSSI,
40245     WMI_ROAM_TRIGGER_REASON_PERIODIC,
40246     WMI_ROAM_TRIGGER_REASON_MAWC,
40247     WMI_ROAM_TRIGGER_REASON_DENSE,
40248     WMI_ROAM_TRIGGER_REASON_BACKGROUND,
40249     WMI_ROAM_TRIGGER_REASON_FORCED,
40250     WMI_ROAM_TRIGGER_REASON_BTM,
40251     WMI_ROAM_TRIGGER_REASON_UNIT_TEST,
40252     WMI_ROAM_TRIGGER_REASON_BSS_LOAD,
40253     WMI_ROAM_TRIGGER_REASON_DEAUTH,
40254     WMI_ROAM_TRIGGER_REASON_IDLE,
40255     /*
40256      * NOTE: don't add any more ROAM_TRIGGER_REASON values here.
40257      * There are checks in the FW that require the value of
40258      * WMI_ROAM_TRIGGER_REASON_MAX to be < 16.
40259      * Add new ROAM_TRIGGER_REASON values below, inside the
40260      * WMI_ROAM_TRIGGER_EXT_REASON_ID enum.
40261      */
40262     WMI_ROAM_TRIGGER_REASON_MAX,
40263 } WMI_ROAM_TRIGGER_REASON_ID;
40264 
40265 /*
40266  * The WMI_ROAM_TRIGGER_REASON_ID enum cannot be expanded with new values,
40267  * due to checks in the FW that require WMI_ROAM_TRIGGER_REASON_MAX to be
40268  * less than 16.
40269  * The WMI_ROAM_TRIGGER_EXT_REASON_ID enum is used to hold further roam
40270  * trigger reasons.
40271  */
40272 typedef enum {
40273     WMI_ROAM_TRIGGER_REASON_STA_KICKOUT = WMI_ROAM_TRIGGER_REASON_MAX,
40274     WMI_ROAM_TRIGGER_REASON_ESS_RSSI,
40275     WMI_ROAM_TRIGGER_REASON_WTC_BTM,
40276     WMI_ROAM_TRIGGER_REASON_PMK_TIMEOUT,
40277     WMI_ROAM_TRIGGER_REASON_BTC,
40278 
40279     WMI_ROAM_TRIGGER_EXT_REASON_MAX
40280 } WMI_ROAM_TRIGGER_EXT_REASON_ID;
40281 
40282 /* value for DENSE roam trigger */
40283 #define WMI_RX_TRAFFIC_ABOVE_THRESHOLD 0x1
40284 #define WMI_TX_TRAFFIC_ABOVE_THRESHOLD 0x2
40285 
40286 typedef struct {
40287     A_UINT32 trigger_id; /* id from WMI_ROAM_TRIGGER_REASON_ID */
40288     /* interpretation of trigger value is as follows, for different trigger IDs
40289      * ID = PER -> value = PER percentage
40290      * ID = LOW_RSSI -> value = RSSI in dB wrt noise floor,
40291      * ID = HIGH_RSSI -> value = RSSI in dB wrt to noise floor,
40292      * ID = DENSE -> value = specification if it is tx or rx traffic threshold,
40293      *      (see WMI_[RX,TX]_TRAFFIC_ABOVE_THRESHOLD)
40294      * ID = PERIODIC -> value = periodicity in ms
40295      *
40296      * for other IDs trigger_value would be 0 (invalid)
40297      */
40298     A_UINT32 trigger_value;
40299 } wmi_roam_scan_trigger_reason;
40300 
40301 typedef struct {
40302     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_roam_scan_stats_cmd_fixed_param */
40303     A_UINT32 vdev_id;
40304 } wmi_request_roam_scan_stats_cmd_fixed_param;
40305 
40306 /** BSS load configuration parameters for roam trigger */
40307 typedef struct {
40308     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bss_load_cmd_fixed_param */
40309     A_UINT32 vdev_id;
40310     /** Minimum number of beacons to be consider for calculating average AP BSS load within time monitor_time_window */
40311     A_UINT32 beacons_min_count;
40312     /** Monitor time window in seconds */
40313     A_UINT32 monitor_time_window;
40314     /** BSS load threshold after which roam scan should trigger */
40315     A_UINT32 bss_load_threshold;
40316     /** rssi_2g_threshold
40317      * If connected AP is in 2.4 GHz, then consider bss load roam triggered
40318      * only if load % > bss_load_threshold && connected AP RSSI is worse
40319      * than rssi_2g_threshold.
40320      */
40321     A_INT32 rssi_2g_threshold; /* units = dBm */
40322     /** rssi_5g_threshold
40323      * If connected AP is in 5 GHz, then consider bss load roam triggered
40324      * only if load % > bss_load_threshold && connected AP RSSI is worse
40325      * than rssi_5g_threshold.
40326      */
40327     A_INT32 rssi_5g_threshold; /* units = dBm */
40328     /** rssi_6g_threshold
40329      * If connected AP is in 6 GHz, then consider bss load roam triggered
40330      * only if load % > bss_load_threshold && connected AP RSSI is worse
40331      * than rssi_6g_threshold. If rssi_6g_threshold is 0, it should be ignored.
40332      */
40333     A_INT32 rssi_6g_threshold; /* units = dBm */
40334 } wmi_roam_bss_load_config_cmd_fixed_param;
40335 
40336 /** Deauth roam trigger parameters */
40337 typedef struct {
40338     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_deauth_config_cmd_fixed_param */
40339     A_UINT32 vdev_id;
40340     /* 1-Enable, 0-Disable */
40341     A_UINT32 enable;
40342 } wmi_roam_deauth_config_cmd_fixed_param;
40343 
40344 /** IDLE roam trigger parameters */
40345 typedef struct {
40346     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_idle_config_cmd_fixed_param */
40347     A_UINT32 vdev_id;
40348     /* 1: Enable, 0: Disable */
40349     A_UINT32 enable;
40350     /* Connected AP band. 0: Any Band, 1: 2.4 GHz Band, 2: 5 GHz Band */
40351     A_UINT32 band;
40352     /* Trigger Idle roaming only if RSSI change of connected AP is within rssi_delta during idle time */
40353     A_UINT32 rssi_delta; /* units = dB */
40354     /* Trigger idle roam only if connected RSSI is better than min_rssi */
40355     A_INT32 min_rssi; /* units = dBm */
40356     /* Inactive/Idle time duration
40357      * After screen is OFF (or whatever condition is suitable in a given
40358      * system as an indication that the system is likely idle)
40359      * and if below conditions are met then idle roaming will be triggered.
40360      * 1. Connected AP band is matching with band value configured
40361      * 2. No TX/RX data for more than idle_time configured
40362      *    or TX/RX data packets count is less than data_packet_count
40363      *    during idle_time
40364      * 3. Connected AP RSSI change is not more than rssi_delta
40365      * 4. Connected AP RSSI is better than min_rssi.
40366      *    The purpose of this trigger for idle scan is to issue the scan
40367      *    even if (moreover, particularly if) the connection to the
40368      *    existing AP is still good, to keep the STA from getting locked
40369      *    onto the current good AP and thus missing out on an available
40370      *    even better AP.  This min_rssi threshold can be used to adjust
40371      *    the connection quality level at which the STA considers doing an
40372      *    idle scan.
40373      */
40374     A_UINT32 idle_time; /* units = seconds */
40375     /* Maximum allowed data packets count during idle time */
40376     A_UINT32 data_packet_count;
40377 } wmi_roam_idle_config_cmd_fixed_param;
40378 
40379 /** trigger to start/stop monitoring if system is idle command parameters */
40380 typedef struct {
40381     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_idle_trigger_monitor_cmd_fixed_param */
40382     /* idle_trigger_monitor values are from WMI_IDLE_TRIGGER_MONITOR_ID */
40383     A_UINT32 idle_trigger_monitor;
40384 } wmi_idle_trigger_monitor_cmd_fixed_param;
40385 
40386 typedef enum {
40387     WMI_IDLE_TRIGGER_MONITOR_NONE = 0, /* no-op */
40388     /* IDLE_TRIGGER_MONITOR_ON
40389      * The host's screen has turned off (or some other event indicating that
40390      * the system is likely idle) -
40391      * start monitoring to check if the system is idle.
40392      */
40393     WMI_IDLE_TRIGGER_MONITOR_ON,
40394     /* IDLE_TRIGGER_MONITOR_OFF
40395      * The host's screen has turned on (or some other event indicating that
40396      * the system is not idle)
40397      */
40398     WMI_IDLE_TRIGGER_MONITOR_OFF,
40399 } WMI_SCREEN_STATUS_NOTIFY_ID;
40400 
40401 typedef struct {
40402     /** TLV tag and len; tag equals wmi_pdev_dsm_filter_fixed_param */
40403     A_UINT32 tlv_header;
40404     /**
40405      * TLV (tag length value) parameter's following pdev_dsm_filter_cmd are,
40406      *
40407      *  wmi_pdev_bssid_disallow_list_config_param bssid_disallow_list[];
40408      *      i.e array containing all disallow AP filter lists including
40409      *      the new DSM lists (avoidlist / driver_blacklist) and existing
40410      *      lists (supplicant_blacklist / rssi_rejectlist etc.)
40411      */
40412 } wmi_pdev_dsm_filter_fixed_param;
40413 
40414 typedef struct {
40415     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_bssid_disallow_list_config_param */
40416     A_UINT32 tlv_header;
40417     /** bssid type i.e whether bssid falls in avoid list or driver_blacklist etc.
40418       see WMI_BSSID_DISALLOW_LIST_TYPE **/
40419     A_UINT32 bssid_type;
40420     /** mac address of disallow BSSID */
40421     wmi_mac_addr bssid;
40422     /** Disallow AP for certain duration, in units of milliseconds */
40423     A_UINT32 remaining_disallow_duration;
40424     /** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */
40425     A_INT32 expected_rssi;
40426     /* Blacklist reason from WMI_BLACKLIST_REASON_ID */
40427     A_UINT32 reason;
40428     /* Source of adding AP to BL from WMI_BLACKLIST_SOURCE_ID */
40429     A_UINT32 source;
40430     /*
40431      * timestamp is the absolute time w.r.t host timer which is synchronized
40432      * between the host and target.
40433      * This timestamp indicates the time when AP added to blacklist.
40434      */
40435     A_UINT32 timestamp;
40436     /* Original timeout value in milli seconds when AP added to BL */
40437     A_UINT32 original_timeout;
40438     /*
40439      * The disallow link ID bitmap indicates links which should not be allowed
40440      * for any assoc or partner link combination.
40441      * If all links for MLD AP are disallowed, then the value shall be
40442      * 0xffffffff.
40443      */
40444     A_UINT32 disallow_linkid_bitmap;
40445     /* MLD address of AP */
40446     wmi_mac_addr mld;
40447     /* List of link combinations for which association is failed */
40448     A_UINT32 ml_failed_links_combo_bitmap[WMI_MAX_FAILED_LINK_COMBO_COUNT];
40449     /* Failed link combo count filled in ml_failed_links_combo_bitmap[] */
40450     A_UINT32 ml_failed_link_combo_count;
40451 } wmi_pdev_bssid_disallow_list_config_param;
40452 
40453 typedef enum {
40454     /* USER_SPACE_BLACK_LIST
40455      * Black Listed AP's by host's user space
40456      */
40457     WMI_BSSID_DISALLOW_USER_SPACE_BLACK_LIST = 1,
40458     /* DRIVER_BLACK_LIST
40459      * Black Listed AP's by host driver
40460      * used for data stall migitation
40461      */
40462     WMI_BSSID_DISALLOW_DRIVER_BLACK_LIST,
40463     /* USER_SPACE_AVOID_LIST
40464      * Avoid List AP's by host's user space
40465      * used for data stall migitation
40466      */
40467     WMI_BSSID_DISALLOW_USER_SPACE_AVOID_LIST,
40468     /* DRIVER_AVOID_LIST
40469      * Avoid List AP's by host driver
40470      * used for data stall migitation
40471      */
40472     WMI_BSSID_DISALLOW_DRIVER_AVOID_LIST,
40473     /* RSSI_REJECT_LIST
40474      * OCE AP's
40475      */
40476     WMI_BSSID_DISALLOW_RSSI_REJECT_LIST,
40477 } WMI_BSSID_DISALLOW_LIST_TYPE;
40478 
40479 /* WLAN_PDEV_MAX_NUM_BSSID_DISALLOW_LIST:
40480  * Maximum number of BSSID disallow entries which host is allowed to send
40481  * to firmware within the WMI_PDEV_DSM_FILTER_CMDID message.
40482  */
40483 #define WLAN_PDEV_MAX_NUM_BSSID_DISALLOW_LIST  28
40484 
40485 /** Roam Pre-Authentication completion status */
40486 typedef struct {
40487     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_preauth_status_cmd_fixed_param */
40488     A_UINT32 vdev_id;
40489     /* preauth_status, 0 - Success, Non Zero - Failure
40490      * Refer to IEEE Std 802.11-2016 Table 9-46 for meaning of status values.
40491      */
40492     A_UINT32 preauth_status;
40493     /* AP BSSID for which pre-authentication is completed */
40494     wmi_mac_addr candidate_ap_bssid;
40495     /**
40496      * This fixed_param TLV is followed by the below TLVs:
40497      *
40498      * PMKID computed after successful pre-authentication. This is valid only if preauth_status is success
40499      * A_UINT8 pmkid[];
40500      *
40501      * PMK computed after successful pre-authentication. This is valid only if preauth_status is success
40502      * A_UINT8 pmk[];
40503      */
40504 } wmi_roam_preauth_status_cmd_fixed_param;
40505 
40506 /** Roam Pre-Authentication start event */
40507 typedef struct {
40508     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_preauth_start_event_fixed_param */
40509     A_UINT32 vdev_id;
40510     /* AP BSSID for which host needs to start pre-authentication */
40511     wmi_mac_addr candidate_ap_bssid;
40512     /*
40513      * Transmit address for which host needs to start pre-authentication
40514      * in MLO case.  In non MLO cases, transmit_addr will be filled with 0x0.
40515      */
40516     wmi_mac_addr transmit_addr;
40517     /* AKM suite type (as defined in the IEEE 802.11 spec) */
40518     A_UINT32 akm_suite_type;
40519 } wmi_roam_preauth_start_event_fixed_param;
40520 
40521 typedef struct {
40522     /*
40523      * The timestamp is in units of ticks of a 19.2MHz clock.
40524      * The timestamp is taken at roam scan start.
40525      */
40526     A_UINT32 lower32bit;
40527     A_UINT32 upper32bit;
40528 } wmi_roaming_timestamp;
40529 
40530 typedef struct {
40531     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_stats_event_fixed_param */
40532     A_UINT32 vdev_id;
40533     /* number of roam scans */
40534     A_UINT32 num_roam_scans;
40535     /* This TLV is followed by TLV's:
40536      *   A_UINT32 client_id[num_roam_scans]; based on WMI_SCAN_CLIENT_ID
40537      *   wmi_roaming_timestamp timestamp[num_roam_scans]; clock ticks at the time of scan start
40538      *   A_UINT32 num_channels[num_roam_scans]; number of channels that are scanned
40539      *   A_UINT32 chan_info[]; channel frequencies (MHz) in each scan
40540      *       The num_channels[] elements specify how many elements there are
40541      *       within chan_info[] for each scan.
40542      *       For example, if num_channels = [2, 3] then chan_info will have 5
40543      *       elements, with the first 2 elements from the first scan, and
40544      *       the last 3 elements from the second scan.
40545      *   wmi_mac_addr old_bssid[num_roam_scans]; bssid we are connected to at the time of roaming
40546      *   A_UINT32 is_roaming_success[num_roam_scans]; value is 1 if roaming is successful, 0 if roaming failed
40547      *   wmi_mac_addr new_bssid[num_roam_scans]; bssid after roaming
40548      *   A_UINT32 num_of_roam_candidates[num_roam_scans]; number of candidates found in each roam scan
40549      *   roam_scan_trigger_reason roam_reason[num_roam_scans]; reason for each roam scan
40550      *   wmi_mac_addr bssid[]; bssids of candidates in each roam scan
40551      *       The num_of_roam_candidates[] elements specify how many elements
40552      *       there are within bssid[] for each scan.
40553      *       For example, if num_of_roam_candidates = [2, 3] then bssid will
40554      *       have 5 elements, with the first 2 elements from the first scan,
40555      *       and the last 3 elements from the second scan.
40556      *   A_UINT32 score[]; score of candidates in each roam scan
40557      *       The num_of_roam_candidates[] elements specify how many elements
40558      *       there are within score[] for each scan.
40559      *       For example, if num_of_roam_candidates = [2, 3] then score will
40560      *       have 5 elements, with the first 2 elements from the first scan,
40561      *       and the last 3 elements from the second scan.
40562      *   A_UINT32 channel[]; channel frequency (MHz) of candidates in each roam scan
40563      *       The num_of_roam_candidates[] elements specify how many elements
40564      *       there are within channel[] for each scan.
40565      *       For example, if num_of_roam_candidates = [2, 3] then channel will
40566      *       have 5 elements, with the first 2 elements from the first scan,
40567      *       and the last 3 elements from the second scan.
40568      *   A_UINT32 rssi[]; RSSI in dB w.r.t. noise floor of candidates
40569      *       in each roam scan.
40570      *       The num_of_roam_candidates[] elements specify how many elements
40571      *       there are within rssi[] for each scan.
40572      *       For example, if num_of_roam_candidates = [2, 3] then rssi will
40573      *       have 5 elements, with the first 2 elements from the first scan,
40574      *       and the last 3 elements from the second scan.
40575      */
40576 } wmi_roam_scan_stats_event_fixed_param;
40577 
40578 typedef enum {
40579     WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER = 1, /* Roam scan triggered due to periodic timer expiry */
40580     WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER,   /* Roam scan triggered due to inactivity detection */
40581     /* INACTIVITY_TIMER_LOW_RSSI - alias for INACTIVITY_TIMER */
40582     WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER_LOW_RSSI =
40583         WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER,
40584     WMI_ROAM_TRIGGER_SUB_REASON_BTM_DI_TIMER,       /* Roam scan triggered due to BTM Disassoc Imminent timeout */
40585     WMI_ROAM_TRIGGER_SUB_REASON_FULL_SCAN,          /* Roam scan triggered due to partial scan failure */
40586     WMI_ROAM_TRIGGER_SUB_REASON_LOW_RSSI_PERIODIC,  /* Roam scan triggered due to Low RSSI periodic timer */
40587     WMI_ROAM_TRIGGER_SUB_REASON_CU_PERIODIC,        /* Roam scan triggered due to CU periodic timer */
40588     /* PERIODIC_TIMER_AFTER_INACTIVITY:
40589      * Roam scan triggered due to periodic timer after device in
40590      * inactivity state.
40591      * This timer is enabled/used for roaming in a vendor-specific manner.
40592      */
40593     WMI_ROAM_TRIGGER_SUB_REASCON_PERIODIC_TIMER_AFTER_INACTIVITY,
40594     WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY =
40595         WMI_ROAM_TRIGGER_SUB_REASCON_PERIODIC_TIMER_AFTER_INACTIVITY,
40596     /*
40597      * PERIODIC_TIMER_AFTER_INACTIVITY_LOW_RSSI - alias for
40598      * PERIODIC_TIMER_AFTER_INACTIVITY
40599      */
40600     WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY_LOW_RSSI =
40601         WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY,
40602     WMI_ROAM_TRIGGER_SUB_REASON_PERIODIC_TIMER_AFTER_INACTIVITY_CU,
40603     WMI_ROAM_TRIGGER_SUB_REASON_INACTIVITY_TIMER_CU,
40604 } WMI_ROAM_TRIGGER_SUB_REASON_ID;
40605 
40606 typedef enum wmi_roam_invoke_status_error {
40607     WMI_ROAM_INVOKE_STATUS_SUCCESS = 0,
40608     WMI_ROAM_INVOKE_STATUS_VDEV_INVALID = 0x11,    /* Invalid VDEV */
40609     WMI_ROAM_INVOKE_STATUS_BSS_INVALID,            /* Invalid VDEV BSS */
40610     WMI_ROAM_INVOKE_STATUS_VDEV_DOWN,              /* VDEV is not UP */
40611     WMI_ROAM_INVOKE_STATUS_ROAM_HANDLE_INVALID,    /* VDEV ROAM handle is invalid */
40612     WMI_ROAM_INVOKE_STATUS_OFFLOAD_DISABLE,        /* Roam offload is not enabled */
40613     WMI_ROAM_INVOKE_STATUS_AP_SSID_LENGTH_INVALID, /* Connected AP profile SSID length is zero */
40614     WMI_ROAM_INVOKE_STATUS_HO_DISALLOW,            /* Already FW internal roaming is in progress */
40615     WMI_ROAM_INVOKE_STATUS_ALREADY_RUNNING,        /* Roam Invoke already in progress either from internal FW BTM request or from host*/
40616     WMI_ROAM_INVOKE_STATUS_NON_ROAMABLE_AP,        /* Roam HO is not triggered due to non roamable AP */
40617     WMI_ROAM_INVOKE_STATUS_HO_INTERNAL_FAIL,       /* Candidate AP save failed */
40618     WMI_ROAM_INVOKE_STATUS_DISALLOW,               /* Roam invoke trigger is not enabled */
40619     WMI_ROAM_INVOKE_STATUS_SCAN_FAIL,              /* Scan start fail */
40620     WMI_ROAM_INVOKE_STATUS_START_HO_FAIL,          /* Roam HO start fail */
40621     WMI_ROAM_INVOKE_STATUS_INVALID_PARAMS,         /* Roam invoke params are invalid */
40622     WMI_ROAM_INVOKE_STATUS_INVALID_SCAN_MODE,      /* Roam scan mode is invalid */
40623     WMI_ROAM_INVOKE_STATUS_NO_CAND_AP,             /* No candidate AP found to roam to */
40624     WMI_ROAM_INVOKE_STATUS_HO_FAIL,                /* handoff failed */
40625 } wmi_roam_invoke_status_error_t;
40626 
40627 typedef struct {
40628     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_reason_tlv_param */
40629     /*
40630      * timestamp is the absolute time w.r.t host timer which is synchronized
40631      * between the host and target.
40632      * This timestamp indicates the time when roam trigger happened.
40633      */
40634     A_UINT32 timestamp;      /* Timestamp in milli seconds */
40635     /* trigger_reason:
40636      * Roam trigger reason from WMI_ROAM_TRIGGER_REASON_ID
40637      */
40638     A_UINT32 trigger_reason;
40639     /* trigger_sub_reason:
40640      * Reason for each roam scan from WMI_ROAM_TRIGGER_SUB_REASON_ID,
40641      * if multiple scans are triggered for a single roam trigger.
40642      */
40643     A_UINT32 trigger_sub_reason;
40644     A_UINT32 current_rssi;   /* Connected AP RSSI in dBm */
40645     /* roam_rssi_threshold:
40646      * RSSI threshold value in dBm for low RSSI roam trigger.
40647      */
40648     A_UINT32 roam_rssi_threshold;
40649     A_UINT32 cu_load;        /* Connected AP CU load percentage (0-100) */
40650     /* deauth_type:
40651      * 1 -> De-authentication
40652      * 2 -> Disassociation
40653      */
40654     A_UINT32 deauth_type;
40655     /* deauth_reason:
40656      * De-authentication or disassociation reason.
40657      * De-authentication / disassociation Values are enumerated in the
40658      * 802.11 spec.
40659      */
40660     A_UINT32 deauth_reason;
40661     /* btm_request_mode:
40662      * Mode Values are enumerated in the 802.11 spec.
40663      */
40664     A_UINT32 btm_request_mode;
40665     A_UINT32 disassoc_imminent_timer;  /* in Milli seconds */
40666     /* validity_internal:
40667      * Preferred candidate list validity interval in Milli seconds.
40668      */
40669     A_UINT32 validity_internal;
40670     /* candidate_list_count:
40671      * Number of preferred candidates from BTM request.
40672      */
40673     A_UINT32 candidate_list_count;
40674     /* btm_response_status_code:
40675      * Response status Values are enumerated in the 802.11 spec.
40676      */
40677     A_UINT32 btm_response_status_code;
40678 
40679     union {
40680         /*
40681          * If a definition of these vendor-specific files has been provided,
40682          * use the vendor-specific names for these fields as an alias for
40683          */
40684         #ifdef WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC1
40685         WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC1;
40686         #endif
40687         struct {
40688             /* opaque space reservation for vendor-specific fields */
40689             A_UINT32 vendor_specific1[7];
40690         };
40691     };
40692     /* BTM BSS termination timeout value in milli seconds */
40693     A_UINT32 btm_bss_termination_timeout;
40694     /* BTM MBO assoc retry timeout value in milli seconds */
40695     A_UINT32 btm_mbo_assoc_retry_timeout;
40696     union {
40697         /*
40698          * If a definition of these vendor-specific files has been provided,
40699          * use the vendor-specific names for these fields as an alias for
40700          */
40701         #ifdef WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC2
40702         WMI_ROAM_TRIGGER_REASON_VENDOR_SPECIFIC2;
40703         #endif
40704         struct {
40705             /* opaque space reservation for vendor-specific fields */
40706             A_UINT32 vendor_specific2[4];
40707         };
40708     };
40709     /* btm_req_dialog_token: dialog token number in BTM request frame */
40710     A_UINT32 btm_req_dialog_token;
40711     /* data RSSI in dBm when abort to roam scan */
40712     A_INT32 data_rssi;
40713     /* data RSSI threshold in dBm */
40714     A_INT32 data_rssi_threshold;
40715     /* rx linkspeed status, 0:good linkspeed, 1:bad */
40716     A_UINT32 rx_linkspeed_status;
40717 } wmi_roam_trigger_reason;
40718 
40719 #define WMI_GET_BTCONNECT_STATUS(flags)      WMI_GET_BITS(flags, 0, 1)
40720 #define WMI_SET_BTCONNECT_STATUS(flags, val) WMI_SET_BITS(flags, 0, 1, val)
40721 
40722 #define WMI_GET_MLO_BAND(flags)      WMI_GET_BITS(flags, 1, 3)
40723 #define WMI_SET_MLO_BAND(flags, val) WMI_SET_BITS(flags, 1, 3, val)
40724 
40725 typedef enum wmi_mlo_band_info {
40726     WMI_MLO_BAND_NO_MLO = 0,
40727     WMI_MLO_BAND_2GHZ_MLO,
40728     WMI_MLO_BAND_5GHZ_MLO,
40729     WMI_MLO_BAND_6GHZ_MLO,
40730 } wmi_mlo_band_info_t;
40731 
40732 typedef struct {
40733     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_info_tlv_param */
40734     /* roam_scan_type:
40735      * 0 -> Partial roam scan
40736      * 1 -> Full roam scan
40737      */
40738     A_UINT32 roam_scan_type;
40739     /* next_rssi_trigger_threshold:
40740      * Updated RSSI threshold value in dBm for next roam trigger.
40741      */
40742     A_UINT32 next_rssi_trigger_threshold;
40743     A_UINT32 roam_scan_channel_count; /* Number of channels scanned during roam scan */
40744     A_UINT32 roam_ap_count; /* Number of roamable APs */
40745     A_UINT32 frame_info_count; /* Number of frame info */
40746     /*
40747      * scan_complete_timestamp is the absolute time w.r.t host timer
40748      * which is synchronized between the host and target.
40749      * This timestamp indicates the time when roam scan finished.
40750      */
40751     A_UINT32 scan_complete_timestamp;   /* milli second units */
40752     /*
40753      * Flags capturing factors involved during roam scan:
40754      * Bit 0    : Bluetooth connect status, 0(not connected) or 1(connected).
40755      * Bit 1-3  : Indicates which link triggered roaming in MLD cases.
40756      *            The value is one of the wmi_mlo_band_info_t enum constants.
40757      *            Refer to WMI_[GET,SET]_MLO_BAND macros.
40758      * Bit 4-31 : reserved for future use.
40759      */
40760     A_UINT32 flags;
40761 } wmi_roam_scan_info;
40762 
40763 typedef struct {
40764     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_channel_info_tlv_param */
40765     A_UINT32 channel;    /* Channel frequency in MHz */
40766     A_UINT32 ch_dwell_type; /* indicates channel dwell type:
40767                              * 0 -> unspecified
40768                              * 1 -> active
40769                              * 2 -> passive
40770                              */
40771 } wmi_roam_scan_channel_info;
40772 
40773 #define WMI_GET_AP_INFO_MLO_STATUS(flags)      WMI_GET_BITS(flags, 0, 1)
40774 #define WMI_SET_AP_INFO_MLO_STATUS(flags, val) WMI_SET_BITS(flags, 0, 1, val)
40775 
40776 typedef struct {
40777     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_info_tlv_param */
40778     /*
40779      * timestamp is the absolute time w.r.t host timer which is synchronized
40780      * between the host and target.
40781      * This timestamp indicates the time when candidate AP is found
40782      * during roam scan.
40783      */
40784     A_UINT32 timestamp;      /* Timestamp in milli seconds */
40785     A_UINT32 candidate_type; /* 0 - Candidate AP, 1 - Connected AP */
40786     wmi_mac_addr bssid;      /* AP MAC address */
40787     A_UINT32 channel;        /* AP channel frequency in MHz */
40788     A_UINT32 rssi;           /* AP current RSSI in dBm */
40789     A_UINT32 cu_load;        /* AP current cu load percentage (0-100) */
40790     /*
40791      * The score fields below don't have a pre-determined range,
40792      * but use the sense that a higher score indicates a better
40793      * roam candidate.
40794      */
40795     A_UINT32 rssi_score;     /* AP current RSSI score */
40796     A_UINT32 cu_score;       /* AP current cu score */
40797     A_UINT32 total_score;    /* AP total score */
40798     A_UINT32 etp;            /* AP Estimated Throughput (ETP) value in mbps */
40799     /* Blacklist reason from WMI_BLACKLIST_REASON_ID */
40800     A_UINT32 bl_reason;
40801     /* Source of adding AP to BL from WMI_BLACKLIST_SOURCE_ID */
40802     A_UINT32 bl_source;
40803     /*
40804      * timestamp is the absolute time w.r.t host timer which is synchronized
40805      * between the host and target.
40806      * This timestamp indicates the time when AP added to blacklist.
40807      */
40808     A_UINT32 bl_timestamp;
40809     /* Original timeout value in milli seconds when AP added to BL */
40810     A_UINT32 bl_original_timeout;
40811     /* flags:
40812      * bit 0:    MLD AP FLAG -> 1: MLD AP, 0: non-MLD AP
40813      *           Refer to WMI_[GET,SET]_AP_INFO_MLO_STATUS macros.
40814      * bit 1-31: reserved.
40815      */
40816     A_UINT32 flags;
40817     wmi_mac_addr mld_addr;
40818 } wmi_roam_ap_info;
40819 
40820 typedef enum {
40821     /* Failures reasons for not triggering roaming */
40822     WMI_ROAM_FAIL_REASON_NO_SCAN_START = 1, /* Roam scan not started */
40823     WMI_ROAM_FAIL_REASON_SCAN_NOT_ALLOWED = WMI_ROAM_FAIL_REASON_NO_SCAN_START, /* Roam scan is not allowed to start */
40824     WMI_ROAM_FAIL_REASON_NO_AP_FOUND,       /* No roamable APs found during roam scan */
40825     WMI_ROAM_FAIL_REASON_NO_CAND_AP_FOUND,  /* No candidate APs found during roam scan */
40826 
40827     /* Failure reasons after roaming is triggered */
40828     WMI_ROAM_FAIL_REASON_HOST,              /* Roam fail due to VDEV STOP issued from Host */
40829     WMI_ROAM_FAIL_REASON_AUTH_SEND,         /* Unable to send auth request frame */
40830     WMI_ROAM_FAIL_REASON_AUTH_RECV,         /* Received auth response with error status code */
40831     WMI_ROAM_FAIL_REASON_NO_AUTH_RESP,      /* Not receiving auth response frame */
40832     WMI_ROAM_FAIL_REASON_REASSOC_SEND,      /* Unable to send reassoc request frame */
40833     WMI_ROAM_FAIL_REASON_REASSOC_RECV,      /* Received reassoc response with error status code */
40834     WMI_ROAM_FAIL_REASON_NO_REASSOC_RESP,   /* Not receiving reassoc response frame */
40835     WMI_ROAM_FAIL_REASON_EAPOL_TIMEOUT,     /* EAPOL TIMEOUT */
40836     WMI_ROAM_FAIL_REASON_EAPOL_M1_TIMEOUT = WMI_ROAM_FAIL_REASON_EAPOL_TIMEOUT, /* EAPOL M1 is not received */
40837     WMI_ROAM_FAIL_REASON_MLME,              /* MLME internal error */
40838     WMI_ROAM_FAIL_REASON_INTERNAL_ABORT,    /* Internal abort */
40839     WMI_ROAM_FAIL_REASON_SCAN_START,        /* Unable to start roam scan */
40840     WMI_ROAM_FAIL_REASON_AUTH_NO_ACK,       /* No ACK is received for Auth request */
40841     WMI_ROAM_FAIL_REASON_AUTH_INTERNAL_DROP, /* Auth request is dropped internally */
40842     WMI_ROAM_FAIL_REASON_REASSOC_NO_ACK,    /* No ACK is received for Reassoc request */
40843     WMI_ROAM_FAIL_REASON_REASSOC_INTERNAL_DROP, /* Reassoc request is dropped internally */
40844     WMI_ROAM_FAIL_REASON_EAPOL_M2_SEND,     /* Unable to send EAPOL M2 frame */
40845     WMI_ROAM_FAIL_REASON_EAPOL_M2_INTERNAL_DROP,   /* EAPOL M2 frame dropped internally */
40846     WMI_ROAM_FAIL_REASON_EAPOL_M2_NO_ACK,   /* No Ack is received for EAPOL M2 frame */
40847     WMI_ROAM_FAIL_REASON_EAPOL_M3_TIMEOUT,  /* M3 is not received */
40848     WMI_ROAM_FAIL_REASON_EAPOL_M4_SEND,     /* Unable to send EAPOL M4 frame */
40849     WMI_ROAM_FAIL_REASON_EAPOL_M4_INTERNAL_DROP,   /* EAPOL M4 frame dropped internally */
40850     WMI_ROAM_FAIL_REASON_EAPOL_M4_NO_ACK,   /* No Ack is received for EAPOL M4 frame */
40851     WMI_ROAM_FAIL_REASON_NO_SCAN_FOR_FINAL_BMISS, /* Roam scan is not started for Final Bmiss case */
40852     WMI_ROAM_FAIL_REASON_DISCONNECT,        /* Deauth or Disassoc received from AP during roaming handoff */
40853     WMI_ROAM_FAIL_REASON_SYNC,              /* when host wakes-up during roaming in-progress, abort current roaming if previous sync is pending */
40854     WMI_ROAM_FAIL_REASON_SAE_INVALID_PMKID, /* WPA3-SAE invalid PMKID */
40855     WMI_ROAM_FAIL_REASON_SAE_PREAUTH_TIMEOUT, /* WPA3-SAE pre-authentication timeout */
40856     WMI_ROAM_FAIL_REASON_SAE_PREAUTH_FAIL, /* WPA3-SAE pre-authentication failed */
40857     WMI_ROAM_FAIL_REASON_UNABLE_TO_START_ROAM_HO, /* Roam HO is not started due to FW internal issue */
40858 
40859     /* Failure reasons to indicate no candidate and final bmiss event sent */
40860     WMI_ROAM_FAIL_REASON_NO_AP_FOUND_AND_FINAL_BMISS_SENT, /* No roamable APs found during roam scan and final bmiss event sent */
40861     WMI_ROAM_FAIL_REASON_NO_CAND_AP_FOUND_AND_FINAL_BMISS_SENT, /* No candidate APs found during roam scan and final bmiss event sent */
40862     WMI_ROAM_FAIL_REASON_CURR_AP_STILL_OK, /* Roam scan not happen due to current network condition is fine */
40863     WMI_ROAM_FAIL_REASON_SCAN_CANCEL,      /* Roam scan canceled */
40864     WMI_ROAM_FAIL_REASON_MLD_EXTRA_SCAN_REQUIRED, /* Roaming is not triggered for current roam scan as extra scan is required to scan all MLD links */
40865 
40866     WMI_ROAM_FAIL_REASON_UNKNOWN = 255,
40867 } WMI_ROAM_FAIL_REASON_ID;
40868 
40869 typedef enum {
40870     WMI_ROAM_ABORT_UNSPECIFIED = 0,            /* Target did not specify detailed reason for roam scan being aborted */
40871     WMI_ROAM_ABORT_LOWRSSI_DATA_RSSI_HIGH = 1, /* Roam scan is not started due to high data RSSI during low-RSSI roaming */
40872     WMI_ROAM_ABORT_LOWRSSI_LINK_SPEED_GOOD,    /* Roam scan is not started due to good link speed during low-RSSI roaming */
40873     WMI_ROAM_ABORT_BG_DATA_RSSI_HIGH,          /* Roam scan is not started due to high data RSSI during background roaming */
40874     WMI_ROAM_ABORT_BG_RSSI_ABOVE_THRESHOLD,    /* Roam scan is not started due to high beacon RSSI during background roaming */
40875     WMI_ROAM_SCAN_CANCEL_IDLE_SCREEN_ON,       /* Idle roam scan is canceled due to screen on */
40876     WMI_ROAM_SCAN_CANCEL_OTHER_PRIORITY_ROAM_SCAN, /* Roam scan is canceled due to other high priority roam scan */
40877 } WMI_ROAM_FAIL_SUB_REASON_ID;
40878 
40879 typedef struct {
40880     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_result_tlv_param */
40881     /*
40882      * timestamp is the absolute time w.r.t host timer which is synchronized
40883      * between the host and target.
40884      * This timestamp indicates the time when roaming is completed.
40885      */
40886     A_UINT32 timestamp;     /* Timestamp in milli seconds */
40887     A_UINT32 roam_status;   /* 0 - Roaming is success, 1 - Roaming is failed */
40888     A_UINT32 roam_fail_reason; /* from WMI_ROAM_FAIL_REASON_ID */
40889     wmi_mac_addr bssid; /* bssid corresponds to roam_fail_reason */
40890     A_UINT32 roam_abort_reason; /* Detail reason for roam scan not start, from WMI_ROAM_FAIL_SUB_REASON_ID */
40891 } wmi_roam_result;
40892 
40893 #define WMI_ROAM_NEIGHBOR_REPORT_INFO_REQUEST_TOKEN_GET(detail)         WMI_GET_BITS(detail, 0, 8)
40894 #define WMI_ROAM_NEIGHBOR_REPORT_INFO_REQUEST_TOKEN_SET(detail,val)     WMI_SET_BITS(detail, 0, 8, val)
40895 #define WMI_ROAM_NEIGHBOR_REPORT_INFO_RESPONSE_TOKEN_GET(detail)        WMI_GET_BITS(detail, 8, 8)
40896 #define WMI_ROAM_NEIGHBOR_REPORT_INFO_RESPONSE_TOKEN_SET(detail,val)    WMI_SET_BITS(detail, 8, 8, val)
40897 #define WMI_ROAM_NEIGHBOR_REPORT_INFO_NUM_OF_NRIE_GET(detail)           WMI_GET_BITS(detail, 16, 8)
40898 #define WMI_ROAM_NEIGHBOR_REPORT_INFO_NUM_OF_NRIE_SET(detail,val)       WMI_SET_BITS(detail, 16, 8, val)
40899 #define WMI_ROAM_NEIGHBOR_REPORT_INFO_MLO_BAND_INFO_GET(detail)         WMI_GET_BITS(detail, 24, 3)
40900 #define WMI_ROAM_NEIGHBOR_REPORT_INFO_MLO_BAND_INFO_SET(detail,val)     WMI_SET_BITS(detail, 24, 3, val)
40901 
40902 typedef struct {
40903     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_neighbor_report_info_tlv_param */
40904     /* request_type:
40905      * 1 -> BTM query
40906      * 2 -> 11K neighbor report request
40907      */
40908     A_UINT32 request_type;
40909     /* neighbor_report_request_timestamp:
40910      * timestamp is the absolute time w.r.t host timer which is synchronized
40911      * between the host and target.
40912      * This timestamp indicates the time when neighbor report request
40913      * is received.
40914      */
40915     A_UINT32 neighbor_report_request_timestamp;  /* in milli seconds */
40916     /* neighbor_report_response_timestamp:
40917      * This timestamp indicates the time when neighbor report response is sent.
40918      */
40919     A_UINT32 neighbor_report_response_timestamp; /* in milli seconds */
40920     A_UINT32 neighbor_report_channel_count; /* Number of channels received in neighbor report response */
40921     A_UINT32 btm_query_token; /* btm query dialog token */
40922     /* btm_query_reason_code:
40923      * Transition Query Reasons are enumerated in table 7-43x
40924      * of the 802.11v spec.
40925      */
40926     A_UINT32 btm_query_reason_code;
40927     /* neighbor_report_detail:
40928      * [7:0]     : neighbor report request token
40929      * [15:8]    : neighbor report response token
40930      * [23:16]   : the number of neighbor report elements in response frame
40931      * [26:24]   : band on which frame is sent; the value will be one of the
40932      *             wmi_mlo_band_info enum constants
40933      *             Refer to WMI_ROAM_NEIGHBOR_REPORT_INFO_MLO_BAND_INFO_GET,SET
40934      *             macros.
40935      * [31:27]   : reserved
40936      * Refer to the above WMI_ROAM_NEIGHBOR_REPORT_INFO_*_GET,_SET macros for
40937      * reading and writing these bitfields.
40938      */
40939     A_UINT32 neighbor_report_detail;
40940 } wmi_roam_neighbor_report_info;
40941 
40942 #define WMI_ROAM_BTM_RESP_MLO_BAND_INFO_GET(detail)         WMI_GET_BITS(detail, 0, 3)
40943 #define WMI_ROAM_BTM_RESP_MLO_BAND_INFO_SET(detail,val)     WMI_SET_BITS(detail, 0, 3, val)
40944 
40945 typedef struct {
40946     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_btm_response_info_tlv_param */
40947 
40948     /*enum STATUS_CODE_WNM_BTM defined in ieee80211_defs.h*/
40949     A_UINT32 btm_status;
40950 
40951     /* AP MAC address */
40952     wmi_mac_addr target_bssid;
40953 
40954     /* vsie_reason value:
40955      *  0x00    Will move to Cellular
40956      *  0x01    Unspecified
40957      *  0x02    Not supported
40958      *  0x03    No Cellular Network
40959      *  0x04    Controlled by framework
40960      *  0x05    Roam to better AP
40961      *  0x06    Suspend mode
40962      *  0x07    RSSI is strong enough
40963      *  0x08-0xFF    TBD
40964      */
40965     A_UINT32 vsie_reason;
40966     /*
40967      * timestamp is the absolute time w.r.t host timer which is synchronized
40968      * between the host and target.
40969      * This timestamp indicates the time when btm response is sent.
40970      */
40971     A_UINT32 timestamp; /* milli second units */
40972     A_UINT32 btm_resp_dialog_token; /* dialog_token in btm response frame */
40973     /* btm_resp_bss_termination_delay:
40974      * bss_termination_delay in btm response frame is the number of minutes
40975      * that the responding STA requests the BSS to delay termination.
40976      */
40977     A_UINT32 btm_resp_bss_termination_delay;
40978     /* info:
40979      * Bit[0:2]   - band on which frame is sent, band value will be one of the
40980      *              wmi_mlo_band_info_t enum constants
40981      *              Refer to WMI_ROAM_BTM_RESP_MLO_BAND_INFO_GET,SET macros.
40982      * Bit[3:31]  - reserved.
40983      */
40984     A_UINT32 info;
40985 } wmi_roam_btm_response_info;
40986 
40987 typedef struct {
40988     A_UINT32 tlv_header;                /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_btm_request_candidate_info_tlv_param */
40989     wmi_mac_addr btm_candidate_bssid;   /* BTM candidate MAC address */
40990     A_UINT32 preference;                /* preference in Preference IE */
40991 } wmi_roam_btm_request_candidate_info;
40992 
40993 typedef struct {
40994     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_neighbor_report_channel_info_tlv_param */
40995     A_UINT32 channel;    /* Channel frequency in MHz */
40996 } wmi_roam_neighbor_report_channel_info;
40997 
40998 #define WMI_GET_ASSOC_ID(frame_info_ext)      WMI_GET_BITS(frame_info_ext, 0, 16)
40999 #define WMI_SET_ASSOC_ID(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 0, 16, val)
41000 
41001 #define WMI_GET_MLO_BITMAP_BAND_INFO(frame_info_ext)      WMI_GET_BITS(frame_info_ext, 16, 5)
41002 #define WMI_SET_MLO_BITMAP_BAND_INFO(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 16, 5, val)
41003 
41004 #define WMI_GET_RX_INDICATE(frame_info_ext)      WMI_GET_BITS(frame_info_ext, 21, 1)
41005 #define WMI_SET_RX_INDICATE(frame_info_ext, val) WMI_SET_BITS(frame_info_ext, 21, 1, val)
41006 
41007 #define WMI_GET_TX_FAILED_REASON(frame_info_ext)         WMI_GET_BITS(frame_info_ext, 22, 4)
41008 #define WMI_SET_TX_FAILED_REASON(frame_info_ext, val)    WMI_SET_BITS(frame_info_ext, 22, 4, val)
41009 
41010 #define WMI_GET_MAP_ID(frame_info_ext)          WMI_GET_BITS(frame_info_ext, 26, 6)
41011 #define WMI_SET_MAP_ID(frame_info_ext, val)     WMI_SET_BITS(frame_info_ext, 26, 6, val)
41012 
41013 typedef struct {
41014     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_frame_info_tlv_param */
41015     /* timestamp is the absolute time w.r.t host timer which is synchronized between the host and target */
41016     A_UINT32 timestamp;      /* Timestamp when frame is sent or received */
41017     /*
41018      * frame_info = frame_type | (frame_subtype << 2) | (request_or_response << 6) | (auth_algo_num << 7) | (seq_num << 16)
41019      * frame_type(2 bits), frame_subtype(4 bits) are from 802.11 spec.
41020      *     If frame_type is WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT, frame_subtype
41021      *     should be one of value in WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE.
41022      * request_or_response(1 bit) - Valid if frame_subtype is authentication.
41023      *      0 - Authentication request 1 - Authentication response
41024      * auth_algo_num(5bits) : Lower 5 bits of 9.4.1.1 Authentication Algorithm
41025      *     Number field
41026      *     The auth_algo_num bits shall be ignored unless
41027      *     WMI_SERVICE_ROAM_STAT_PER_CANDIDATE_FRAME_INFO_SUPPORT is set and
41028      *     frame_subtype is auth frame.
41029      * seq_num(16 bits) - frame sequence number
41030      */
41031     A_UINT32 frame_info;
41032 
41033     /* status_code:
41034      * For Rx frames : Status code from 802.11 spec, section 9.4.1.9
41035      * For Rx frames (deauth / disassoc) : Reason code from 802.11 spec,
41036      *     section 9.4.1.7
41037      * For Tx frames : Status_code should be one of value in
41038      *     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS
41039      */
41040     A_UINT32 status_code;
41041     /*
41042      * rssi_dbm_abs
41043      * Last known RSSI of the current BSSID at the moment when the frame
41044      * was sent and received.
41045      * This RSSI value is valid for deauth / disassoc frame only.
41046      * The rssi_dbm_abs value is the absolute value of the RSSI in dBm units.
41047      * For example, if the RSSI is -40 dBm, rssi_dbm_abs will be 40.
41048      */
41049     A_UINT32 rssi_dbm_abs;
41050     /* retry_count
41051      * To show how many times the same frame (but with different
41052      * sequence number) is retransmitted, in protocol level.
41053      */
41054     A_UINT32 retry_count;
41055     wmi_mac_addr bssid;      /* AP MAC address */
41056     /*
41057      * frame_info_ext captures below fields:
41058      * Bit 0-15  : (re)assoc id of (re)association response frame,
41059      *             section 9.4.1.8 AID field.
41060      * Bit 16-20 : MLO bitmap band info,
41061      *             bit0: 2GHz, bit1: 5GHz, bit2: 6GHz, bits 3-4: reserved
41062      *             Refer to WMI_[GET,SET]_MLO_BITMAP_BAND_INFO macros.
41063      * Bit 21    : indicate whether this frame is rx :0-not rx; 1-rx
41064      *             Refer to WMI_[GET,SET]_RX_INDICATE macros.
41065      * Bit 22-25 : opaque tx failure reason
41066      *             Refer to WMI_[GET,SET]_TX_FAILED_REASON macros.
41067      * Bit 26-31 : Indicate the map id, used to identify the all the
41068      *             ML link info corresponding to current roaming candidate.
41069      */
41070     A_UINT32 frame_info_ext;
41071 } wmi_roam_frame_info;
41072 
41073 typedef enum {
41074     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT = 3,
41075 } WMI_ROAM_FRAME_INFO_FRAME_TYPE;
41076 
41077 typedef enum {
41078     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M1 = 1,
41079     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M2,
41080     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M3,
41081     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_M4,
41082     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_GTK_M1,
41083     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE_GTK_M2,
41084 } WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_SUBTYPE;
41085 
41086 typedef enum {
41087     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS_ACK = 0,
41088     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS_NO_ACK,
41089     WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS_TX_FAIL,
41090 } WMI_ROAM_FRAME_INFO_FRAME_TYPE_EXT_STATUS;
41091 
41092 typedef struct {
41093     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_initial_info_tlv_param */
41094 
41095     /* count of full scan */
41096     A_UINT32 roam_full_scan_count;
41097     A_INT32  rssi_th; /* unit: dBm */
41098     A_UINT32 cu_th; /* channel utilization threshold: uses units of percent */
41099     /* timer_canceled:
41100      * bit0: timer1 canceled
41101      * bit1: timer2 canceled
41102      * bit2: inactive timer canceled
41103      */
41104     A_UINT32 timer_canceled;
41105 } wmi_roam_initial_info;
41106 
41107 typedef enum {
41108     WMI_ROAM_MSG_RSSI_RECOVERED = 1, /* Connected AP RSSI is recovered to good region */
41109     WMI_ROAM_MSG_CONNECTED_IN_POOR_RSSI = 2, /* DUT connected to AP whose RSSI is below low RSSI threshold */
41110 } WMI_ROAM_MSG_ID;
41111 
41112 typedef struct {
41113     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_msg_info_tlv_param */
41114     /*
41115      * timestamp is the absolute time (in milliseconds) w.r.t host timer
41116      * which is synchronized between the host and target
41117      */
41118     A_UINT32 timestamp;
41119     A_UINT32 msg_id; /* Message ID from WMI_ROAM_MSG_ID */
41120     /* msg_param values are interpreted differently for different msg_id values.
41121      * if msg_id == WMI_ROAM_MSG_RSSI_RECOVERED:
41122      *     msg_param1 contains current AP RSSI in dBm
41123      *         (unsigned -> signed conversion is required)
41124      *     msg_param2 contains next trigger RSSI threshold in dBm
41125      *         (unsigned -> signed conversion is required)
41126      */
41127     A_UINT32 msg_param1;
41128     A_UINT32 msg_param2;
41129 } wmi_roam_msg_info;
41130 
41131 typedef struct {
41132     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_stats_event_fixed_param */
41133     A_UINT32 vdev_id;
41134     A_UINT32 roam_scan_trigger_count; /* Number of roam scans triggered */
41135 } wmi_roam_stats_event_fixed_param;
41136 
41137 typedef struct {
41138     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_reason_cmm_tlv_param */
41139     /*
41140      * timestamp is the absolute time w.r.t host timer which is synchronized
41141      * between the host and target.
41142      * This timestamp indicates the time when roam trigger happened.
41143      */
41144     A_UINT32 timestamp;      /* Timestamp in milli seconds */
41145     /* trigger_reason:
41146      * Roam trigger reason from WMI_ROAM_TRIGGER_REASON_ID
41147      */
41148     A_UINT32 trigger_reason;
41149     /* trigger_sub_reason:
41150      * Reason for each roam scan from WMI_ROAM_TRIGGER_SUB_REASON_ID,
41151      * if multiple scans are triggered for a single roam trigger.
41152      */
41153     A_UINT32 trigger_sub_reason;
41154     A_UINT32 current_rssi;   /* Connected AP RSSI in dBm */
41155 } wmi_roam_trigger_reason_cmm;
41156 
41157 typedef struct {
41158     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_rssi_tlv_param */
41159     /* roam_rssi_threshold:
41160      * RSSI threshold value in dBm for low RSSI roam trigger.
41161      */
41162     A_UINT32 roam_rssi_threshold;
41163     /* data RSSI in dBm */
41164     A_UINT32 data_rssi;
41165     /* data RSSI threshold in dBm */
41166     A_UINT32 data_rssi_threshold;
41167     /* rx linkspeed status, 0:good linkspeed, 1:bad */
41168     A_UINT32 rx_linkspeed_status;
41169 } wmi_roam_trigger_rssi;
41170 
41171 typedef struct {
41172     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_bss_load_tlv_param */
41173     A_UINT32 cu_load;        /* Connected AP CU load percentage (0-100) */
41174 } wmi_roam_trigger_bss_load;
41175 
41176 typedef struct {
41177     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_deauth_tlv_param */
41178     /* deauth_type:
41179      * 1 -> De-authentication
41180      * 2 -> Disassociation
41181      */
41182     A_UINT32 deauth_type;
41183     /* deauth_reason:
41184      * De-authentication or disassociation reason.
41185      * De-authentication / disassociation Values are enumerated in the
41186      * 802.11 spec.
41187      */
41188     A_UINT32 deauth_reason;
41189 } wmi_roam_trigger_deauth;
41190 
41191 typedef struct {
41192     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_btm_tlv_param */
41193     /* btm_request_mode:
41194      * Mode Values are enumerated in the 802.11 spec.
41195      */
41196     A_UINT32 btm_request_mode;
41197     A_UINT32 disassoc_imminent_timer;  /* in Milli seconds */
41198     /* validity_internal:
41199      * Preferred candidate list validity interval in Milli seconds.
41200      */
41201     A_UINT32 validity_internal;
41202     /* candidate_list_count:
41203      * Number of preferred candidates from BTM request.
41204      */
41205     A_UINT32 candidate_list_count;
41206     /* btm_response_status_code:
41207      * Response status Values are enumerated in the 802.11 spec.
41208      */
41209     A_UINT32 btm_response_status_code;
41210 
41211     /* BTM BSS termination timeout value in milli seconds */
41212     A_UINT32 btm_bss_termination_timeout;
41213     /* BTM MBO assoc retry timeout value in milli seconds */
41214     A_UINT32 btm_mbo_assoc_retry_timeout;
41215 
41216     /* btm_req_dialog_token: dialog token number in BTM request frame */
41217     A_UINT32 btm_req_dialog_token;
41218 } wmi_roam_trigger_btm;
41219 
41220 typedef struct {
41221     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_bmiss_tlv_param */
41222     /* B[0-6]: final bmiss cnt.
41223      * B[7-23]: consecutive bmiss cnt
41224      * B[24]: isQosNullSuccess: 0: success, 1:fail
41225      */
41226     A_UINT32 bmiss_status;
41227 } wmi_roam_trigger_bmiss;
41228 
41229 typedef struct {
41230     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_dense_tlv_param */
41231     /* RX Throughput in bytes per second in dense env */
41232     A_UINT32 rx_tput;
41233     /* TX Throughput in bytes per second in dense env */
41234     A_UINT32 tx_tput;
41235     /* dense_status: b[0-7]: roamable AP count info in dense env */
41236     A_UINT32 dense_status;
41237 } wmi_roam_trigger_dense;
41238 
41239 typedef struct {
41240     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_force_tlv_param */
41241     A_UINT32 invoke_reason; /* from wlan_roam_invoke_reason */
41242 } wmi_roam_trigger_force;
41243 
41244 typedef struct {
41245     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_kickout_tlv_param */
41246     /* consecutive tx failure threshold */
41247     A_UINT32 kickout_th;
41248     A_UINT32 kickout_reason; /* from PEER_KICKOUT_REASON */
41249 } wmi_roam_trigger_kickout;
41250 
41251 typedef struct {
41252     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_per_tlv_param */
41253     /*  For PER roam,
41254      *  If the number of PPDUs with PHY rate < low_rate_thresh exceeds
41255      *  N * tx/rx_rate_thresh_percnt / 100, roaming will be triggered.
41256      *  b[0-7]:  tx_rate_thresh_percnt
41257      *  b[16-23]:rx_rate_thresh_percnt
41258      */
41259     A_UINT32 rate_thresh_percnt;
41260 } wmi_roam_trigger_per;
41261 
41262 typedef struct {
41263     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_periodic_tlv_param */
41264     /*  roam scan periodic :   units = milliseconds*/
41265     A_UINT32 periodic_timer_ms;
41266 } wmi_roam_trigger_periodic;
41267 
41268 typedef struct {
41269     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_trigger_hi_rssi_tlv_param */
41270     /*  roam High RSSI threshold */
41271     A_UINT32 hi_rssi_threshold;
41272 } wmi_roam_trigger_hi_rssi;
41273 
41274 #define WMI_MLO_LINK_INFO_GET_MAP_ID(link_info)            WMI_GET_BITS(link_info, 0, 6)
41275 #define WMI_MLO_LINK_INFO_SET_MAP_ID(link_info, val)       WMI_SET_BITS(link_info, 0, 6, val)
41276 
41277 #define WMI_MLO_LINK_INFO_GET_STATUS(link_info)            WMI_GET_BITS(link_info, 6, 1)
41278 #define WMI_MLO_LINK_INFO_SET_STATUS(link_info, val)       WMI_SET_BITS(link_info, 6, 1, val)
41279 
41280 #define WMI_MLO_LINK_INFO_GET_BAND(link_info)              WMI_GET_BITS(link_info, 7, 3)
41281 #define WMI_MLO_LINK_INFO_SET_BAND(link_info, val)         WMI_SET_BITS(link_info, 7, 3, val)
41282 
41283 #define WMI_MLO_LINK_INFO_GET_IEEE_LINK_ID(link_info)      WMI_GET_BITS(link_info, 10, 4)
41284 #define WMI_MLO_LINK_INFO_SET_IEEE_LINK_ID(link_info, val) WMI_SET_BITS(link_info, 10, 4, val)
41285 
41286 typedef struct {
41287     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_info_tlv_param */
41288     wmi_mac_addr link_addr;
41289     A_UINT32 link_info;
41290     /*
41291      * b[0-5]   : Map Id - maps the corresponding candidate AP for which
41292      *            re-assoc resp received.
41293      * b[6]     : Status - link status, AP accepted/rejected this link
41294      *            0 - accepted
41295      *            1 - rejected
41296      * b[7-9]   : Band - link band info (band value is from wmi_mlo_band_info)
41297      * b[10-13] : IEEE link id - Link id associated with AP
41298      */
41299 } wmi_mlo_link_info;
41300 
41301 typedef struct {
41302     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_get_scan_channel_list_cmd_fixed_param */
41303     A_UINT32 vdev_id;
41304 } wmi_roam_get_scan_channel_list_cmd_fixed_param;
41305 
41306 typedef struct {
41307     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_channel_list_event_fixed_param */
41308     A_UINT32 vdev_id;
41309     wmi_ssid ssid; /* SSID of connected AP */
41310     /*
41311      * This event can be sent as a response to
41312      * WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID or
41313      * can be sent asynchronously during disconnection.
41314      * command_response = 1, when it is sent as a response to
41315      *                       WMI_ROAM_GET_SCAN_CHANNEL_LIST_CMDID
41316      *                  = 0, for other cases
41317      */
41318     A_UINT32 command_response;
41319 /*
41320  * This fixed_param TLV is followed by the below TLVs:
41321  *
41322  * List of roam scan channel frequencies in MHz
41323  * A_UINT32 channel_list[];
41324  */
41325 } wmi_roam_scan_channel_list_event_fixed_param;
41326 
41327 typedef enum {
41328     WMI_ROAM_CND_RSSI_SCORING             = 0x00000001, /* FW considers RSSI scoring */
41329     WMI_ROAM_CND_HT_SCORING               = 0x00000002, /* FW considers HT scoring */
41330     WMI_ROAM_CND_VHT_SCORING              = 0x00000004, /* FW considers VHT scoring */
41331     WMI_ROAM_CND_HE_SCORING               = 0x00000008, /* FW considers 11ax scoring */
41332     WMI_ROAM_CND_BW_SCORING               = 0x00000010, /* FW considers Bandwidth scoring */
41333     WMI_ROAM_CND_BAND_SCORING             = 0x00000020, /* FW considers Band(2G/5G) scoring */
41334     WMI_ROAM_CND_NSS_SCORING              = 0x00000040, /* FW considers NSS(1x1 / 2x2) scoring */
41335     WMI_ROAM_CND_CHAN_CONGESTION_SCORING  = 0x00000080, /* FW considers ESP/QBSS scoring */
41336     WMI_ROAM_CND_BEAMFORMING_SCORING      = 0x00000100, /* FW considers Beamforming scoring */
41337     WMI_ROAM_CND_PCL_SCORING              = 0x00000200, /* FW considers PCL scoring */
41338     WMI_ROAM_CND_OCE_WAN_SCORING          = 0x00000400, /* FW considers OCE WAN metrics scoring */
41339     WMI_ROAM_CND_OCE_AP_TX_PWR_SCORING    = 0x00000800, /* FW considers OCE AP Tx power scoring */
41340     WMI_ROAM_CND_OCE_AP_SUBNET_ID_SCORING = 0x00001000, /* FW considers OCE AP subnet id scoring */
41341     WMI_ROAM_CND_SAE_PK_AP_SCORING        = 0x00002000, /* FW considers SAE-PK enabled AP scoring */
41342     WMI_ROAM_CND_SECURITY_SCORING         = 0x00004000, /* FW considers security scoring */
41343 } WMI_ROAM_CND_SCORING_PARAMS;
41344 
41345 typedef struct {
41346     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_capability_report_event_fixed_param */
41347     /*
41348      * This event is sent asynchronously during FW init.
41349      * It indicates FW roam related capabilities to host.
41350      *
41351      * scoring_capability_bitmap = Indicates firmware candidate scoring
41352      *                             capabilities. It's a bitmap of values
41353      *                             from enum WMI_ROAM_CND_SCORING_PARAMS.
41354      */
41355     A_UINT32 scoring_capability_bitmap;
41356 } wmi_roam_capability_report_event_fixed_param;
41357 
41358 /*
41359  * Definition of disallow connection modes.
41360  */
41361 typedef enum {
41362     /* Bit 0: roam to 5GL+5GH MLSR is not allowed if the bit is set. */
41363     WMI_ROAM_MLO_CONNECTION_MODE_5GL_5GH_MLSR = 0x1,
41364 } WMI_ROAM_MLO_CONNECTION_MODES;
41365 
41366 typedef struct {
41367     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_mlo_config_cmd_fixed_param */
41368     wmi_mac_addr partner_link_addr; /* Assigned link address which can be used as self link addr when vdev is not created */
41369 
41370     A_UINT32 vdev_id;
41371 
41372     /*
41373      * Configure max number of link mlo connection supports.
41374      * Invalid value or 0 will use max supported value by fw.
41375      */
41376     A_UINT32 support_link_num;
41377 
41378     /*
41379      * Bit 0: 2G band support if 1
41380      * Bit 1: 5G band support if 1
41381      * Bit 2: 6G band support if 1
41382      */
41383     A_UINT32 support_link_band; /* Configure the band bitmap of mlo connection supports. */
41384     A_UINT32 max_active_links; /* Max active links supported for STA */
41385 
41386     /*
41387      * Disallow the specified connection mode(s) when roaming to MLD AP.
41388      * Refer to the WMI_ROAM_MLO_CONNECTION_MODES enum for the connection mode
41389      * each bit represents.
41390      */
41391     A_UINT32 disallow_connect_modes;
41392 
41393     /*
41394      * If max_link_combo_count is non-zero, STA should try to roam to next
41395      * candidate once max allowed link combinations is reached with current
41396      * candidate AP.
41397      */
41398     A_UINT32 max_link_combo_count;
41399 } wmi_roam_mlo_config_cmd_fixed_param;
41400 
41401 typedef struct {
41402     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
41403     /** unique id identifying the VDEV, generated by the caller */
41404     A_UINT32 vdev_id;
41405     /** parameter id - see WMI_ROAM_PARAM */
41406     A_UINT32 param_id;
41407     /** parameter value */
41408     A_UINT32 param_value;
41409 } wmi_roam_set_param_cmd_fixed_param;
41410 
41411 typedef struct {
41412     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_enable_vendor_cmd_fixed_param */
41413     /** unique id identifying the VDEV, generated by the caller */
41414     A_UINT32 vdev_id;
41415     /** abstract mechanism for differentiating vendors */
41416     A_UINT32 vendor_id;
41417     /** 1 - Enable, 0 - Disable */
41418     A_UINT32 enable;
41419 } wmi_roam_enable_vendor_control_cmd_fixed_param;
41420 
41421 typedef enum {
41422     ROAM_VENDOR_CONTROL_PARAM_TRIGGER = 1,
41423     ROAM_VENDOR_CONTROL_PARAM_DELTA,
41424     ROAM_VENDOR_CONTROL_PARAM_FULL_SCANPERIOD,
41425     ROAM_VENDOR_CONTROL_PARAM_PARTIAL_SCANPERIOD,
41426     ROAM_VENDOR_CONTROL_PARAM_ACTIVE_CH_DWELLTIME,
41427     ROAM_VENDOR_CONTROL_PARAM_PASSIVE_CH_DWELLTIME,
41428     ROAM_VENDOR_CONTROL_PARAM_HOME_CH_TIME,
41429     ROAM_VENDOR_CONTROL_PARAM_AWAY_TIME,
41430     /* Sending query for all roam_vendor_control_param */
41431     ROAM_VENDOR_CONTROL_PARAM_ALL = 0xFFFFFFFF,
41432 } WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID;
41433 
41434 typedef struct {
41435     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_vendor_param_cmd_fixed_param */
41436     /** unique id identifying the VDEV, generated by the caller */
41437     A_UINT32 vdev_id;
41438     /** Vendor Control Param ID from enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID */
41439     A_UINT32 param_id;
41440 } wmi_roam_get_vendor_control_param_cmd_fixed_param;
41441 
41442 /* WMI_ROAM_GET_VENDOR_CONTROL_PARAM_EVENTID - No need to make this event as wakeable event
41443  * Host ensures to take wakelock after sending WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID command */
41444 typedef struct {
41445     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_get_vendor_control_param_event_fixed_param */
41446     /** unique id identifying the VDEV, generated by the caller */
41447     A_UINT32 vdev_id;
41448     /**
41449      * Vendor Control Param ID from enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID
41450      * If param_id is ROAM_VENDOR_CONTROL_PARAM_ALL, send all vendor control
41451      * param value defined in enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID
41452      * using wmi_vendor_control_param tlv
41453      */
41454     A_UINT32 param_id;
41455     /** Vendor control param value */
41456     A_UINT32 param_value;
41457 } wmi_roam_get_vendor_control_param_event_fixed_param;
41458 
41459 typedef struct {
41460     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vendor_control_param */
41461     /** Vendor Control Param ID from enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID */
41462     A_UINT32 param_id;
41463     /** Vendor control param value */
41464     A_UINT32 param_value;
41465 } wmi_vendor_control_param;
41466 
41467 /** the definition of different ROAM parameters */
41468 typedef enum {
41469     /*
41470      * roam param to configure below roam events
41471      * Bit : 0 disabled - do not send WMI_ROAM_NOTIF_SCAN_END in WMI_ROAM_EVENTID
41472      * Bit : 0 enabled  - send WMI_ROAM_NOTIF_SCAN_END in WMI_ROAM_EVENTID
41473      * 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
41474      * 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
41475      * Bit : 2-31  - reserved
41476      */
41477     WMI_ROAM_PARAM_ROAM_EVENTS_CONFIG = 1,
41478 
41479     /*
41480      * Bit : 0 if unset, POOR_LINKSPEED
41481      * Bit : 0 if set, GOOD_LINKSPEED
41482      */
41483     WMI_ROAM_PARAM_LINKSPEED_STATE = 2,
41484 
41485     /*
41486      * roam param to configure roam scan params for DFS jitter reduction
41487      * Bit : 0 enabled   - DFS channel jitter reduction is enabled.
41488      * Bit : 0 disabled  - DFS channel jitter reduction is disabled.
41489      *
41490      * Bit : 1-7         - To indicate the passive-to-active conversion timeout
41491      *                     with range 40 to 70 in ms, default value is 50ms.
41492      *                     If an invalid (out of range) value is provided, the
41493      *                     default value will be used.
41494      * Bit : 8-13        - To indicate the DFS RSSI threshold for current AP
41495      *                     with range 0 to 58, default value is 0 dB
41496      *                     (DFS RSSI threshold = -70 dBm + 0 dB = -70 dBm).
41497      *                     The specified value (in dB) is added to the -70 dBm
41498      *                     baseline value to get the RSSI threshold in dBm.
41499      *                     If an invalid (out of range) value is provided, the
41500      *                     default value will be used.
41501      * Bit : 14-19       - To indicate the DFS RSSI threshold for candidate AP
41502      *                     with range 0 to 58, default value is 0 dB
41503      *                     (DFS RSSI threshold = -70 - 0 = -70 dBm).
41504      *                     The specified value (in dB) is added to the -70 dBm
41505      *                     baseline value to get the RSSI threshold in dBm.
41506      *                     If an invalid (out of range) value is provided, the
41507      *                     default value will be used.
41508      * Bit : 20 disabled - To indicate DFS roam scan policy is AGILE
41509      * Bit : 20 enabled  - To indicate DFS roam scan policy is Legacy
41510      *
41511      * Bit : 21-31 are reserved
41512      */
41513     WMI_ROAM_PARAM_ROAM_SCAN_DFS_CONFIG_BITMAP = 3,
41514 
41515     /*
41516      * roam param to configure HO_DELAY_RX value at runtime
41517      * The configured value of ho_delay_rx will be in milliseconds
41518      * Maximum value which user can configure using this Param ID is 1000 msec.
41519      *
41520      * If any value beyond this Maximum value is provided by user, FW will
41521      * configure the ho_delay_rx value to Maximum allowed value i.e. 1000 msec.
41522      */
41523     WMI_ROAM_PARAM_ROAM_HO_DELAY_RUNTIME_CONFIG = 4,
41524 
41525     /*
41526      * Roam param to enable/disable full scan channel optimization
41527      * As per current implementation of roam scan, if there are no APs found
41528      * during partial scan, immediately a full scan will be initiated as a
41529      * fallback. This includes all channels that were already scanned as part
41530      * of partial scan.
41531      * This flag controls the optimization, to exclude all channels, which are
41532      * already scanned as part of partial scan.
41533      */
41534     WMI_ROAM_PARAM_ROAM_CONTROL_FULL_SCAN_CHANNEL_OPTIMIZATION = 5,
41535 
41536     /*
41537      * Roam param to enable/disable scanning of 6 GHz PSC channels
41538      * As per current implementation, Wi-Fi STA scans on all 6 GHz PSC channels
41539      * as part of full scan during a roam scan irrespective of whether APs are
41540      * present in 6 GHz or not.
41541      * This flag controls the optimization to do the scan in 6 GHz PSC channels
41542      * only if channel map or newly received RNR indicates 6 GHz APs during
41543      * current 2.4 GHz or 5 GHz scanning of Roam Full scan.
41544      */
41545     WMI_ROAM_PARAM_ROAM_CONTROL_FULL_SCAN_6GHZ_PSC_ONLY_WITH_RNR = 6,
41546 
41547     /*
41548      * Flag to tell whether MCC is disallowed or not in sta + sta currrent case.
41549      * If flag is unset, then no limitation for channels which sta can roam to.
41550      * If flag is set, then the channels which one of STA roam to cause MCC with other STA, it will be disallowed.
41551      */
41552      WMI_ROAM_PARAM_ROAM_MCC_DISALLOW = 7,
41553 
41554     /*
41555      * Roam param to provide additional RSSI Boost for 6 GHz Candidate AP
41556      * during Roam Scan in case any 6 GHz candidate has better Roam score
41557      * but fails RSSI Delta Check.
41558      * This configurable RSSI Boost value for 6GHz Candidate AP will be
41559      * configured via ini RoamRssiDiff6GHz
41560      * This configured RSSI boost value will only be applicable for 6GHz
41561      * Candidate AP when the STA is connected to 2.4/5 GHz Band AP and will
41562      * not impact if STA is connected to 6GHz Band AP
41563      */
41564     WMI_ROAM_PARAM_ROAM_RSSI_BOOST_FOR_6GHZ_CAND_AP = 8,
41565 
41566     /*
41567      * Roam param to indicate unsupported Power Type for 6 GHz Candidate AP
41568      * found during Roam Scan. If AP operates on the power type disabled by
41569      * the host, then that candidate should not be selected.
41570      * This unsupported Power Type will be configured based
41571      * on disabled 6GHz Power Types in Regdomain
41572      *
41573      * If below bits in the obtianed Bitmap is set then any AP
41574      * broadcasting these Power Types should not be selected
41575      * BIT 0   - Indoor Access Point
41576      * BIT 1   - Standard Power (SP) Access Point
41577      * BIT 2   - Very Low Power (VLP) Access Point
41578      * BIT 3-7 - Reserved
41579      */
41580     WMI_ROAM_PARAM_ROAM_UNSUPPORTED_6GHZ_POWERTYPE = 9,
41581 
41582     /*
41583      * crypto params to allow EHT/MLO in WPA2/WPA3 security.
41584      * BITMAP of wlan_crypto_roam_eht_config
41585      */
41586     WMI_ROAM_PARAM_CRYPTO_EHT_CONFIG = 10,
41587 
41588     /*
41589      * Roam Param for enabling/disabling Roam Latency Optimization via below
41590      * BITMAP of wlan_roam_latency_optimization_t
41591      */
41592     WMI_ROAM_PARAM_ROAM_LATENCY_OPTIMIZATION_BITMAP = 11,
41593 
41594 
41595     /*=== END ROAM_PARAM_PROTOTYPE SECTION ===*/
41596 } WMI_ROAM_PARAM;
41597 
41598 typedef enum {
41599     /*
41600      * BIT 0 - WLAN_CRYPTO_WPA2_ALLOW_NON_MLO_EHT:
41601      *         Connect to non-MLO/MLO WPA2 EHT APs in EHT without PMF support.
41602      *
41603      * BIT 1 - WLAN_CRYPTO_WPA2_ALLOW_MLO:
41604      *         Connect to MLO WPA2 EHT APs in MLO without PMF support.
41605      *
41606      * BIT 2 - WLAN_CRYPTO_WPA2_ALLOW_NON_MLO_EHT_MFPC_SET:
41607      *         Connect to non-MLO/MLO WPA2 EHT APs in EHT.
41608      *         (PMF capable is mandatory).
41609      *
41610      * BIT 3 - WLAN_CRYPTO_WPA2_ALLOW_MLO_MFPC_SET:
41611      *         Connect to MLO WPA2 EHT APs in MLO
41612      *         (PMF capable is mandatory).
41613      *
41614      * BIT 4 - 15 - reserved for future WPA2 security configs
41615      *
41616      * BIT 16 - WLAN_CRYPTO_WPA3_SAE_ALLOW_NON_MLO_EHT_HNP:
41617      *          Connect to non-MLO/MLO WPA3-SAE without support for H2E
41618      *          (or no RSNXE IE in beacon) in non-MLO EHT.
41619      *
41620      * BIT 17 - WLAN_CRYPTO_WPA3_SAE_ALLOW_MLO_HNP:
41621      *          Connect to MLO WPA3-SAE without support for H2E
41622      *          (or no RSNXE IE in beacon).
41623      */
41624     WLAN_CRYPTO_WPA2_ALLOW_NON_MLO_EHT          = 0x00000001,
41625     WLAN_CRYPTO_WPA2_ALLOW_MLO                  = 0x00000002,
41626     WLAN_CRYPTO_WPA2_ALLOW_NON_MLO_EHT_MFPC_SET = 0x00000004,
41627     WLAN_CRYPTO_WPA2_ALLOW_MLO_MFPC_SET         = 0x00000008,
41628 
41629     WLAN_CRYPTO_WPA3_SAE_ALLOW_NON_MLO_EHT_HNP  = 0x00010000,
41630     WLAN_CRYPTO_WPA3_SAE_ALLOW_MLO_HNP          = 0x00020000,
41631 } wlan_crypto_roam_eht_config;
41632 
41633 typedef struct {
41634     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_big_data_cmd_fixed_param */
41635     A_UINT32 vdev_id;
41636 } wmi_vdev_get_big_data_cmd_fixed_param;
41637 
41638 typedef struct {
41639     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_send_big_data_event_fixed_param */
41640     A_UINT32 vdev_id;
41641     /** param list **/
41642     /* Target power (dBm units) - 2.4G/5G */
41643     A_UINT32 target_power_2g_dsss;
41644     A_UINT32 target_power_2g_ofdm;
41645     A_UINT32 target_power_2g_mcs0;
41646     A_UINT32 target_power_5g_ofdm;
41647     A_UINT32 target_power_5g_mcs0;
41648 
41649     /* ANI level from hal-phy */
41650     A_UINT32 ani_level;
41651 
41652     /* Number of probe requests sent while roaming after BMISS */
41653     A_UINT32 tx_probe_req;
41654 
41655     /* Number of probe responses received while roaming after BMISS */
41656     A_UINT32 rx_probe_response;
41657 
41658     /*
41659      * Number of retries (both by HW and FW) for tx data MPDUs sent by this vdev
41660      */
41661     A_UINT32 num_data_retries;
41662 
41663     /* Number of tx data MPDUs dropped from this vdev due to tx retry limit */
41664     A_UINT32 num_tx_data_fail;
41665 
41666     /* Number of aggregated unicast tx expecting response ppdu */
41667     A_UINT32 data_tx_ppdu_count;
41668 
41669     /* Number of aggregated unicast tx expecting response mpdu */
41670     A_UINT32 data_tx_mpdu_count;
41671 
41672     /* number of rx frames with good PCLP */
41673     A_UINT32 rx_frame_good_pclp_count;
41674 
41675     /* Number of occasions that no valid delimiter is detected by ampdu parser */
41676     A_UINT32 invalid_delimiter_count;
41677 
41678     /* Number of frames for which the CRC check failed in the MAC */
41679     A_UINT32 rx_crc_check_fail_count;
41680 
41681     /* tx fifo overflows count for transmissions by this vdev */
41682     A_UINT32 txpcu_fifo_overflows_count;
41683 
41684     /* Number of ucast ACKS received good FCS (doesn't include block acks) */
41685     A_UINT32 successful_acks_count;
41686 
41687     /*
41688      * RX BlockACK Counts
41689      * Note that this counts the number of block acks received by this vdev,
41690      * not the number of MPDUs acked by block acks.
41691      */
41692     A_UINT32 rx_block_ack_count;
41693 
41694     /* Beacons received from member of BSS */
41695     A_UINT32 member_bss_beacon_count;
41696 
41697     /* Beacons received from other BSS */
41698     A_UINT32 non_bss_beacon_count;
41699 
41700     /* Number of RX Data multicast frames dropped by the HW */
41701     A_UINT32 rx_data_mc_frame_filtered_count;
41702 } wmi_vdev_send_big_data_event_fixed_param;
41703 
41704 typedef struct {
41705     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_big_data_p2_cmd_fixed_param */
41706     A_UINT32 vdev_id;
41707 } wmi_vdev_get_big_data_p2_cmd_fixed_param;
41708 
41709 typedef struct {
41710     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_send_big_data_p2_event_fixed_param */
41711     A_UINT32 vdev_id;
41712     /** param list **/
41713     /* total number of TSF out of sync */
41714     A_UINT32 tsf_out_of_sync;
41715 
41716     /**
41717      * ANI (noise interference) level corresponding to the channel.
41718      * The range of values is different for chips of different target
41719      * architectures.  Helium values range from 0 to 9, while Lithium
41720      * and Beryllium values range from -5 to 15.
41721      * In all cases, higher values indicate more noise interference.
41722      */
41723     A_INT32 ani_level;
41724 
41725     /*
41726      * This fixed_param TLV is followed by the below TLVs:
41727      * List of datapath big data stats. This stat is not interpreted by
41728      * host. This gets directly updated on big data server and later FW
41729      * team will analyze this data.
41730      *
41731      * A_UINT32 bd_datapath_stats[]; // DEPRECATED
41732      * wmi_big_data_dp_stats_tlv_param big_data_dp_stats[];
41733      */
41734 } wmi_vdev_send_big_data_p2_event_fixed_param;
41735 
41736 typedef struct {
41737     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bd_datapath_stats_tlv_param */
41738     A_UINT32 tlv_header;
41739 
41740     /* Tx power before disconnection.
41741      * The units of the following tx power fields are 0.5 dBm for Helium
41742      * architecture target (e.g. a value of 1 means tx power = 0.5 dBm),
41743      * and are 0.25 dBm for subsequent target architectures.
41744      */
41745     A_UINT32 last_data_tx_pwr;
41746     A_UINT32 target_power_dsss;
41747     A_UINT32 target_power_ofdm;
41748 
41749     /* Rate index of last data frame before disconnection */
41750     A_UINT32 last_tx_data_rix;
41751 
41752     /* Tx rate (in kbps) of last data frame before disconnection */
41753     A_UINT32 last_tx_data_rate_kbps;
41754 } wmi_big_data_dp_stats_tlv_param;
41755 
41756 typedef enum {
41757     WMI_6GHZ_REG_PWRMODE_LPI = 0, /* LPI mode for AP and client products */
41758     WMI_6GHZ_REG_PWRMODE_SP = 1, /* SP mode for AP and client products */
41759     WMI_6GHZ_REG_PWRMODE_VLP = 2, /* VLP mode for AP and client products */
41760     WMI_6GHZ_REG_PWRMODE_SP_STA = 3, /* SP client mode for AP products */
41761 
41762     WMI_6GHZ_REG_PWRMODE_MAX = 5
41763 } WMI_6GHZ_REG_PWRMODE_TYPE;
41764 
41765 typedef struct {
41766     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_tpc_power_fixed_param */
41767     A_UINT32 vdev_id;
41768     A_UINT32 psd_power;  /* Value: 0 or 1, is PSD power or not */
41769     A_UINT32 eirp_power; /* Maximum EIRP power (dDm units), valid only if power is PSD */
41770     A_UINT32 power_type_6ghz; /* Type: WMI_6GHZ_REG_TYPE, used for halphy CTL lookup */
41771 
41772     /*
41773      * This fixed_param TLV is followed by the below TLVs:
41774      *
41775      * Based on power_type_6ghz sent in fixed param, the array TLVs
41776      * will be interpreted as described below:
41777      *
41778      * For power_type_6ghz - LPI and VLP power mode:
41779      *   num_pwr_levels of wmi_vdev_ch_power_info
41780      *     This array TLV will be filled based on psd_power field in
41781      *     fixed param.
41782      *       If psd_power = 1, TLV carries 20MHz sub-channel center frequency
41783      *       and PSD-power values.
41784      *       If psd_power = 0, TLV carries Cfreq and EIRP for all BWs
41785      *       (<= current channel BSS BW).
41786      *   wmi_vdev_ch_power_psd_info & wmi_vdev_ch_power_eirp_info are not used
41787      *   for LPI and VLP power mode.
41788      *
41789      * For power_type_6ghz SP and SP_CLIENT power mode:
41790      *     num_pwr_levels of wmi_vdev_ch_power_psd_info is filled as below
41791      *         Holds BSS sub-channel center frequency and OOBE PSD-power values.
41792      *         OOBE PSD values for AP and STA are filled in below manner:
41793      *         AP case:
41794      *             For example, DUT is operating in 160 MHz and pri20
41795      *             lies in first sub-channel,
41796      *                 OOBE_PSD_20 | MIN_OOBE_PSD_40 | MIN_OOBE_PSD_80 |
41797      *                 MIN_OOBE_PSD_80 | MIN_OOBE_PSD_160 | MIN_OOBE__PSD_160 |
41798      *                 MIN_OOBE_PSD_160 | MIN_OOBE_PSD_160
41799      *         STA case:
41800      *             For example,STA is operating in 160 MHz
41801      *                 OOBE_PSD_20 | OOBE_PSD_20 | OOBE_PSD_20 | OOBE_PSD_20 |
41802      *                 OOBE_PSD_20 | OOBE_PSD_20 | OOBE_PSD_20 | OOBE_PSD_20
41803      *
41804      *     num_pwr_levels of wmi_vdev_ch_power_eirp_info
41805      *         Carries Cfreq and EIRP for all BWs (<= current channel BSS BW).
41806      *         For both AP and STA, EIRP are filled in below manner:
41807      *         Example: If operating BW is 160 MHz
41808      *                  EIRP_20 | EIRP_40 | EIRP_80 | EIRP_160
41809      *
41810      *     If the wmi_vdev_ch_power_psd_info or wmi_vdev_ch_power_eirp_info TLV
41811      *     arrays are not both present, check for older TLV
41812      *     (wmi_vdev_ch_power_info) as explained for LPI and VLP.
41813      */
41814 } wmi_vdev_set_tpc_power_fixed_param;
41815 
41816 typedef struct {
41817     A_UINT32 tlv_header;
41818     A_UINT32 chan_cfreq; /* Channel center frequency (MHz) */
41819     A_UINT32 tx_power;   /* Unit: dBm, either PSD/EIRP power for this frequency or incremental for non-PSD BW */
41820 } wmi_vdev_ch_power_info;
41821 
41822 typedef struct {
41823     A_UINT32 tlv_header;
41824     A_UINT32 chan_cfreq; /* Channel center frequency (MHz) of all BSS Sub-channel */
41825     /* psd_power:
41826      * Unit: 0.25dBm/MHz, OOBE PSD power of sub-channel
41827      * Example: a power spectral density of 1 dBm / MHz will be reported
41828      * as the value 4.
41829      */
41830     A_INT32 psd_power;
41831 } wmi_vdev_ch_power_psd_info;
41832 
41833 typedef struct {
41834     A_UINT32 tlv_header;
41835     A_UINT32 chan_cfreq; /* Channel center frequency (MHz) for all BWs (<= current channel BSS BW) */
41836     /* eirp_power:
41837      * Unit: 0.25dBm, EIRP power for all BWs (<= current channel BSS BW)
41838      * Example: a power of 1 dBm will be reported as the value 4.
41839      */
41840     A_INT32 eirp_power;
41841  } wmi_vdev_ch_power_eirp_info;
41842 
41843 typedef struct {
41844     A_UINT32 tlv_header;    /* TLV tag and len; tag equals wmi_txpower_query_cmd_fixed_param  */
41845     A_UINT32 request_id;    /* unique request ID to distinguish the command / event set */
41846 
41847     /* The mode value has the following meaning :
41848      * 0  : 11a
41849      * 1  : 11bg
41850      * 2  : 11b
41851      * 3  : 11g only
41852      * 4  : 11a HT20
41853      * 5  : 11g HT20
41854      * 6  : 11a HT40
41855      * 7  : 11g HT40
41856      * 8  : 11a VHT20
41857      * 9  : 11a VHT40
41858      * 10 : 11a VHT80
41859      * 11 : 11g VHT20
41860      * 12 : 11g VHT40
41861      * 13 : 11g VHT80
41862      * 14 : unknown
41863      */
41864     A_UINT32 mode;
41865     A_UINT32 rate;          /* rate index */
41866     A_UINT32 nss;           /* number of spatial stream */
41867     A_UINT32 beamforming;   /* beamforming parameter 0:disabled, 1:enabled */
41868     A_UINT32 chain_mask;    /* mask for the antenna set to get power */
41869     A_UINT32 chain_index;   /* index for the antenna */
41870 } wmi_get_tpc_power_cmd_fixed_param;
41871 
41872 typedef struct {
41873     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_tpc_power_evt_fixed_param  */
41874     A_UINT32 request_id;    /* request ID set by the command */
41875     A_INT32  tx_power;      /* TX power for the specified HALPHY parameters in half dBm unit */
41876 } wmi_get_tpc_power_evt_fixed_param;
41877 
41878 typedef struct {
41879     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_dpd_status_cmd_fixed_param */
41880     A_UINT32 pdev_id;        /* PDEV ID set by the command */
41881 } wmi_pdev_get_dpd_status_cmd_fixed_param;
41882 
41883 typedef enum {
41884     WMI_DPD_STATUS_DISABLE = 0,
41885     WMI_DPD_STATUS_ENABLE = 1,
41886     WMI_DPD_STATUS_INVALID = 2,
41887 } WMI_DPD_STATUS;
41888 
41889 typedef struct {
41890     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_dpd_status_evt_fixed_param  */
41891     A_UINT32 pdev_id;        /* PDEV Id set by the command */
41892     A_UINT32 dpd_status;    /* DPD status obtained from HALPHY, refer to WMI_DPD_STATUS */
41893 } wmi_pdev_get_dpd_status_evt_fixed_param;
41894 
41895 typedef struct {
41896     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_halphy_cal_status_cmd_fixed_param */
41897     A_UINT32 pdev_id;       /* PDEV ID set by the command */
41898 } wmi_pdev_get_halphy_cal_status_cmd_fixed_param;
41899 
41900 typedef struct {
41901     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_aoa_phasedelta_evt_fixed_param  */
41902     A_UINT32 pdev_id; /* PDEV Id set by the command */
41903     A_UINT32 freq; /* Current channel in MHz */
41904 
41905     /*
41906      * Chain Info
41907      * LSB 16 bits - Max chain supported,
41908      * MSB 16 bits - Chain pair which has phase values:
41909      *        0x0003 - chain 0 and 1
41910      *        0x000c - chain 2 and 3
41911      *        0x0030 - chain 4 and 5
41912      *        0x00c0 - chain 6 and 7
41913      */
41914     A_UINT32 chainInfo;
41915 
41916     /*
41917      * Phase Delta values:
41918      * Two phase delta values are packed into each A_UINT32 word
41919      * LSB 16-bit is 1st value and MSB 16-bit is 2nd value
41920      * Phasedelta values will be 0-1023 (mapped to 0-360 degree)
41921      * Each gain from 0 to 61 has a phasedelta value, e.g.
41922      * gain 0's phase delta occupies bits 15:0 of phasedelta[chain][0],
41923      * gain 1's phase delta occupies bits 31:16 of phasedelta[chain][0],
41924      * gain 2's phase delta occupies bits 15:0 of phasedelta[chain][1], etc.
41925      */
41926     A_UINT32 phasedelta[WMI_MAX_CHAINS_FOR_AOA_RCC][MAX_AOA_PHASEDELTA];
41927 
41928     /*
41929      * IBF cal values:
41930      * Used for final AoA calculation
41931      * [AoAPhase =  ( PhaseDeltaValue + IBFcalValue )   %   1024]
41932      */
41933     A_UINT32 perChainIbfCalVal[WMI_MAX_CHAINS_FOR_AOA_RCC];
41934 } wmi_pdev_aoa_phasedelta_evt_fixed_param;
41935 
41936 #define WMI_AOA_MAX_SUPPORTED_CHAINS_GET(chain_data) \
41937     WMI_GET_BITS(chain_data, 0, 16)
41938 #define WMI_AOA_MAX_SUPPORTED_CHAINS_SET(chain_data, value) \
41939     WMI_SET_BITS(chain_data, 0, 16, value)
41940 
41941 #define WMI_AOA_SUPPORTED_CHAINMASK_GET(chain_data) \
41942     WMI_GET_BITS(chain_data, 16, 16)
41943 #define WMI_AOA_SUPPORTED_CHAINMASK_SET(chain_data, value) \
41944     WMI_SET_BITS(chain_data, 16, 16, value)
41945 
41946 typedef struct {
41947     /** TLV tag and len; tag equals
41948       * WMITLV_TAG_STRUC_wmi_pdev_enhanced_aoa_phasedelta_eventid */
41949     A_UINT32 tlv_header;
41950     /* Current Operating Channel Frequency in MHz */
41951     A_UINT32 freq;
41952     /** pdev_id:
41953      * Identify the MAC.
41954      * See macros starting with WMI_PDEV_ID_ for values.
41955      * In non-DBDC case host should set it to 0.
41956      */
41957     A_UINT32 pdev_id;
41958     /** chain_info:
41959      * B0 -- B15 : Max number of chains supported
41960      * B16 --B31 : Data shared for chainmask -
41961      *             indicates the chains to which the data shared.
41962      */
41963     union {
41964         struct {
41965             A_UINT32 max_supported_chains:16,
41966                      data_for_chainmask:16;
41967         };
41968         A_UINT32 chain_info;
41969     };
41970     /** XBAR configuration to get RF2BB/BB2RF chain mapping
41971      * Samples of xbar_config,
41972      * If xbar_config is 0xFAC688(hex):
41973      *     RF chains 0-7 are connected to BB chains 0-7
41974      *     here,
41975      *         bits 0 to 2 = 0, maps BB chain 0 for RF chain 0
41976      *         bits 3 to 5 = 1, maps BB chain 1 for RF chain 1
41977      *         bits 6 to 8 = 2, maps BB chain 2 for RF chain 2
41978      *         bits 9 to 11 = 3, maps BB chain 3 for RF chain 3
41979      *         bits 12 to 14 = 4, maps BB chain 4 for RF chain 4
41980      *         bits 15 to 17 = 5, maps BB chain 5 for RF chain 5
41981      *         bits 18 to 20 = 6, maps BB chain 6 for RF chain 6
41982      *         bits 21 to 23 = 7, maps BB chain 7 for RF chain 7
41983      *
41984      * If xbar_config is 0x688FAC(hex):
41985      *     RF chains 0-3 are connected to BB chains 4-7
41986      *     RF chains 4-7 are connected to BB chains 0-3
41987      *     here,
41988      *         bits 0 to 2 = 4, maps BB chain 4 for RF chain 0
41989      *         bits 3 to 5 = 5, maps BB chain 5 for RF chain 1
41990      *         bits 6 to 8 = 6, maps BB chain 6 for RF chain 2
41991      *         bits 9 to 11 = 7, maps BB chain 7 for RF chain 3
41992      *         bits 12 to 14 = 0, maps BB chain 0 for RF chain 4
41993      *         bits 15 to 17 = 1, maps BB chain 1 for RF chain 5
41994      *         bits 18 to 20 = 2, maps BB chain 2 for RF chain 6
41995      *         bits 21 to 23 = 3, maps BB chain 3 for RF chain 7
41996      */
41997     A_UINT32 xbar_config;
41998     /**
41999      * IBF cal values:
42000      * Used for final AoA calculation
42001      * [AoAPhase =  ( PhaseDeltaValue + IBFcalValue )   %   1024]
42002      */
42003     A_UINT32 per_chain_ibf_cal_val[WMI_MAX_CHAINS];
42004     /**
42005      * This TLV is followed by TLV arrays containing
42006      * different types of data header and data buffer TLVs:
42007      * 1.  wmi_enhanced_aoa_gain_phase_data_hdr.
42008      *     This TLV contains the array of structure fields which indicate
42009      *     the type and format of data carried in the following data buffer
42010      *     TLV.
42011      * 2.  aoa_data_buf[] - Data buffer TLV.
42012      *     TLV header contains the total buffer size.
42013      *     Data buffer contains the phase_delta_array[Chains][GainEntries]
42014      *     in absolute phase values ranging 0-1024 and
42015      *     gain_delta_array[Chains][GainEntries] are gain index values.
42016      */
42017 } wmi_pdev_enhanced_aoa_phasedelta_evt_fixed_param;
42018 
42019 #define WMI_AOA_DATA_TYPE_GET(data_info) \
42020     WMI_GET_BITS(data_info, 0, 8)
42021 #define WMI_AOA_DATA_TYPE_SET(data_info,value) \
42022     WMI_SET_BITS(data_info, 0, 8, value)
42023 
42024 #define WMI_AOA_NUM_ENTIRES_GET(data_info) \
42025     WMI_GET_BITS(data_info, 8, 8)
42026 #define WMI_AOA_NUM_DATA_ENTRIES_SET(data_info,value) \
42027     WMI_SET_BITS(data_info, 8, 8, value)
42028 
42029 typedef enum _WMI_AOA_EVENT_DATA_TYPE {
42030     WMI_PHASE_DELTA_ARRAY = 0x0,
42031     WMI_GAIN_GROUP_STOP_ARRAY = 0x1,
42032     /* add new types here */
42033     WMI_MAX_DATA_TYPE_ARRAY,
42034 } WMI_AOA_EVENT_DATA_TYPE;
42035 
42036 typedef struct {
42037     /** TLV tag and len; tag equals
42038       * WMITLV_TAG_STRUC_wmi_pdev_enhanced_aoa_phasedelta_eventid */
42039     A_UINT32 tlv_header;
42040     /** data_info:
42041      * Data follows the LSB first and MSB second order in a 32bit word
42042      * bit mapping:
42043      * B0 -- B7  : Data type
42044      * B8 -- B15 : Number of entries to be parsed in terms of 32bit word
42045      *
42046      * If data is Phase delta values - Data type is 0x0
42047      * group stop gain index values - Data type is 0x1
42048      *
42049      * num_entries - Total number of data entries in uint32
42050      */
42051     union {
42052         struct {
42053             A_UINT32 data_type:8,
42054                      num_entries:8,
42055                      reserved:16;
42056         };
42057         A_UINT32 data_info;
42058     };
42059 } wmi_enhanced_aoa_gain_phase_data_hdr;
42060 
42061 typedef enum _WMI_AGC_GAIN_TABLE_IDX {
42062     WMI_AGC_DG_TABLE_IDX = 0,
42063     WMI_AGC_LG_TABLE_IDX,
42064     WMI_AGC_VLG_TABLE_IDX,
42065     WMI_AGC_MAX_GAIN_TABLE_IDX = 8,
42066 } WMI_AGC_GAIN_TABLE_IDX;
42067 
42068 #define WMI_AOA_BDF_NUM_GAIN_TBL_ELEMS_PER_WORD 4
42069 #define WMI_AOA_NUM_GAIN_TBL_ELEMS_PER_WORD 2
42070 #define WMI_AOA_NUM_BYTES_FOR_BDF_GAIN_TBL_ELEM 1
42071 #define WMI_AOA_NUM_BYTES_FOR_GAIN_TBL_ELEM 2
42072 
42073 /* 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)) */
42074 /* 2 bytes (at most)used to store each gain table elements */
42075 #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)
42076 
42077 /* 1 byte (at most) used to store each gain table elements obtained from BDF  */
42078 #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)
42079 
42080 typedef enum {
42081     WMI_AOA_2G = 0,
42082     WMI_AOA_5G,
42083     WMI_AOA_6G,
42084     WMI_AOA_MAX_BAND,
42085 } WMI_AOA_SUPPORTED_BANDS;
42086 
42087 #define WMI_AOA_MAX_AGC_GAIN_GET(pcap_var, tbl_idx, output) \
42088     do { \
42089         A_UINT8 word_idx = 0; \
42090         A_UINT8 bit_index = 0; \
42091         A_UINT8 nth_byte = 0; \
42092         word_idx = tbl_idx >> 1; \
42093         nth_byte = (tbl_idx % WMI_AOA_NUM_GAIN_TBL_ELEMS_PER_WORD); \
42094         bit_index = nth_byte * 8 * WMI_AOA_NUM_BYTES_FOR_GAIN_TBL_ELEM; \
42095         output = WMI_GET_BITS(*(pcap_var + word_idx), bit_index, 16); \
42096     } while (0)
42097 
42098 #define WMI_AOA_MAX_AGC_GAIN_SET(pcap_var, tbl_idx, value) \
42099     do { \
42100         A_UINT8 word_idx = 0; \
42101         A_UINT8 bit_index = 0; \
42102         A_UINT8 nth_byte = 0; \
42103         word_idx = tbl_idx >> 1; \
42104         nth_byte = (tbl_idx % WMI_AOA_NUM_GAIN_TBL_ELEMS_PER_WORD); \
42105         bit_index = nth_byte * 8 * WMI_AOA_NUM_BYTES_FOR_GAIN_TBL_ELEM; \
42106         WMI_SET_BITS(*(pcap_var+word_idx), bit_index, 16, value); \
42107     } while (0)
42108 
42109 #define WMI_AOA_MAX_BDF_ENTRIES_GET(pcap_var, tbl_idx, output) \
42110     do { \
42111         A_UINT8 word_idx = 0; \
42112         A_UINT8 bit_index = 0; \
42113         A_UINT8 nth_byte = 0; \
42114         word_idx = tbl_idx >> 2; \
42115         nth_byte = (tbl_idx % WMI_AOA_BDF_NUM_GAIN_TBL_ELEMS_PER_WORD); \
42116         bit_index = nth_byte * 8 * WMI_AOA_NUM_BYTES_FOR_BDF_GAIN_TBL_ELEM; \
42117         output = WMI_GET_BITS(*(pcap_var+word_idx), bit_index, 8); \
42118     } while (0)
42119 
42120 #define WMI_AOA_MAX_BDF_ENTRIES_SET(pcap_var, tbl_idx, value) \
42121     do { \
42122         A_UINT8 word_idx = 0; \
42123         A_UINT8 nth_byte = 0; \
42124         A_UINT8 bit_index = 0; \
42125         word_idx = tbl_idx >> 2; \
42126         nth_byte = (tbl_idx % WMI_AOA_BDF_NUM_GAIN_TBL_ELEMS_PER_WORD); \
42127         bit_index = nth_byte * 8 * WMI_AOA_NUM_BYTES_FOR_BDF_GAIN_TBL_ELEM; \
42128         WMI_SET_BITS(*(pcap_var+word_idx), bit_index, 8, value); \
42129     } while (0)
42130 
42131 typedef struct {
42132     /** TLV tag and len; tag equals
42133       * WMITLV_TAG_STRUC_wmi_enhanced_aoa_caps_param */
42134     A_UINT32 tlv_header;
42135 
42136     /* Maximum number of Rx AGC gain tables supported */
42137     A_UINT32 max_agc_gain_tbls;
42138 
42139     /* 1 byte is used to store bdf max number of elements in each gain tables */
42140     A_UINT32 max_bdf_gain_entries[WMI_AOA_BDF_NUM_WORD_ENTRIES_FOR_MAX_NUM_AGC_TBL_ELEMS];
42141 
42142     /** This TLV is followed by TLV array - wmi_enhanced_aoa_per_band_caps_param
42143      * containing band specifc agc gain table information.
42144      */
42145 } wmi_enhanced_aoa_caps_param;
42146 
42147 typedef struct {
42148     /** TLV tag and len; tag equals
42149      * WMITLV_TAG_STRUC_wmi_enhanced_aoa_per_band_caps_param */
42150     A_UINT32 tlv_header;
42151 
42152     /* Band information - WMI_AOA_SUPPORTED_BANDS */
42153     A_UINT32 band_info;
42154 
42155     /* 2 bytes are used to store agc max number of elements in each gain tables */
42156     A_UINT32 max_agc_gain[WMI_AOA_NUM_WORD_ENTRIES_FOR_MAX_NUM_AGC_TBL_ELEMS];
42157 } wmi_enhanced_aoa_per_band_caps_param;
42158 
42159 /* WMI_HALPHY_CAL_LIST:
42160  *
42161  * Below is the list of HALPHY online CAL currently enabled in
42162  * WIN chipsets
42163  */
42164 typedef enum {
42165     WMI_HALPHY_CAL_ADC = 0,
42166     WMI_HALPHY_CAL_BWFILTER,
42167     WMI_HALPHY_CAL_PDET_AND_PAL,
42168     WMI_HALPHY_CAL_RXDCO,
42169     WMI_HALPHY_CAL_COMB_TXLO_TXIQ_RXIQ,
42170     WMI_HALPHY_CAL_IBF,
42171     WMI_HALPHY_CAL_PA_DROOP,
42172     WMI_HALPHY_CAL_DAC,
42173     WMI_HALPHY_CAL_ANI,
42174     WMI_HALPHY_CAL_NOISE_FLOOR,
42175 
42176     WMI_HALPHY_CAL_MAX_CAL_LIST
42177 } WMI_HALPHY_CAL_LIST;
42178 
42179 /* WMI_HALPHY_CAL_VALID_BITMAP_STATUS
42180  *
42181  * In WMI wmi_pdev_get_halphy_cal_status_evt_fixed_param
42182  * (halphy_cal_valid_bmap member), below enum list must be used
42183  * to get which calibration status indication is sent by FW to HOST.
42184  * Only if that particular bit it set, corresponding bit of the
42185  * halphy_cal_status variable will be valid.
42186  */
42187 typedef enum {
42188     WMI_HALPHY_CAL_ADC_BMAP                 = (1 << WMI_HALPHY_CAL_ADC),
42189     WMI_HALPHY_CAL_BWFILTER_BMAP            = (1 << WMI_HALPHY_CAL_BWFILTER),
42190     WMI_HALPHY_CAL_PDET_AND_PAL_BMAP        = (1 << WMI_HALPHY_CAL_PDET_AND_PAL),
42191     WMI_HALPHY_CAL_RXDCO_BMAP               = (1 << WMI_HALPHY_CAL_RXDCO),
42192     WMI_HALPHY_CAL_COMB_TXLO_TXIQ_RXIQ_BMAP = (1 << WMI_HALPHY_CAL_COMB_TXLO_TXIQ_RXIQ),
42193     WMI_HALPHY_CAL_IBF_BMAP                 = (1 << WMI_HALPHY_CAL_IBF),
42194     WMI_HALPHY_CAL_PA_DROOP_BMAP            = (1 << WMI_HALPHY_CAL_PA_DROOP),
42195     WMI_HALPHY_CAL_DAC_BMAP                 = (1 << WMI_HALPHY_CAL_DAC),
42196     WMI_HALPHY_CAL_ANI_BMAP                 = (1 << WMI_HALPHY_CAL_ANI),
42197     WMI_HALPHY_CAL_NOISE_FLOOR_BMAP         = (1 << WMI_HALPHY_CAL_NOISE_FLOOR),
42198 } WMI_HALPHY_CAL_VALID_BITMAP_STATUS;
42199 
42200 typedef struct {
42201     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_halphy_cal_status_evt_fixed_param  */
42202     A_UINT32 pdev_id;       /* PDEV Id set by the command */
42203 
42204     /*
42205      * Calibration valid bitmap from HALPHY, refer to
42206      * WMI_HALPHY_CAL_VALID_BITMAP_STATUS.
42207      * Only if this particular bit it set, corresponding bit of the
42208      * halphy_cal_status variable will be valid.
42209      */
42210     A_UINT32 halphy_cal_valid_bmap;
42211 
42212     /* Calibration result status bitmap from HALPHY.
42213      * The WMI_HALPHY_CAL_VALID_BITMAP_STATUS enum identifies which bit
42214      * in the bitmap corresponds to which cal type.
42215      * Each valid bit uses the following settings:
42216      *     1 - SUCCESS
42217      *     0 - FAILURE
42218     */
42219     A_UINT32 halphy_cal_status;
42220 } wmi_pdev_get_halphy_cal_status_evt_fixed_param;
42221 
42222 typedef struct {
42223     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_halphy_cal_bmap_cmd_fixed_param */
42224     A_UINT32 pdev_id;       /* PDEV ID set by the command */
42225 
42226     /*
42227      * Calibration valid bitmap from HOST, refer to
42228      * WMI_HALPHY_CAL_VALID_BITMAP_STATUS.
42229      * Based on the bitmap value, HALPHY will set corresponding mask values
42230      * to each of the online calibrations
42231      */
42232     A_UINT32 online_halphy_cals_bmap;
42233 
42234     /* Calibration enable/disable support for home/scan channel
42235      *     0 - home channel
42236      *     1 - scan channel
42237      *     2 - both home and scan channel
42238      */
42239     A_UINT32 home_scan_channel;
42240 } wmi_pdev_set_halphy_cal_bmap_cmd_fixed_param;
42241 
42242 typedef struct {
42243     A_UINT32 tlv_header;    /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_halphy_cal_bmap_evt_fixed_param */
42244     A_UINT32 pdev_id;       /* PDEV Id set by the command */
42245 
42246     /* Status indication for calibration
42247      *     0 - SUCCESS
42248      *     1 - FAIL
42249      * This WMI command will by sent from HOST dynamically but only one
42250      * at a time. So no need of cookie/request handshake.
42251      */
42252     A_UINT32 status;
42253 } wmi_pdev_set_halphy_cal_bmap_evt_fixed_param;
42254 
42255 /* below structures are related to Motion Detection. */
42256 typedef struct {
42257     /** TLV tag and len; tag equals
42258      *  WMITLV_TAG_STRUC_wmi_motion_det_config_params_cmd_fixed_param */
42259     A_UINT32 tlv_header;         /** TLV Header */
42260     A_UINT32 vdev_id;            /** Vdev ID */
42261     A_UINT32 time_t1;            /** Time gap of successive bursts of
42262                                   * measurement frames during coarse
42263                                   * motion detection (in ms) */
42264     A_UINT32 time_t2;            /** Time gap of successive bursts of
42265                                   * measurement frames during fine
42266                                   * motion detection (in ms) */
42267     A_UINT32 n1;                 /** number of measurement frames in one
42268                                   * burst, for coarse detection */
42269     A_UINT32 n2;                 /** number of measurement frames in one
42270                                   * burst, for fine detection */
42271     A_UINT32 time_t1_gap;        /** gap between measurement frames in
42272                                   * course detection (in ms) */
42273     A_UINT32 time_t2_gap;        /** gap between measurement frames in
42274                                   * fine detection (in ms) */
42275     A_UINT32 coarse_K;           /** number of times motion detection has to
42276                                   * be performed for coarse detection */
42277     A_UINT32 fine_K;             /** number of times motion detection has to
42278                                   * be performed for fine detection */
42279     A_UINT32 coarse_Q;           /** number of times motion is expected
42280                                   * to be detected for success case in
42281                                   * coarse detection */
42282     A_UINT32 fine_Q;             /** number of times motion is expected
42283                                   * to be detected for success case in
42284                                   * fine detection */
42285     A_UINT32 md_coarse_thr_high; /** higher threshold value (in percent)
42286                                   * from host to FW, which will be used in
42287                                   * coarse detection phase of motion detection.
42288                                   * This is the threshold for the correlation
42289                                   * of the old RF local-scattering environment
42290                                   * with the current RF local-scattering
42291                                   * environment.  A value of 100(%) indicates
42292                                   * that neither the transceiver nor any
42293                                   * nearby objects have changed position. */
42294     A_UINT32 md_fine_thr_high;   /** higher threshold value (in percent)
42295                                   * from host to FW, which will be used in
42296                                   * fine detection phase of motion detection.
42297                                   * This is the threshold for correlation
42298                                   * between the old and current RF environments,
42299                                   * as explained above. */
42300     A_UINT32 md_coarse_thr_low;  /** lower threshold value (in percent)
42301                                   * for immediate detection of motion in
42302                                   * coarse detection phase.
42303                                   * This is the threshold for correlation
42304                                   * between the old and current RF environments,
42305                                   * as explained above. */
42306     A_UINT32 md_fine_thr_low;    /** lower threshold value (in percent)
42307                                   * for immediate detection of motion in
42308                                   * fine detection phase.
42309                                   * This is the threshold for correlation
42310                                   * between the old and current RF environments,
42311                                   * as explained above. */
42312 } wmi_motion_det_config_params_cmd_fixed_param;
42313 
42314 typedef struct {
42315     /** TLV tag and len; tag equals
42316      *  WMITLV_TAG_STRUC_wmi_motion_det_base_line_config_params_cmd_fixed_param */
42317     A_UINT32 tlv_header;    /** TLV Header */
42318     A_UINT32 vdev_id;       /** Vdev ID */
42319     A_UINT32 bl_time_t;     /** time T for baseline (in ms)
42320                              * Every bl_time_t, bl_n packets are sent */
42321     A_UINT32 bl_packet_gap; /** gap between measurement frames for baseline
42322                              * (in ms) */
42323     A_UINT32 bl_n;          /** number of measurement frames to be sent
42324                              * during one baseline */
42325     A_UINT32 bl_num_meas;   /** number of times the baseline measurement
42326                              * to be done */
42327 } wmi_motion_det_base_line_config_params_cmd_fixed_param;
42328 
42329 typedef struct {
42330     /** TLV tag and len; tag equals
42331      *  WMITLV_TAG_STRUC_wmi_motion_det_start_stop_cmd_fixed_param */
42332     A_UINT32 tlv_header; /** TLV Header */
42333     A_UINT32 vdev_id;    /** Vdev ID */
42334     A_UINT32 enable;     /** start = 1, stop =0 */
42335 } wmi_motion_det_start_stop_cmd_fixed_param;
42336 
42337 typedef struct {
42338     /** TLV tag and len; tag equals
42339      *  WMITLV_TAG_STRUC_wmi_motion_det_base_line_start_stop_cmd_fixed_param */
42340     A_UINT32 tlv_header; /** TLV Header */
42341     A_UINT32 vdev_id;    /** Vdev ID */
42342     A_UINT32 enable;     /** start = 1, stop =0 */
42343 } wmi_motion_det_base_line_start_stop_cmd_fixed_param;
42344 
42345 typedef struct {
42346     /** TLV tag and len; tag equals
42347      *  WMITLV_TAG_STRUC_wmi_motion_det_event */
42348     A_UINT32 tlv_header; /** TLV Header */
42349     A_UINT32 vdev_id;    /** Vdev ID */
42350     A_UINT32 status;     /** status = 1 -> motion detected */
42351 } wmi_motion_det_event;
42352 
42353 typedef struct {
42354     /** TLV tag and len; tag equals
42355      *  WMITLV_TAG_STRUC_wmi_motion_det_base_line_event */
42356     A_UINT32 tlv_header;           /** TLV Header */
42357     A_UINT32 vdev_id;              /** Vdev ID */
42358     A_UINT32 bl_baseline_value;    /** baseline correlation value calculated
42359                                     * during baselining phase (in %) */
42360     A_UINT32 bl_max_corr_reserved; /** max corr value obtained during baselining
42361                                     * phase (in %); reserved for future */
42362     A_UINT32 bl_min_corr_reserved; /** min corr value obtained during baselining
42363                                     * phase (in %); reserved for future */
42364 } wmi_motion_det_base_line_event;
42365 
42366 /* Below structures are related to OBSS_PD_SPATIAL Reuse */
42367 typedef struct {
42368     /** TLV tag and len; tag equals
42369     * WMITLV_TAG_STRUC_wmi_obss_set_cmd_fixed_param */
42370     A_UINT32 tlv_header;
42371     /** Enable/Disable Spatial Reuse */
42372     A_UINT32 enable;
42373     /*
42374      * In the below fields, "OBSS level" refers to the power of the
42375      * signals received from "Other BSS".
42376      * Spatial reuse will only be permitted if the Other BSS's signal power
42377      * is within the min to max range specified by the below fields.
42378      */
42379     /** Minimum OBSS level to use */
42380     A_INT32 obss_min; /* RSSI in dBm */
42381     /** Maximum OBSS level to use */
42382     A_INT32 obss_max; /* RSSI in dBm */
42383     /** Vdev id*/
42384     A_UINT32 vdev_id;
42385 } wmi_obss_spatial_reuse_set_cmd_fixed_param;
42386 
42387 /*
42388  * Below structure is related to WMI CMD that configures the default
42389  * minimum (OBSS_MIN) and maximum (OBSS_MAX) Other BSS levels (RSSI in dBm)
42390  * for VDEV of a give type (STA or AP). These thresholds are configured
42391  * within the Host and passed down to the FW. FW will use these
42392  * default OBSS_MIN and OBSS_MAX values during roaming if the assoc response
42393  * from the AP does not include spatial reuse parameter set Info Element.
42394  */
42395 typedef struct {
42396     /** TLV tag and len; tag equals
42397     *   WMITLV_TAG_STRUC_wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param
42398     */
42399     A_UINT32 tlv_header;
42400     /*
42401      * In the below fields, "OBSS level" refers to the power of the
42402      * signals received from "Other BSS".
42403      * Spatial reuse will only be permitted if the Other BSS's signal power
42404      * is within the min to max range specified by the below fields.
42405      */
42406     /** Minimum OBSS level to use */
42407     A_INT32 obss_min; /* RSSI in dBm */
42408     /** Maximum OBSS level to use */
42409     A_INT32 obss_max; /* RSSI in dBm */
42410     /** Type of VDEV for which these threshold are applicable.
42411      *  vdev_type should be one of WMI_VDEV_TYPE_STA or WMI_VDEV_TYPE_AP
42412      */
42413     A_UINT32 vdev_type;
42414 } wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param;
42415 
42416 typedef struct {
42417     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_chan_width_peer_list */
42418     wmi_mac_addr peer_macaddr;
42419     A_UINT32 chan_width; /* wmi_channel_width */
42420     A_UINT32 puncture_20mhz_bitmap; /* per peer wmi puncture_bitmap,
42421                                      * each bit indicates one 20 MHz BW
42422                                      * punctured.
42423                                      * This variable should be read from left,
42424                                      * LSb will point to the lowest-frequency
42425                                      * 20 MHz frequency slice.
42426                                      * bit value:
42427                                      *     0 - 20 MHz BW is punctured
42428                                      *     1 - not punctured
42429                                      */
42430 } wmi_chan_width_peer_list;
42431 
42432 #define WMI_PEER_CHAN_WIDTH_SWITCH_SET_VALID_VDEV_ID(comp) WMI_SET_BITS(comp, 31,1, 1)
42433 #define WMI_PEER_CHAN_WIDTH_SWITCH_GET_VALID_VDEV_ID(comp) WMI_GET_BITS(comp, 31, 1)
42434 
42435 #define WMI_PEER_CHAN_WIDTH_SWITCH_SET_VALID_PUNCTURE_BITMAP(comp) WMI_SET_BITS(comp, 30, 1, 1)
42436 #define WMI_PEER_CHAN_WIDTH_SWITCH_GET_VALID_PUNCTURE_BITMAP(comp) WMI_GET_BITS(comp, 30, 1)
42437 
42438 /* bits 29:8 currently unused */
42439 
42440 #define WMI_PEER_CHAN_WIDTH_SWITCH_SET_VDEV_ID(comp, value) WMI_SET_BITS(comp, 0, 8, value)
42441 #define WMI_PEER_CHAN_WIDTH_SWITCH_GET_VDEV_ID(comp) WMI_GET_BITS(comp, 0, 8)
42442 
42443 typedef struct {
42444     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_chan_width_switch_cmd_fixed_param */
42445     A_UINT32 num_peers;
42446     /* vdev_var:
42447      * The MSb (bit 31) indicates that the vdev_id is valid.
42448      * Bit 30 indicates that the puncture bitmap is valid.
42449      * The LSB (bits 0-7) is used to infer the actual vdev_id.
42450      * The other bits can be used for future enhancements.
42451      */
42452     A_UINT32 vdev_var;
42453     /*
42454      * Following this structure is the TLV:
42455      * struct wmi_chan_width_peer_list chan_width_peer_info[num_peers];
42456      */
42457 } wmi_peer_chan_width_switch_cmd_fixed_param;
42458 
42459 #define WMI_PEER_BULK_SET_VDEV_ID(comp, value) WMI_SET_BITS(comp, 0, 8, value)
42460 #define WMI_PEER_BULK_GET_VDEV_ID(comp) WMI_GET_BITS(comp, 0, 8)
42461 /* bits 30:8 currently unused */
42462 #define WMI_PEER_BULK_SET_VALID_VDEV_ID(comp) WMI_SET_BITS(comp, 31, 1, 1)
42463 #define WMI_PEER_BULK_GET_VALID_VDEV_ID(comp) WMI_GET_BITS(comp, 31, 1)
42464 
42465 typedef struct {
42466      A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_peer_list */
42467      wmi_mac_addr peer_macaddr;
42468      /** parameter id */
42469      A_UINT32 param_id;
42470      A_UINT32 param_value;
42471 } wmi_peer_list;
42472 
42473 /* WMI_PEER_BULK_SET_CMDID */
42474 typedef struct {
42475     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_bulk_set_cmd_fixed_param */
42476     /* vdev_var:
42477      * The MSb (bit 31) indicates that the vdev_id is valid.
42478      * The LSB (bits 0-7) is used to infer the actual vdev_id.
42479      * The other bits can be used for future enhancements.
42480      */
42481     A_UINT32 vdev_var;
42482 
42483     /*
42484      * Following this structure is the TLV array:
42485      *     struct wmi_peer_list peer_info[];
42486      */
42487 } wmi_peer_bulk_set_cmd_fixed_param;
42488 
42489 typedef struct {
42490     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_he_tb_action_frm_cmd_fixed_param */
42491     A_UINT32 tlv_header;
42492     /* enable or disable HE TB Action frame */
42493     A_UINT32 enable;
42494     /* length of action frame body in bytes */
42495     A_UINT32 data_len;
42496 /* This TLV is followed by another TLV of array of bytes
42497  * A_UINT8 data[];
42498  * This data array contains the action frame raw data
42499  */
42500 } wmi_pdev_he_tb_action_frm_cmd_fixed_param;
42501 
42502 typedef struct {
42503     /** TLV tag and len; tag equals
42504      *  WMITLV_TAG_STRUC_wmi_hpcs_pulse_start_cmd_fixed_param */
42505     A_UINT32 tlv_header;            /** TLV Header */
42506     A_UINT32 vdev_id;               /** Vdev ID */
42507     A_UINT32 start;                 /** Start/Stop */
42508     A_UINT32 sync_time;             /** Lower 32-bit of the TSF at which the
42509                                      * pulse should be synced. */
42510     A_UINT32 pulse_interval;        /** Periodicity of pulses in micro seconds */
42511     A_UINT32 active_sync_period;    /** Number of beacons to sync before generating
42512                                      * pulse in units of beacon interval.
42513                                      * Valid for clock slaves only. */
42514     A_UINT32 gpio_pin;              /** GPIO Pin number to be used */
42515     A_UINT32 pulse_width;           /** Duration of pulse in micro seconds */
42516 } wmi_hpcs_pulse_start_cmd_fixed_param;
42517 
42518 typedef struct {
42519      /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_muedca_params_config_event_fixed_param */
42520      A_UINT32 tlv_header;                          /** TLV Header */
42521      A_UINT32 pdev_id;
42522      /*
42523       * The following per-AC arrays are indexed using the
42524       * WMI_AC_xxx / wmi_traffic_ac enum values.
42525       */
42526      /* aifsn
42527       * Arbitration inter frame spacing number (AIFSN)
42528       * Values are integers used for back off computation.
42529       */
42530      A_UINT32 aifsn[WMI_AC_MAX];
42531      /* ecwmin
42532       * Exponent form of ContentionWindow min (ECWmin)
42533       * Values are integers used for back off computation.
42534       */
42535      A_UINT32 ecwmin[WMI_AC_MAX];
42536      /* ecwmax
42537       * Exponent form of ContentionWindow max (ECWmax)
42538       * Values are integers used for back off computation.
42539       */
42540      A_UINT32 ecwmax[WMI_AC_MAX];
42541      /* muedca_expiration_time
42542       * MU EDCA Expiration time refers to the length of time after the most
42543       * recent UL trigger time. The MU EDCA Timer field indicates the time
42544       * limit, in units of 8 TUs
42545       */
42546      A_UINT32 muedca_expiration_time[WMI_AC_MAX];
42547  } wmi_muedca_params_config_event_fixed_param;
42548 
42549 /* Default PE Duration subfield indicates the PE duration in units of 4 us */
42550 #define WMI_HEOPS_DEFPE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 0, 3)
42551 #define WMI_HEOPS_DEFPE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 0, 3, value)
42552 
42553 /* TWT required */
42554 #define WMI_HEOPS_TWT_REQUIRED_GET_D3(he_ops) WMI_GET_BITS(he_ops, 3, 1)
42555 #define WMI_HEOPS_TWT_REQUIRED_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 3, 1, value)
42556 
42557 /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
42558 #define WMI_HEOPS_RTSTHLD_GET_D3(he_ops) WMI_GET_BITS(he_ops, 4, 10)
42559 #define WMI_HEOPS_RTSTHLD_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 4, 10, value)
42560 
42561 /* VHT Operation Information Present */
42562 #define WMI_HEOPS_VHTOPSPRSNT_GET_D3(he_ops) WMI_GET_BITS(he_ops, 14, 1)
42563 #define WMI_HEOPS_VHTOPSPRSNT_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 14, 1, value)
42564 
42565 /* Co-Located BSS */
42566 #define WMI_HEOPS_COLOCBSS_GET_D3(he_ops) WMI_GET_BITS(he_ops, 15, 1)
42567 #define WMI_HEOPS_COLOCBSS_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 15, 1, value)
42568 
42569 /* ER SU Disable */
42570 #define WMI_HEOPS_ERSUDIS_GET_D3(he_ops) WMI_GET_BITS(he_ops, 16, 1)
42571 #define WMI_HEOPS_ERSUDIS_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 16, 1, value)
42572 
42573 /* bit17 - bit23 are reserved */
42574 
42575 /* BSS color */
42576 #define WMI_HEOPS_COLOR_GET_D3(he_ops) WMI_GET_BITS(he_ops, 24, 6)
42577 #define WMI_HEOPS_COLOR_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 24, 6, value)
42578 
42579 /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
42580 #define WMI_HEOPS_PARTBSSCOLOR_GET_D3(he_ops) WMI_GET_BITS(he_ops, 30, 1)
42581 #define WMI_HEOPS_PARTBSSCOLOR_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
42582 
42583 /* when set to 1 disables use of BSS color */
42584 #define WMI_HEOPS_BSSCOLORDISABLE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 31, 1)
42585 #define WMI_HEOPS_BSSCOLORDISABLE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 31, 1, value)
42586 
42587 /* PHY Capabilities Information field */
42588 
42589 
42590 /* bit 0 reserved */
42591 
42592 /*
42593  * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
42594  * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
42595  * B2: Indicates STA supports 160 MHz channel width in 5 GHz
42596  * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
42597  * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
42598  *     RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
42599  * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
42600  *     242-tone RU mapping in 40 MHz and 80
42601  * MHz channel width in 5 GHz. Otherwise Reserved.
42602  * B6: Reserved
42603  */
42604 #define WMI_HECAP_PHY_CBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
42605 #define WMI_HECAP_PHY_CBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
42606 
42607 /*
42608  * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
42609  *     where in the preamble only the secondary 20 MHz is punctured
42610  * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
42611  *     where in the preamble only one of the two 20 MHz sub-channels in the
42612  *     secondary 40 MHz is punctured
42613  * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
42614  *     or 80+80 MHz, where in the primary 80 MHz of the preamble only the
42615  *     secondary 20 MHz is punctured
42616  * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
42617  *     or 80+80 MHz, where in the primary 80 MHz of the preamble, the
42618  *     primary 40 MHz is present
42619  */
42620 #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
42621 #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
42622 
42623 /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
42624 #define WMI_HECAP_PHY_COD_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
42625 #define WMI_HECAP_PHY_COD_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
42626 
42627 /* Indicates support of transmission and reception of LDPC encoded packets */
42628 #define WMI_HECAP_PHY_LDPC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
42629 #define WMI_HECAP_PHY_LDPC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
42630 
42631 /*
42632  * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
42633  */
42634 #define WMI_HECAP_PHY_LTFGIFORHE_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
42635 #define WMI_HECAP_PHY_LTFGIFORHE_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
42636 
42637 /*
42638  * If the Doppler Rx subfield is 1, indicates the maximum number of space-time streams supported for reception
42639  *     when a midamble is present in the Data field.
42640  * If the Doppler Tx subfield is 1, indicates the maximum number of space-time streams supported for transmission
42641  *     when a midamble is present in the Data field.
42642  * If both Doppler Rx and Doppler Tx subfields are 1, indicates the maximum number of space-time streams
42643  *     supported for transmission and reception when a midamble is present in the Data field.
42644  */
42645 #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
42646 #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
42647 
42648 /*
42649  * B0: For a transmitting STA acting as beamformee, it indicates support of
42650  *     NDP reception using 4x LTF and 3.2 us guard interval duration
42651  */
42652 #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
42653 #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
42654 
42655 /*
42656  * indicates support for the transmission of an HE TB PPDU that has a
42657  * bandwidth less than or equal to 80 MHz and is using STBC and with
42658  * one spatial stream
42659  */
42660 #define WMI_HECAP_PHY_TXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
42661 #define WMI_HECAP_PHY_TXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
42662 
42663 /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx */
42664 #define WMI_HECAP_PHY_RXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
42665 #define WMI_HECAP_PHY_RXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
42666 
42667 /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
42668 #define WMI_HECAP_PHY_TXDOPPLER_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
42669 #define WMI_HECAP_PHY_TXDOPPLER_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
42670 
42671 /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
42672 #define WMI_HECAP_PHY_RXDOPPLER_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
42673 #define WMI_HECAP_PHY_RXDOPPLER_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
42674 
42675 /*
42676  * If the transmitting STA is an AP:
42677  *     indicates STA supports of reception of full bandwidth UL MU-MIMO
42678  *     transmission.
42679  * If the transmitting STA is a non-AP STA:
42680  *     indicates STA supports of transmission of full bandwidth UL MU-MIMO
42681  *     transmission.
42682  */
42683 #define WMI_HECAP_PHY_UL_MU_MIMO_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
42684 #define WMI_HECAP_PHY_UL_MU_MIMO_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
42685 
42686 /*
42687  * If the transmitting STA is an AP:
42688  *     indicates STA supports of reception of UL MUMIMO transmission on an
42689  *     RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
42690  * If the transmitting STA is a non-AP STA:
42691  *     indicates STA supports of transmission of UL MU-MIMO transmission on an
42692  *     RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
42693  */
42694 #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
42695 #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
42696 
42697 /* Tx DCM
42698  * B0:B1
42699  *     00: Does not support DCM
42700  *     01: BPSK
42701  *     10: QPSK
42702  *     11: 16-QAM
42703  * B2 signals maximum number of spatial streams with DCM
42704  *     0: 1 spatial stream
42705  *     1: 2 spatial streams
42706  */
42707 #define WMI_HECAP_PHY_DCMTX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
42708 #define WMI_HECAP_PHY_DCMTX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
42709 
42710 /* Rx DCM
42711  * B0:B1
42712  *     00: Does not support DCM
42713  *     01: BPSK
42714  *     10: QPSK
42715  *     11: 16-QAM
42716  * B2 signals maximum number of spatial streams with DCM
42717  *     0: 1 spatial stream
42718  *     1: 2 spatial streams
42719  */
42720 #define WMI_HECAP_PHY_DCMRX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
42721 #define WMI_HECAP_PHY_DCMRX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
42722 
42723 
42724 /*
42725  * Indicates that the STA supports the reception of an HE MU PPDU payload
42726  * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
42727  */
42728 #define WMI_HECAP_PHY_ULHEMU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
42729 #define WMI_HECAP_PHY_ULHEMU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
42730 
42731 /* Indicates support for operation as an SU beamformer */
42732 #define WMI_HECAP_PHY_SUBFMR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
42733 #define WMI_HECAP_PHY_SUBFMR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
42734 
42735 /* Indicates support for operation as an SU beamformee */
42736 #define WMI_HECAP_PHY_SUBFME_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
42737 #define WMI_HECAP_PHY_SUBFME_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
42738 
42739 /* Indicates support for operation as an MU Beamformer */
42740 #define WMI_HECAP_PHY_MUBFMR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
42741 #define WMI_HECAP_PHY_MUBFMR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
42742 
42743 /*
42744  * Num STS -1 for <= 80MHz (min val 3)
42745  * The maximum number of space-time streams minus 1 that the STA can
42746  * receive in an HE NDP
42747  */
42748 #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
42749 #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
42750 
42751 
42752 /*
42753  * Num STS -1 for > 80MHz (min val 3)
42754  * The maximum number of space-time streams minus 1 that the STA can
42755  * receive in an HE NDP
42756  */
42757 #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
42758 #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
42759 
42760 
42761 /*
42762  * Number Of Sounding Dimensions For <= 80 MHz
42763  * If SU beamformer capable, set to the maximum supported value of the
42764  * TXVECTOR parameter NUM_STS minus 1.
42765  * Otherwise, reserved.
42766  */
42767 #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
42768 #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
42769 
42770 /*
42771  * Number Of Sounding Dimensions For > 80 MHz
42772  * If SU beamformer capable, set to the maximum supported value of the
42773  * TXVECTOR parameter NUM_STS minus 1.
42774  * Otherwise, reserved.
42775  */
42776 #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
42777 #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
42778 
42779 /*
42780  * Indicates if the HE beamformee is capable of feedback with tone
42781  * grouping of 16 in the HE Compressed Beamforming Report field for
42782  * a SU-type feedback.
42783  */
42784 #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
42785 #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
42786 
42787 /*
42788  * Indicates if the HE beamformee is capable of feedback with tone
42789  * grouping of 16 in the HE Compressed Beamforming Report field for
42790  * a MU-type feedback.
42791  */
42792 #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
42793 #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
42794 
42795 /*
42796  * Indicates if HE beamformee is capable of feedback with codebook
42797  * size {4, 2} in the HECompressed Beamforming Report field for
42798  * a SU-type feedback.
42799  */
42800 #define WMI_HECAP_PHY_CODBK42SU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
42801 #define WMI_HECAP_PHY_CODBK42SU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
42802 
42803 /*
42804  * Indicates if HE beamformee is capable of feedback with codebook
42805  * size {7, 5} in the HE Compressed Beamforming Report field for
42806  * a MU-type feedback.
42807  */
42808 #define WMI_HECAP_PHY_CODBK75MU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
42809 #define WMI_HECAP_PHY_CODBK75MU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
42810 
42811 /*
42812  * Beamforming Feedback With Trigger Frame
42813  * If the transmitting STA is an AP STA:
42814  * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
42815  * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
42816  * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
42817  * If the transmitting STA is a non-AP STA:
42818  * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
42819  * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
42820  * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
42821  */
42822 #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
42823 #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
42824 
42825 /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
42826  * over the right 106-tone RU or partial BW ER
42827  */
42828 #define WMI_HECAP_PHY_HEERSU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
42829 #define WMI_HECAP_PHY_HEERSU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
42830 
42831 /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
42832  * where the RU does not span the entire PPDU bandwidth.
42833  */
42834 #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
42835 #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
42836 
42837 /* Indicates whether or not the PPE Threshold field is present */
42838 #define WMI_HECAP_PHY_PETHRESPRESENT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
42839 #define WMI_HECAP_PHY_PETHRESPRESENT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
42840 
42841 /* Indicates that the STA supports SRP-based SR operation */
42842 #define WMI_HECAP_PHY_SRPSPRESENT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
42843 #define WMI_HECAP_PHY_SRPPRESENT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
42844 
42845 /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
42846 #define WMI_HECAP_PHY_PWRBOOSTAR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
42847 #define WMI_HECAP_PHY_PWRBOOSTAR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
42848 
42849 /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
42850 #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
42851 #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
42852 
42853 /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
42854  * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
42855  * minus 1. Otherwise, reserved.
42856  */
42857 #define WMI_HECAP_PHY_MAXNC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
42858 #define WMI_HECAP_PHY_MAXNC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
42859 
42860 /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
42861  * STBC with one spatial stream
42862  */
42863 #define WMI_HECAP_PHY_STBCTXGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
42864 #define WMI_HECAP_PHY_STBCTXGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
42865 
42866 /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
42867  * STBC with one spatial stream
42868  */
42869 #define WMI_HECAP_PHY_STBCRXGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
42870 #define WMI_HECAP_PHY_STBCRXGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
42871 
42872 /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
42873 #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
42874 #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
42875 
42876 /*
42877  * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
42878  * 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.
42879  */
42880 #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
42881 #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
42882 
42883 /*
42884  * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
42885  * 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.
42886  */
42887 #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
42888 #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
42889 
42890 /*
42891  * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
42892  * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
42893  * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
42894  * 160 MHz HE TB PPDU.
42895  */
42896 #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
42897 #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
42898 
42899 /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
42900 #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
42901 #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
42902 
42903 /*
42904  * If the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF in
42905  * 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
42906  * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
42907  *
42908  * If the Doppler Tx subfield is 1, indicates support for transmitting midambles with 2x HE-LTF, 1x HE-LTF
42909  * in HE TB PPDU when allowed.
42910 
42911  * If both the Doppler Rx and Doppler Tx subfields are 1, indicates support for receiving midambles with 2x HELTF,
42912  * 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
42913  * 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
42914  * to 1; and also support for transmitting midambles with 2x HE-LTF, 1x HE-LTF in HE TB PPDU when allowed.
42915  */
42916 #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
42917 #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
42918 
42919 /*
42920  * If the DCM Max Constellation Tx subfield is greater than 0, then the DCM Max BW subfield indicates the
42921  * maximum bandwidth of a PPDU that the STA might transmit with DCM applied.
42922  *
42923  * If the DCM Max Constellation Rx subfield is greater than 0, then the DCM Max BW subfield indicates the
42924  * maximum bandwidth of a PPDU with DCM applied that the STA can receive.
42925  *
42926  * If both the DCM Max Constellation Tx subfield and DCM Max Constellation Rx subfield are 0, then this
42927  * subfield is reserved.
42928  *
42929  * 0=20MHz, 1=40Mhz, 2=80Mhz, 3=160Mhz or 80+80Mhz
42930  */
42931 #define WMI_HECAP_PHY_DCMMAXBW_GET_D3(he_cap_phy)  WMI_GET_BITS(he_cap_phy[2], 6, 2)
42932 #define WMI_HECAP_PHY_DCMMAXBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 6, 2, value)
42933 
42934 /*
42935  * For a non-AP STA, indicates support for receiving a DL HE MU PPDU where the number of OFDM symbols
42936  * in the HE SIG-B field is greater than 16.
42937  */
42938 #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET_D3(he_cap_phy)  WMI_GET_BITS(he_cap_phy[2], 8, 1)
42939 #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 8, 1, value)
42940 
42941 /*
42942  * For an AP, indicates support for the reception of full bandwidth non-triggered CQI-only feedback.
42943  * For a non-AP STA, indicates support for the transmission of full bandwidth non-triggered CQI-only feedback.
42944  */
42945 #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET_D3(he_cap_phy)  WMI_GET_BITS(he_cap_phy[2], 9, 1)
42946 #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 9, 1, value)
42947 
42948 /*
42949  * For a non-AP STA, indicates support for the transmission of 1024-QAM on a 26-, 52-, and 106-tone RU.
42950  * Reserved for an AP.
42951  */
42952 #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET_D3(he_cap_phy)  WMI_GET_BITS(he_cap_phy[2], 10, 1)
42953 #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 10, 1, value)
42954 
42955 /*
42956  * Indicates support for the reception of 1024-QAM on a 26-, 52-, and 106-tone RU.
42957  */
42958 #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET_D3(he_cap_phy)  WMI_GET_BITS(he_cap_phy[2], 11, 1)
42959 #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 11, 1, value)
42960 
42961 /*
42962  * Indicates support for reception of an HE MU PPDU with an RU spanning the entire PPDU bandwidth and a
42963  * compressed HE-SIG-B format.
42964  */
42965 #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET_D3(he_cap_phy)  WMI_GET_BITS(he_cap_phy[2], 12, 1)
42966 #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 12, 1, value)
42967 
42968 /*
42969  * Indicates support for reception of an HE MU PPDU with a bandwidth less than or equal to 80 MHz, an RU
42970  * spanning the entire PPDU bandwidth and a non-compressed HE-SIG-B format.
42971  */
42972 #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET_D3(he_cap_phy)  WMI_GET_BITS(he_cap_phy[2], 13, 1)
42973 #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 13, 1, value)
42974 
42975 /* HE MAC Capabilities Information field format */
42976 
42977 /* HTC + HE Support  Set to 1 if STA supports reception of HE Variant HT control Field */
42978 #define WMI_HECAP_MAC_HECTRL_GET_D3(he_cap) WMI_GET_BITS(he_cap, 0, 1)
42979 #define WMI_HECAP_MAC_HECTRL_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
42980 
42981 /* set to 1 to for TWT Requestor support */
42982 #define WMI_HECAP_MAC_TWTREQ_GET_D3(he_cap) WMI_GET_BITS(he_cap, 1, 1)
42983 #define WMI_HECAP_MAC_TWTREQ_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
42984 
42985 /* set to 1 to for TWT Responder support */
42986 #define WMI_HECAP_MAC_TWTRSP_GET_D3(he_cap) WMI_GET_BITS(he_cap, 2, 1)
42987 #define WMI_HECAP_MAC_TWTRSP_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
42988 
42989 /* Level of frag support
42990    Set to 0 for no support for dynamic fragmentation.
42991    Set to 1 for support for dynamic fragments that are contained within a S-MPDU
42992    Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
42993         one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
42994    Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
42995         dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
42996         for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
42997 */
42998 #define WMI_HECAP_MAC_HEFRAG_GET_D3(he_cap) WMI_GET_BITS(he_cap, 3, 2)
42999 #define WMI_HECAP_MAC_HEFRAG_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
43000 
43001 /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs */
43002 #define WMI_HECAP_MAC_MAXFRAGMSDU_GET_D3(he_cap) WMI_GET_BITS(he_cap, 5, 3)
43003 #define WMI_HECAP_MAC_MAXFRAGMSDU_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
43004 
43005 
43006 /* 0 =  no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
43007 #define WMI_HECAP_MAC_MINFRAGSZ_GET_D3(he_cap) WMI_GET_BITS(he_cap, 8, 2)
43008 #define WMI_HECAP_MAC_MINFRAGSZ_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
43009 
43010 /*0 = no additional processing time, 1 = 8us,2 = 16us */
43011 #define WMI_HECAP_MAC_TRIGPADDUR_GET_D3(he_cap) WMI_GET_BITS(he_cap, 10, 2)
43012 #define WMI_HECAP_MAC_TRIGPADDUR_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
43013 
43014 /* Indicates the number of TIDs of QoS Data frames that an HE STA can receive in a multi-TID AMPDU */
43015 #define WMI_HECAP_MAC_MTID_RX_GET_D3(he_cap) WMI_GET_BITS(he_cap, 12, 3)
43016 #define WMI_HECAP_MAC_MTID_RX_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
43017 
43018 /* Indicates support for link adaptation using the HLA Control subfield. */
43019 #define WMI_HECAP_MAC_HELINK_ADPT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 15, 2)
43020 #define WMI_HECAP_MAC_HELINK_ADPT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 15, 2, value)
43021 
43022 /* Set to 1 for reception of AllAck support */
43023 #define WMI_HECAP_MAC_AACK_GET_D3(he_cap) WMI_GET_BITS(he_cap, 17, 1)
43024 #define WMI_HECAP_MAC_AACK_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
43025 
43026 /* Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field */
43027 #define WMI_HECAP_MAC_TRS_GET_D3(he_cap) WMI_GET_BITS(he_cap, 18, 1)
43028 #define WMI_HECAP_MAC_TRS_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
43029 
43030 /* Set to 1 if the STA supports the BSR A-Control field functionality.*/
43031 #define WMI_HECAP_MAC_BSR_GET_D3(he_cap) WMI_GET_BITS(he_cap, 19, 1)
43032 #define WMI_HECAP_MAC_BSR_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
43033 
43034 /* Set to 1 when the STA supports broadcast TWT functionality.*/
43035 #define WMI_HECAP_MAC_BCSTTWT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 20, 1)
43036 #define WMI_HECAP_MAC_BCSTTWT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
43037 
43038 /* Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap */
43039 #define WMI_HECAP_MAC_32BITBA_GET_D3(he_cap) WMI_GET_BITS(he_cap, 21, 1)
43040 #define WMI_HECAP_MAC_32BITBA_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
43041 
43042 /* Set to 1 if the STA supports MU cascading operation */
43043 #define WMI_HECAP_MAC_MUCASCADE_GET_D3(he_cap) WMI_GET_BITS(he_cap, 22, 1)
43044 #define WMI_HECAP_MAC_MUCASCADE_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
43045 
43046 /* Set to 1 when the STA supports reception of this multi-TID A-MPDU format */
43047 #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D3(he_cap) WMI_GET_BITS(he_cap, 23, 1)
43048 #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
43049 
43050 /* bit 24 - reserved */
43051 
43052 /* Set to 1 if the STA supports reception of the OMI A-Control field */
43053 #define WMI_HECAP_MAC_OMI_GET_D3(he_cap) WMI_GET_BITS(he_cap, 25, 1)
43054 #define WMI_HECAP_MAC_OMI_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
43055 
43056 /*1 if OFDMA Random Access Supported */
43057 #define WMI_HECAP_MAC_OFDMARA_GET_D3(he_cap) WMI_GET_BITS(he_cap, 26, 1)
43058 #define WMI_HECAP_MAC_OFDMARA_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
43059 
43060 /* Maximum AMPDU Length Exponent.
43061  * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
43062  * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
43063  * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
43064  * padding is not included in this limit.
43065 */
43066 #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D3(he_cap) WMI_GET_BITS(he_cap, 27, 2)
43067 #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
43068 
43069 
43070 /* A-MSDU Fragmentation Support */
43071 #define WMI_HECAP_MAC_AMSDUFRAG_GET_D3(he_cap) WMI_GET_BITS(he_cap, 29, 1)
43072 #define WMI_HECAP_MAC_AMSDUFRAG_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
43073 
43074 /* Flexible TWT Schedule Support */
43075 #define WMI_HECAP_MAC_FLEXTWT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 30, 1)
43076 #define WMI_HECAP_MAC_FLEXTWT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
43077 
43078 /* Rx Control Frame to MultiBSS */
43079 #define WMI_HECAP_MAC_MBSS_GET_D3(he_cap) WMI_GET_BITS(he_cap, 31, 1)
43080 #define WMI_HECAP_MAC_MBSS_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
43081 
43082 /* 2nd DWORD of HE MAC Capabilities */
43083 
43084 /* BSRP A-MPDU Aggregation
43085  * maintaining compatibility since we don't support this now so not wasting memory
43086  */
43087 #define WMI_HECAP_MAC_BSRPAMPDU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 0, 1)
43088 #define WMI_HECAP_MAC_BSRPAMPDU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 0, 1, value)
43089 
43090 /* Quiet Time Period (QTP) operation
43091  * maintaining compatibility since we don't support this now so not wasting memory
43092  */
43093 #define WMI_HECAP_MAC_QTP_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 1, 1)
43094 #define WMI_HECAP_MAC_QTP_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 1, 1, value)
43095 
43096 /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
43097  * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
43098  * that contains a BQR in the A-Control subfield
43099  * maintaining compatibility since we don't support this now so not wasting memory
43100  */
43101 #define WMI_HECAP_MAC_ABQR_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 2, 1)
43102 #define WMI_HECAP_MAC_ABQR_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 2, 1, value)
43103 
43104 /* Indicates support by the STA for the role of SRP Responder.*/
43105 #define WMI_HECAP_MAC_SRPRESP_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 3, 1)
43106 #define WMI_HECAP_MAC_SRPRESP_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 3, 1, value)
43107 
43108 /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
43109  * the NDP Feedback Report Poll Trigger frame.
43110  */
43111 #define WMI_HECAP_MAC_NDPFDBKRPT_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 4, 1)
43112 #define WMI_HECAP_MAC_NDPFDBKRPT_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 4, 1, value)
43113 
43114 /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
43115  * frames or TIM frames as described in AP operation for opportunistic power save.
43116  * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
43117  */
43118 #define WMI_HECAP_MAC_OPS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 5, 1)
43119 #define WMI_HECAP_MAC_OPS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 5, 1, value)
43120 
43121 /* Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
43122  * a QoS Data frame for which no block ack agreement exists.
43123  */
43124 #define WMI_HECAP_MAC_AMSDUINAMPDU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 6, 1)
43125 #define WMI_HECAP_MAC_AMSDUINAMPDU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 6, 1, value)
43126 
43127 /* Indicates the number of TIDs of QoS Data frames that an HE STA can transmit in a multi-TID AMPDU */
43128 #define WMI_HECAP_MAC_MTID_TX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 7, 3)
43129 #define WMI_HECAP_MAC_MTID_TX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 7, 3, value)
43130 
43131 /* Indicates whether an HE STA supports an HE subchannel selective transmission operation */
43132 #define WMI_HECAP_MAC_SUBCHANSELTX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 10, 1)
43133 #define WMI_HECAP_MAC_SUBCHANSELTX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 10, 1, value)
43134 
43135 /* Indicates support by a STA to receive a TRS Control subfield or a Trigger frame with a User Info
43136  * field addressed to the STA with the RU Allocation subfield of the TRS Control subfield or the User
43137  * Info field indicating 2x996-tone.
43138  */
43139 #define WMI_HECAP_MAC_UL2X996RU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 11, 1)
43140 #define WMI_HECAP_MAC_UL2X996RU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 11, 1, value)
43141 
43142 /* Indicates whether an AP supports interpretation of the UL MU Data Disable subfield of the OM Control subfield */
43143 #define WMI_HECAP_MAC_OMCULMUDDIS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 12, 1)
43144 #define WMI_HECAP_MAC_OMCULMUDDIS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 12, 1, value)
43145 
43146 /* Indicates the spatial multiplexing power save mode after receiving a
43147  * Trigger frame that is in operation immediately after (re)association.
43148  */
43149 #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 13, 1)
43150 #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 13, 1, value)
43151 
43152 /* Indicates support for Punctured Sounding */
43153 #define WMI_HECAP_MAC_PUNCSOUNDING_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 14, 1)
43154 #define WMI_HECAP_MAC_PUNCSOUNDING_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 14, 1, value)
43155 
43156 /* Indicates support for receiving a Trigger frame in an HT PPDU and
43157  * receiving a Trigger frame in a VHT PPDU
43158  */
43159 #define WMI_HECAP_MAC_HTVHTTRIGRX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 15, 1)
43160 #define WMI_HECAP_MAC_HTVHTTRIGRX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 15, 1, value)
43161 
43162 /*
43163  * The following conditionally-defined macros can be used in systems
43164  * which only support either 802.11ax draft 2 or 802.11ax draft 3,
43165  * but not both, and which make this D2 vs. D3 selection at build time.
43166  */
43167 #ifdef SUPPORT_11AX_D3
43168   #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D3
43169   #define WMI_HEOPS_COLOR_SET WMI_HEOPS_COLOR_SET_D3
43170   #define WMI_HEOPS_DEFPE_GET WMI_HEOPS_DEFPE_GET_D3
43171   #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D3
43172   #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D3
43173   #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D3
43174   #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_REQUIRED_GET_D3  /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET */
43175   #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_REQUIRED_SET_D3  /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET */
43176   #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D3
43177   #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D3
43178   #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D3
43179   #define WMI_HEOPS_PARTBSSCOLOR_SET WMI_HEOPS_PARTBSSCOLOR_SET_D3
43180   #define WMI_HEOPS_COLOCBSS_GET WMI_HEOPS_COLOCBSS_GET_D3
43181   #define WMI_HEOPS_COLOCBSS_SET WMI_HEOPS_COLOCBSS_SET_D3
43182   #define WMI_HEOPS_VHTOPSPRSNT_GET WMI_HEOPS_VHTOPSPRSNT_GET_D3
43183   #define WMI_HEOPS_VHTOPSPRSNT_SET WMI_HEOPS_VHTOPSPRSNT_SET_D3
43184   #define WMI_HEOPS_ERSUDIS_GET WMI_HEOPS_ERSUDIS_GET_D3
43185   #define WMI_HEOPS_ERSUDIS_SET WMI_HEOPS_ERSUDIS_SET_D3
43186   #define WMI_HEOPS_BSSCOLORDISABLE_GET WMI_HEOPS_BSSCOLORDISABLE_GET_D3
43187   #define WMI_HEOPS_BSSCOLORDISABLE_SET WMI_HEOPS_BSSCOLORDISABLE_SET_D3
43188   #define WMI_HEOPS_TXBSSID_GET(he_ops) (0)       /* DEPRECATED - DO NOT USE */
43189   #define WMI_HEOPS_TXBSSID_SET(he_ops, value)    /* DEPRECATED - DO NOT USE */
43190 
43191   #define WMI_HECAP_PHY_CBW_GET WMI_HECAP_PHY_CBW_GET_D3
43192   #define WMI_HECAP_PHY_CBW_SET WMI_HECAP_PHY_CBW_SET_D3
43193   #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D3
43194   #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D3
43195   #define WMI_HECAP_PHY_COD_GET WMI_HECAP_PHY_COD_GET_D3
43196   #define WMI_HECAP_PHY_COD_SET WMI_HECAP_PHY_COD_SET_D3
43197   #define WMI_HECAP_PHY_LDPC_GET WMI_HECAP_PHY_LDPC_GET_D3
43198   #define WMI_HECAP_PHY_LDPC_SET WMI_HECAP_PHY_LDPC_SET_D3
43199   #define WMI_HECAP_PHY_TXLDPC_GET WMI_HECAP_PHY_LDPC_GET /* Deprecated use WMI_HECAP_PHY_LDPC */
43200   #define WMI_HECAP_PHY_TXLDPC_SET WMI_HECAP_PHY_LDPC_SET /* Deprecated use WMI_HECAP_PHY_LDPC */
43201   #define WMI_HECAP_PHY_RXLDPC_GET WMI_HECAP_PHY_LDPC_GET /* Deprecated use WMI_HECAP_PHY_LDPC */
43202   #define WMI_HECAP_PHY_RXLDPC_SET WMI_HECAP_PHY_LDPC_SET /* Deprecated use WMI_HECAP_PHY_LDPC */
43203   #define WMI_HECAP_PHY_LTFGIFORHE_GET WMI_HECAP_PHY_LTFGIFORHE_GET_D3
43204   #define WMI_HECAP_PHY_LTFGIFORHE_SET WMI_HECAP_PHY_LTFGIFORHE_SET_D3
43205   #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3
43206   #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3
43207   #define WMI_HECAP_PHY_LTFGIFORNDP_GET WMI_HECAP_PHY_LTFGIFORNDP_GET_D3
43208   #define WMI_HECAP_PHY_LTFGIFORNDP_SET WMI_HECAP_PHY_LTFGIFORNDP_SET_D3
43209   #define WMI_HECAP_PHY_TXSTBC_GET WMI_HECAP_PHY_TXSTBC_GET_D3
43210   #define WMI_HECAP_PHY_TXSTBC_SET WMI_HECAP_PHY_TXSTBC_SET_D3
43211   #define WMI_HECAP_PHY_RXSTBC_GET WMI_HECAP_PHY_RXSTBC_GET_D3
43212   #define WMI_HECAP_PHY_RXSTBC_SET WMI_HECAP_PHY_RXSTBC_SET_D3
43213   #define WMI_HECAP_PHY_TXDOPPLER WMI_HECAP_PHY_TXDOPPLER_GET_D3
43214   #define WMI_HECAP_PHY_TXDOPPLER_SET WMI_HECAP_PHY_TXDOPPLER_SET_D3
43215   #define WMI_HECAP_PHY_RXDOPPLER_GET WMI_HECAP_PHY_RXDOPPLER_GET_D3
43216   #define WMI_HECAP_PHY_RXDOPPLER_SET WMI_HECAP_PHY_RXDOPPLER_SET_D3
43217   #define WMI_HECAP_PHY_UL_MU_MIMO_GET WMI_HECAP_PHY_UL_MU_MIMO_GET_D3
43218   #define WMI_HECAP_PHY_UL_MU_MIMO_SET WMI_HECAP_PHY_UL_MU_MIMO_SET_D3
43219   #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D3
43220   #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D3
43221   #define WMI_HECAP_PHY_DCMTX_GET WMI_HECAP_PHY_DCMTX_GET_D3
43222   #define WMI_HECAP_PHY_DCMTX_SET WMI_HECAP_PHY_DCMTX_SET_D3
43223   #define WMI_HECAP_PHY_DCMRX_GET WMI_HECAP_PHY_DCMRX_GET_D3
43224   #define WMI_HECAP_PHY_DCMRX_SET WMI_HECAP_PHY_DCMRX_SET_D3
43225   /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
43226   #define WMI_HECAP_PHY_DCM_GET WMI_HECAP_PHY_DCMRX_GET_D3
43227   #define WMI_HECAP_PHY_DCM_SET WMI_HECAP_PHY_DCMRX_SET_D3
43228   #define WMI_HECAP_PHY_ULHEMU_GET WMI_HECAP_PHY_ULHEMU_GET_D3
43229   #define WMI_HECAP_PHY_ULHEMU_SET WMI_HECAP_PHY_ULHEMU_SET_D3
43230   #define WMI_HECAP_PHY_SUBFMR_GET WMI_HECAP_PHY_SUBFMR_GET_D3
43231   #define WMI_HECAP_PHY_SUBFMR_SET WMI_HECAP_PHY_SUBFMR_SET_D3
43232   #define WMI_HECAP_PHY_SUBFME_GET WMI_HECAP_PHY_SUBFME_GET_D3
43233   #define WMI_HECAP_PHY_SUBFME_SET WMI_HECAP_PHY_SUBFME_SET_D3
43234   #define WMI_HECAP_PHY_MUBFMR_GET WMI_HECAP_PHY_MUBFMR_GET_D3
43235   #define WMI_HECAP_PHY_MUBFMR_SET WMI_HECAP_PHY_MUBFMR_SET_D3
43236   #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3
43237   #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3
43238   #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3
43239   #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3
43240   #define WMI_HECAP_PHY_NSTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3
43241   #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3
43242   #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3
43243   #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3
43244   #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D3
43245   #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D3
43246   #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D3
43247   #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D3
43248   #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D3
43249   #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D3
43250   #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D3
43251   #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D3
43252   #define WMI_HECAP_PHY_CODBK42SU_GET WMI_HECAP_PHY_CODBK42SU_GET_D3
43253   #define WMI_HECAP_PHY_CODBK42SU_SET WMI_HECAP_PHY_CODBK42SU_SET_D3
43254   #define WMI_HECAP_PHY_CODBK75MU_GET WMI_HECAP_PHY_CODBK75MU_GET_D3
43255   #define WMI_HECAP_PHY_CODBK75MU_SET WMI_HECAP_PHY_CODBK75MU_SET_D3
43256   #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D3
43257   #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D3
43258   #define WMI_HECAP_PHY_HEERSU_GET WMI_HECAP_PHY_HEERSU_GET_D3
43259   #define WMI_HECAP_PHY_HEERSU_SET WMI_HECAP_PHY_HEERSU_SET_D3
43260   #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D3
43261   #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D3
43262   #define WMI_HECAP_PHY_PETHRESPRESENT_GET WMI_HECAP_PHY_PETHRESPRESENT_GET_D3
43263   #define WMI_HECAP_PHY_PETHRESPRESENT_SET WMI_HECAP_PHY_PETHRESPRESENT_SET_D3
43264   #define WMI_HECAP_PHY_SRPSPRESENT_GET WMI_HECAP_PHY_SRPSPRESENT_GET_D3
43265   #define WMI_HECAP_PHY_SRPPRESENT_SET WMI_HECAP_PHY_SRPPRESENT_SET_D3
43266   #define WMI_HECAP_PHY_PWRBOOSTAR_GET WMI_HECAP_PHY_PWRBOOSTAR_GET_D3
43267   #define WMI_HECAP_PHY_PWRBOOSTAR_SET WMI_HECAP_PHY_PWRBOOSTAR_SET_D3
43268   #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D3
43269   #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D3
43270   #define WMI_HECAP_PHY_MAXNC_GET WMI_HECAP_PHY_MAXNC_GET_D3
43271   #define WMI_HECAP_PHY_MAXNC_SET WMI_HECAP_PHY_MAXNC_SET_D3
43272   #define WMI_HECAP_PHY_STBCTXGT80_GET WMI_HECAP_PHY_STBCTXGT80_GET_D3
43273   #define WMI_HECAP_PHY_STBCTXGT80_SET WMI_HECAP_PHY_STBCTXGT80_SET_D3
43274   #define WMI_HECAP_PHY_STBCRXGT80_GET WMI_HECAP_PHY_STBCRXGT80_GET_D3
43275   #define WMI_HECAP_PHY_STBCRXGT80_SET WMI_HECAP_PHY_STBCRXGT80_SET_D3
43276   #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D3
43277   #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D3
43278   #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D3
43279   #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D3
43280   #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D3
43281   #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D3
43282   #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D3
43283   #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D3
43284   #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D3
43285   #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D3
43286   #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET_D3
43287   #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET_D3
43288   #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET  /* DEPRECATED */
43289   #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET  /* DEPRECATED */
43290   #define WMI_HECAP_PHY_DCMMAXBW_GET WMI_HECAP_PHY_DCMMAXBW_GET_D3
43291   #define WMI_HECAP_PHY_DCMMAXBW_SET WMI_HECAP_PHY_DCMMAXBW_SET_D3
43292   #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET_D3
43293   #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET_D3
43294   #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET_D3
43295   #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET_D3
43296   #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET_D3
43297   #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET_D3
43298   #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET_D3
43299   #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET_D3
43300   #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET_D3
43301   #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET_D3
43302   #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET_D3
43303   #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET_D3
43304   #define WMI_HECAP_PHY_DB_GET(he_phy_cap) (0)        /* DEPRECATED - DO NOT USE */
43305   #define WMI_HECAP_PHY_DB_SET(he_phy_cap, value)     /* DEPRECATED - DO NOT USE */
43306   #define WMI_HECAP_MAC_HECTRL_GET WMI_HECAP_MAC_HECTRL_GET_D3
43307   #define WMI_HECAP_MAC_HECTRL_SET WMI_HECAP_MAC_HECTRL_SET_D3
43308   #define WMI_HECAP_MAC_TWTREQ_GET WMI_HECAP_MAC_TWTREQ_GET_D3
43309   #define WMI_HECAP_MAC_TWTREQ_SET WMI_HECAP_MAC_TWTREQ_SET_D3
43310   #define WMI_HECAP_MAC_TWTRSP_GET WMI_HECAP_MAC_TWTRSP_GET_D3
43311   #define WMI_HECAP_MAC_TWTRSP_SET WMI_HECAP_MAC_TWTRSP_SET_D3
43312   #define WMI_HECAP_MAC_HEFRAG_GET WMI_HECAP_MAC_HEFRAG_GET_D3
43313   #define WMI_HECAP_MAC_HEFRAG_SET WMI_HECAP_MAC_HEFRAG_SET_D3
43314   #define WMI_HECAP_MAC_MAXFRAGMSDU_GET WMI_HECAP_MAC_MAXFRAGMSDU_GET_D3
43315   #define WMI_HECAP_MAC_MAXFRAGMSDU_SET WMI_HECAP_MAC_MAXFRAGMSDU_SET_D3
43316   #define WMI_HECAP_MAC_MINFRAGSZ_GET WMI_HECAP_MAC_MINFRAGSZ_GET_D3
43317   #define WMI_HECAP_MAC_MINFRAGSZ_SET WMI_HECAP_MAC_MINFRAGSZ_SET_D3
43318   #define WMI_HECAP_MAC_TRIGPADDUR_GET WMI_HECAP_MAC_TRIGPADDUR_GET_D3
43319   #define WMI_HECAP_MAC_TRIGPADDUR_SET WMI_HECAP_MAC_TRIGPADDUR_SET_D3
43320   #define WMI_HECAP_MAC_MTID_RX_GET WMI_HECAP_MAC_MTID_RX_GET_D3
43321   #define WMI_HECAP_MAC_MTID_RX_SET WMI_HECAP_MAC_MTID_RX_SET_D3
43322   #define WMI_HECAP_MAC_HELINK_ADPT_GET WMI_HECAP_MAC_HELINK_ADPT_GET_D3
43323   #define WMI_HECAP_MAC_HELINK_ADPT_SET WMI_HECAP_MAC_HELINK_ADPT_SET_D3
43324   #define WMI_HECAP_MAC_AACK_GET WMI_HECAP_MAC_AACK_GET_D3
43325   #define WMI_HECAP_MAC_AACK_SET WMI_HECAP_MAC_AACK_SET_D3
43326   #define WMI_HECAP_MAC_TRS_GET WMI_HECAP_MAC_TRS_GET_D3
43327   #define WMI_HECAP_MAC_TRS_SET WMI_HECAP_MAC_TRS_SET_D3
43328   #define WMI_HECAP_MAC_ULMURSP_GET(he_cap) (0)    /* DEPRECATED, DO NOT USE */
43329   #define WMI_HECAP_MAC_ULMURSP_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
43330   #define WMI_HECAP_MAC_BSR_GET WMI_HECAP_MAC_BSR_GET_D3
43331   #define WMI_HECAP_MAC_BSR_SET WMI_HECAP_MAC_BSR_SET_D3
43332   #define WMI_HECAP_MAC_BCSTTWT_GET WMI_HECAP_MAC_BCSTTWT_GET_D3
43333   #define WMI_HECAP_MAC_BCSTTWT_SET WMI_HECAP_MAC_BCSTTWT_SET_D3
43334   #define WMI_HECAP_MAC_32BITBA_GET WMI_HECAP_MAC_32BITBA_GET_D3
43335   #define WMI_HECAP_MAC_32BITBA_SET WMI_HECAP_MAC_32BITBA_SET_D3
43336   #define WMI_HECAP_MAC_MUCASCADE_GET WMI_HECAP_MAC_MUCASCADE_GET_D3
43337   #define WMI_HECAP_MAC_MUCASCADE_SET WMI_HECAP_MAC_MUCASCADE_SET_D3
43338   #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D3
43339   #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D3
43340   #define WMI_HECAP_MAC_GROUPMSTABA_GET(he_cap) (0)    /* DEPRECATED, DO NOT USE */
43341   #define WMI_HECAP_MAC_GROUPMSTABA_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
43342   #define WMI_HECAP_MAC_OMI_GET WMI_HECAP_MAC_OMI_GET_D3
43343   #define WMI_HECAP_MAC_OMI_SET WMI_HECAP_MAC_OMI_SET_D3
43344   #define WMI_HECAP_MAC_OFDMARA_GET WMI_HECAP_MAC_OFDMARA_GET_D3
43345   #define WMI_HECAP_MAC_OFDMARA_SET WMI_HECAP_MAC_OFDMARA_SET_D3
43346   #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D3
43347   #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D3
43348   #define WMI_HECAP_MAC_AMSDUFRAG_GET WMI_HECAP_MAC_AMSDUFRAG_GET_D3
43349   #define WMI_HECAP_MAC_AMSDUFRAG_SET WMI_HECAP_MAC_AMSDUFRAG_SET_D3
43350   #define WMI_HECAP_MAC_FLEXTWT_GET WMI_HECAP_MAC_FLEXTWT_GET_D3
43351   #define WMI_HECAP_MAC_FLEXTWT_SET WMI_HECAP_MAC_FLEXTWT_SET_D3
43352   #define WMI_HECAP_MAC_MBSS_GET WMI_HECAP_MAC_MBSS_GET_D3
43353   #define WMI_HECAP_MAC_MBSS_SET WMI_HECAP_MAC_MBSS_SET_D3
43354   #define WMI_HECAP_MAC_BSRPAMPDU_GET WMI_HECAP_MAC_BSRPAMPDU_GET_D3
43355   #define WMI_HECAP_MAC_BSRPAMPDU_SET WMI_HECAP_MAC_BSRPAMPDU_SET_D3
43356   #define WMI_HECAP_MAC_QTP_GET WMI_HECAP_MAC_QTP_GET_D3
43357   #define WMI_HECAP_MAC_QTP_SET WMI_HECAP_MAC_QTP_SET_D3
43358   #define WMI_HECAP_MAC_ABQR_GET WMI_HECAP_MAC_ABQR_GET_D3
43359   #define WMI_HECAP_MAC_ABQR_SET WMI_HECAP_MAC_ABQR_SET_D3
43360   #define WMI_HECAP_MAC_SRPRESP_GET WMI_HECAP_MAC_SRPRESP_GET_D3
43361   #define WMI_HECAP_MAC_SRPRESP_SET WMI_HECAP_MAC_SRPRESP_SET_D3
43362   #define WMI_HECAP_MAC_SRRESP_GET(he_cap2) (0)    /* DEPRECATED, DO NOT USE */
43363   #define WMI_HECAP_MAC_SRRESP_SET(he_cap2, value) /* DEPRECATED, DO NOT USE */
43364   #define WMI_HECAP_MAC_NDPFDBKRPT_GET WMI_HECAP_MAC_NDPFDBKRPT_GET_D3
43365   #define WMI_HECAP_MAC_NDPFDBKRPT_SET WMI_HECAP_MAC_NDPFDBKRPT_SET_D3
43366   #define WMI_HECAP_MAC_OPS_GET WMI_HECAP_MAC_OPS_GET_D3
43367   #define WMI_HECAP_MAC_OPS_SET WMI_HECAP_MAC_OPS_SET_D3
43368   #define WMI_HECAP_MAC_AMSDUINAMPDU_GET WMI_HECAP_MAC_AMSDUINAMPDU_GET_D3
43369   #define WMI_HECAP_MAC_AMSDUINAMPDU_SET WMI_HECAP_MAC_AMSDUINAMPDU_SET_D3
43370   #define WMI_HECAP_MAC_MTID_TX_GET WMI_HECAP_MAC_MTID_TX_GET_D3
43371   #define WMI_HECAP_MAC_MTID_TX_SET WMI_HECAP_MAC_MTID_TX_SET_D3
43372   #define WMI_HECAP_MAC_SUBCHANSELTX_GET WMI_HECAP_MAC_SUBCHANSELTX_GET_D3
43373   #define WMI_HECAP_MAC_SUBCHANSELTX_SET WMI_HECAP_MAC_SUBCHANSELTX_SET_D3
43374   #define WMI_HECAP_MAC_UL2X996RU_GET WMI_HECAP_MAC_UL2X996RU_GET_D3
43375   #define WMI_HECAP_MAC_UL2X996RU_SET WMI_HECAP_MAC_UL2X996RU_SET_D3
43376   #define WMI_HECAP_MAC_OMCULMUDDIS_GET WMI_HECAP_MAC_OMCULMUDDIS_GET_D3
43377   #define WMI_HECAP_MAC_OMCULMUDDIS_SET WMI_HECAP_MAC_OMCULMUDDIS_SET_D3
43378   #define WMI_HECAP_MAC_HELKAD_GET(he_cap) (0)           /* DEPRECATED, DO NOT USE */
43379   #define WMI_HECAP_MAC_HELKAD_SET(he_cap, value)        /* DEPRECATED, DO NOT USE */
43380   #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3 /* DEPRECATED - DO NOT USE */
43381   #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3 /* DEPRECATED - DO NOT USE */
43382   #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D3
43383   #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D3
43384   #define WMI_HECAP_MAC_PUNCSOUNDING_GET WMI_HECAP_MAC_PUNCSOUNDING_GET_D3
43385   #define WMI_HECAP_MAC_PUNCSOUNDING_SET WMI_HECAP_MAC_PUNCSOUNDING_SET_D3
43386   #define WMI_HECAP_MAC_HTVHTTRIGRX_GET WMI_HECAP_MAC_HTVHTTRIGRX_GET_D3
43387   #define WMI_HECAP_MAC_HTVHTTRIGRX_SET WMI_HECAP_MAC_HTVHTTRIGRX_SET_D3
43388 #else /* SUPPORT_11AX_D3 vs. D2 */
43389   /* D2 and D2- */
43390   #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D2
43391   #define WMI_HEOPS_COLOR_SET WMI_HEOPS_COLOR_SET_D2
43392   #define WMI_HEOPS_DEFPE_GET WMI_HEOPS_DEFPE_GET_D2
43393   #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D2
43394   #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D2
43395   #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D2
43396   #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_GET_D2     /* Deprecated */
43397   #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_SET_D2     /* Deprecated */
43398   #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D2
43399   #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D2
43400   #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D2
43401   #define WMI_HEOPS_PARTBSSCOLOR_SET WMI_HEOPS_PARTBSSCOLOR_SET_D2
43402   #define WMI_HEOPS_MAXBSSID_GET WMI_HEOPS_MAXBSSID_GET_D2
43403   #define WMI_HEOPS_MAXBSSID_SET WMI_HEOPS_MAXBSSID_SET_D2
43404   #define WMI_HEOPS_TXBSSID_GET WMI_HEOPS_TXBSSID_GET_D2
43405   #define WMI_HEOPS_TXBSSID_SET WMI_HEOPS_TXBSSID_SET_D2
43406   #define WMI_HEOPS_BSSCOLORDISABLE_GET WMI_HEOPS_BSSCOLORDISABLE_GET_D2
43407   #define WMI_HEOPS_BSSCOLORDISABLE_SET WMI_HEOPS_BSSCOLORDISABLE_SET_D2
43408   #define WMI_HEOPS_DUALBEACON_GET WMI_HEOPS_DUALBEACON_GET_D2
43409   #define WMI_HEOPS_DUALBEACON_SET WMI_HEOPS_DUALBEACON_SET_D2
43410   #define WMI_HECAP_PHY_DB_GET WMI_HECAP_PHY_DB_GET_D2
43411   #define WMI_HECAP_PHY_DB_SET WMI_HECAP_PHY_DB_SET_D2
43412   #define WMI_HECAP_PHY_CBW_GET WMI_HECAP_PHY_CBW_GET_D2
43413   #define WMI_HECAP_PHY_CBW_SET WMI_HECAP_PHY_CBW_SET_D2
43414   #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D2
43415   #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D2
43416   #define WMI_HECAP_PHY_COD_GET WMI_HECAP_PHY_COD_GET_D2
43417   #define WMI_HECAP_PHY_COD_SET WMI_HECAP_PHY_COD_SET_D2
43418   #define WMI_HECAP_PHY_LDPC_GET WMI_HECAP_PHY_LDPC_GET_D2
43419   #define WMI_HECAP_PHY_LDPC_SET WMI_HECAP_PHY_LDPC_SET_D2
43420   #define WMI_HECAP_PHY_TXLDPC_GET WMI_HECAP_PHY_TXLDPC_GET_D2
43421   #define WMI_HECAP_PHY_TXLDPC_SET WMI_HECAP_PHY_TXLDPC_SET_D2
43422   #define WMI_HECAP_PHY_RXLDPC_GET WMI_HECAP_PHY_RXLDPC_GET_D2
43423   #define WMI_HECAP_PHY_RXLDPC_SET WMI_HECAP_PHY_RXLDPC_SET_D2
43424   #define WMI_HECAP_PHY_LTFGIFORHE_GET WMI_HECAP_PHY_LTFGIFORHE_GET_D2
43425   #define WMI_HECAP_PHY_LTFGIFORHE_SET WMI_HECAP_PHY_LTFGIFORHE_SET_D2
43426   #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET_D2
43427   #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET_D2
43428   #define WMI_HECAP_PHY_LTFGIFORNDP_GET WMI_HECAP_PHY_LTFGIFORNDP_GET_D2
43429   #define WMI_HECAP_PHY_LTFGIFORNDP_SET WMI_HECAP_PHY_LTFGIFORNDP_SET_D2
43430   #define WMI_HECAP_PHY_TXSTBC_GET WMI_HECAP_PHY_TXSTBC_GET_D2
43431   #define WMI_HECAP_PHY_TXSTBC_SET WMI_HECAP_PHY_TXSTBC_SET_D2
43432   #define WMI_HECAP_PHY_RXSTBC_GET WMI_HECAP_PHY_RXSTBC_GET_D2
43433   #define WMI_HECAP_PHY_RXSTBC_SET WMI_HECAP_PHY_RXSTBC_SET_D2
43434   #define WMI_HECAP_PHY_TXDOPPLER_GET WMI_HECAP_PHY_TXDOPPLER_GET_D2
43435   #define WMI_HECAP_PHY_TXDOPPLER_SET WMI_HECAP_PHY_TXDOPPLER_SET_D2
43436   #define WMI_HECAP_PHY_RXDOPPLER_GET WMI_HECAP_PHY_RXDOPPLER_GET_D2
43437   #define WMI_HECAP_PHY_RXDOPPLER_SET WMI_HECAP_PHY_RXDOPPLER_SET_D2
43438   #define WMI_HECAP_PHY_UL_MU_MIMO_GET WMI_HECAP_PHY_UL_MU_MIMO_GET_D2
43439   #define WMI_HECAP_PHY_UL_MU_MIMO_SET WMI_HECAP_PHY_UL_MU_MIMO_SET_D2
43440   #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2
43441   #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2
43442   #define WMI_HECAP_PHY_DCMTX_GET WMI_HECAP_PHY_DCMTX_GET_D2
43443   #define WMI_HECAP_PHY_DCMTX_SET WMI_HECAP_PHY_DCMTX_SET_D2
43444   #define WMI_HECAP_PHY_DCMRX_GET WMI_HECAP_PHY_DCMRX_GET_D2
43445   #define WMI_HECAP_PHY_DCMRX_SET WMI_HECAP_PHY_DCMRX_SET_D2
43446   #define WMI_HECAP_PHY_ULHEMU_GET WMI_HECAP_PHY_ULHEMU_GET_D2
43447   #define WMI_HECAP_PHY_ULHEMU_SET WMI_HECAP_PHY_ULHEMU_SET_D2
43448   #define WMI_HECAP_PHY_SUBFMR_GET WMI_HECAP_PHY_SUBFMR_GET_D2
43449   #define WMI_HECAP_PHY_SUBFMR_SET WMI_HECAP_PHY_SUBFMR_SET_D2
43450   #define WMI_HECAP_PHY_SUBFME_GET WMI_HECAP_PHY_SUBFME_GET_D2
43451   #define WMI_HECAP_PHY_SUBFME_SET WMI_HECAP_PHY_SUBFME_SET_D2
43452   #define WMI_HECAP_PHY_MUBFMR_GET WMI_HECAP_PHY_MUBFMR_GET_D2
43453   #define WMI_HECAP_PHY_MUBFMR_SET WMI_HECAP_PHY_MUBFMR_SET_D2
43454   #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2
43455   #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2
43456   #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D2
43457   #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D2
43458   #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D2
43459   #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D2
43460   #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D2
43461   #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D2
43462   #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D2
43463   #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D2
43464   #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D2
43465   #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D2
43466   #define WMI_HECAP_PHY_CODBK42SU_GET WMI_HECAP_PHY_CODBK42SU_GET_D2
43467   #define WMI_HECAP_PHY_CODBK42SU_SET WMI_HECAP_PHY_CODBK42SU_SET_D2
43468   #define WMI_HECAP_PHY_CODBK75MU_GET WMI_HECAP_PHY_CODBK75MU_GET_D2
43469   #define WMI_HECAP_PHY_CODBK75MU_SET WMI_HECAP_PHY_CODBK75MU_SET_D2
43470   #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D2
43471   #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D2
43472   #define WMI_HECAP_PHY_HEERSU_GET WMI_HECAP_PHY_HEERSU_GET_D2
43473   #define WMI_HECAP_PHY_HEERSU_SET WMI_HECAP_PHY_HEERSU_SET_D2
43474   #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D2
43475   #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D2
43476   #define WMI_HECAP_PHY_PETHRESPRESENT_GET WMI_HECAP_PHY_PETHRESPRESENT_GET_D2
43477   #define WMI_HECAP_PHY_PETHRESPRESENT_SET WMI_HECAP_PHY_PETHRESPRESENT_SET_D2
43478   #define WMI_HECAP_PHY_SRPSPRESENT_GET WMI_HECAP_PHY_SRPSPRESENT_GET_D2
43479   #define WMI_HECAP_PHY_SRPPRESENT_SET WMI_HECAP_PHY_SRPPRESENT_SET_D2
43480   #define WMI_HECAP_PHY_PWRBOOSTAR_GET WMI_HECAP_PHY_PWRBOOSTAR_GET_D2
43481   #define WMI_HECAP_PHY_PWRBOOSTAR_SET WMI_HECAP_PHY_PWRBOOSTAR_SET_D2
43482   #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D2
43483   #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D2
43484   #define WMI_HECAP_PHY_MAXNC_GET WMI_HECAP_PHY_MAXNC_GET_D2
43485   #define WMI_HECAP_PHY_MAXNC_SET WMI_HECAP_PHY_MAXNC_SET_D2
43486   #define WMI_HECAP_PHY_STBCTXGT80_GET WMI_HECAP_PHY_STBCTXGT80_GET_D2
43487   #define WMI_HECAP_PHY_STBCTXGT80_SET WMI_HECAP_PHY_STBCTXGT80_SET_D2
43488   #define WMI_HECAP_PHY_STBCRXGT80_GET WMI_HECAP_PHY_STBCRXGT80_GET_D2
43489   #define WMI_HECAP_PHY_STBCRXGT80_SET WMI_HECAP_PHY_STBCRXGT80_SET_D2
43490   #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D2
43491   #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D2
43492   #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D2
43493   #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D2
43494   #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D2
43495   #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D2
43496   #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D2
43497   #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D2
43498   #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D2
43499   #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D2
43500   #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET_D2
43501   #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET_D2
43502   #define WMI_HECAP_MAC_HECTRL_GET WMI_HECAP_MAC_HECTRL_GET_D2
43503   #define WMI_HECAP_MAC_HECTRL_SET WMI_HECAP_MAC_HECTRL_SET_D2
43504   #define WMI_HECAP_MAC_TWTREQ_GET WMI_HECAP_MAC_TWTREQ_GET_D2
43505   #define WMI_HECAP_MAC_TWTREQ_SET WMI_HECAP_MAC_TWTREQ_SET_D2
43506   #define WMI_HECAP_MAC_TWTRSP_GET WMI_HECAP_MAC_TWTRSP_GET_D2
43507   #define WMI_HECAP_MAC_TWTRSP_SET WMI_HECAP_MAC_TWTRSP_SET_D2
43508   #define WMI_HECAP_MAC_HEFRAG_GET WMI_HECAP_MAC_HEFRAG_GET_D2
43509   #define WMI_HECAP_MAC_HEFRAG_SET WMI_HECAP_MAC_HEFRAG_SET_D2
43510   #define WMI_HECAP_MAC_MAXFRAGMSDU_GET WMI_HECAP_MAC_MAXFRAGMSDU_GET_D2
43511   #define WMI_HECAP_MAC_MAXFRAGMSDU_SET WMI_HECAP_MAC_MAXFRAGMSDU_SET_D2
43512   #define WMI_HECAP_MAC_MINFRAGSZ_GET WMI_HECAP_MAC_MINFRAGSZ_GET_D2
43513   #define WMI_HECAP_MAC_MINFRAGSZ_SET WMI_HECAP_MAC_MINFRAGSZ_SET_D2
43514   #define WMI_HECAP_MAC_TRIGPADDUR_GET WMI_HECAP_MAC_TRIGPADDUR_GET_D2
43515   #define WMI_HECAP_MAC_TRIGPADDUR_SET WMI_HECAP_MAC_TRIGPADDUR_SET_D2
43516   #define WMI_HECAP_MAC_MTID_GET WMI_HECAP_MAC_MTID_GET_D2
43517   #define WMI_HECAP_MAC_MTID_SET WMI_HECAP_MAC_MTID_SET_D2
43518   #define WMI_HECAP_MAC_AMSDUINAMPDU_GET WMI_HECAP_MAC_AMSDUINAMPDU_GET_D2
43519   #define WMI_HECAP_MAC_AMSDUINAMPDU_SET WMI_HECAP_MAC_AMSDUINAMPDU_SET_D2
43520   #define WMI_HECAP_MAC_HELKAD_GET WMI_HECAP_MAC_HELKAD_GET_D2
43521   #define WMI_HECAP_MAC_HELKAD_SET WMI_HECAP_MAC_HELKAD_SET_D2
43522   #define WMI_HECAP_MAC_AACK_GET WMI_HECAP_MAC_AACK_GET_D2
43523   #define WMI_HECAP_MAC_AACK_SET WMI_HECAP_MAC_AACK_SET_D2
43524   #define WMI_HECAP_MAC_ULMURSP_GET WMI_HECAP_MAC_ULMURSP_GET_D2
43525   #define WMI_HECAP_MAC_ULMURSP_SET WMI_HECAP_MAC_ULMURSP_SET_D2
43526   #define WMI_HECAP_MAC_BSR_GET WMI_HECAP_MAC_BSR_GET_D2
43527   #define WMI_HECAP_MAC_BSR_SET WMI_HECAP_MAC_BSR_SET_D2
43528   #define WMI_HECAP_MAC_BCSTTWT_GET WMI_HECAP_MAC_BCSTTWT_GET_D2
43529   #define WMI_HECAP_MAC_BCSTTWT_SET WMI_HECAP_MAC_BCSTTWT_SET_D2
43530   #define WMI_HECAP_MAC_32BITBA_GET WMI_HECAP_MAC_32BITBA_GET_D2
43531   #define WMI_HECAP_MAC_32BITBA_SET WMI_HECAP_MAC_32BITBA_SET_D2
43532   #define WMI_HECAP_MAC_MUCASCADE_GET WMI_HECAP_MAC_MUCASCADE_GET_D2
43533   #define WMI_HECAP_MAC_MUCASCADE_SET WMI_HECAP_MAC_MUCASCADE_SET_D2
43534   #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D2
43535   #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D2
43536   #define WMI_HECAP_MAC_GROUPMSTABA_GET WMI_HECAP_MAC_GROUPMSTABA_GET_D2
43537   #define WMI_HECAP_MAC_GROUPMSTABA_SET WMI_HECAP_MAC_GROUPMSTABA_SET_D2
43538   #define WMI_HECAP_MAC_OMI_GET WMI_HECAP_MAC_OMI_GET_D2
43539   #define WMI_HECAP_MAC_OMI_SET WMI_HECAP_MAC_OMI_SET_D2
43540   #define WMI_HECAP_MAC_OFDMARA_GET WMI_HECAP_MAC_OFDMARA_GET_D2
43541   #define WMI_HECAP_MAC_OFDMARA_SET WMI_HECAP_MAC_OFDMARA_SET_D2
43542   #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D2
43543   #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D2
43544   #define WMI_HECAP_MAC_AMSDUFRAG_GET WMI_HECAP_MAC_AMSDUFRAG_GET_D2
43545   #define WMI_HECAP_MAC_AMSDUFRAG_SET WMI_HECAP_MAC_AMSDUFRAG_SET_D2
43546   #define WMI_HECAP_MAC_FLEXTWT_GET WMI_HECAP_MAC_FLEXTWT_GET_D2
43547   #define WMI_HECAP_MAC_FLEXTWT_SET WMI_HECAP_MAC_FLEXTWT_SET_D2
43548   #define WMI_HECAP_MAC_MBSS_GET WMI_HECAP_MAC_MBSS_GET_D2
43549   #define WMI_HECAP_MAC_MBSS_SET WMI_HECAP_MAC_MBSS_SET_D2
43550   #define WMI_HECAP_MAC_BSRPAMPDU_GET WMI_HECAP_MAC_BSRPAMPDU_GET_D2
43551   #define WMI_HECAP_MAC_BSRPAMPDU_SET WMI_HECAP_MAC_BSRPAMPDU_SET_D2
43552   #define WMI_HECAP_MAC_QTP_GET WMI_HECAP_MAC_QTP_GET_D2
43553   #define WMI_HECAP_MAC_QTP_SET WMI_HECAP_MAC_QTP_SET_D2
43554   #define WMI_HECAP_MAC_ABQR_GET WMI_HECAP_MAC_ABQR_GET_D2
43555   #define WMI_HECAP_MAC_ABQR_SET WMI_HECAP_MAC_ABQR_SET_D2
43556   #define WMI_HECAP_MAC_SRRESP_GET WMI_HECAP_MAC_SRRESP_GET_D2
43557   #define WMI_HECAP_MAC_SRRESP_SET WMI_HECAP_MAC_SRRESP_SET_D2
43558   #define WMI_HECAP_MAC_OPS_GET WMI_HECAP_MAC_OPS_GET_D2
43559   #define WMI_HECAP_MAC_OPS_SET WMI_HECAP_MAC_OPS_SET_D2
43560   #define WMI_HECAP_MAC_NDPFDBKRPT_GET WMI_HECAP_MAC_NDPFDBKRPT_GET_D2
43561   #define WMI_HECAP_MAC_NDPFDBKRPT_SET WMI_HECAP_MAC_NDPFDBKRPT_SET_D2
43562   #define WMI_HECAP_MAC_MBAHECTRL_GET WMI_HECAP_MAC_MBAHECTRL_GET_D2
43563   #define WMI_HECAP_MAC_MBAHECTRL_SET WMI_HECAP_MAC_MBAHECTRL_SET_D2
43564   #define WMI_HECAP_MAC_MURTS_GET WMI_HECAP_MAC_MURTS_GET_D2
43565   #define WMI_HECAP_MAC_MURTS_SET WMI_HECAP_MAC_MURTS_SET_D2
43566   #define WMI_HECAP_PHY_CBMODE_GET WMI_HECAP_PHY_CBMODE_GET_D2
43567   #define WMI_HECAP_PHY_CBMODE_SET WMI_HECAP_PHY_CBMODE_SET_D2
43568   #define WMI_HECAP_PHY_OLTF_GET WMI_HECAP_PHY_OLTF_GET_D2
43569   #define WMI_HECAP_PHY_OLTF_SET WMI_HECAP_PHY_OLTF_SET_D2
43570   #define WMI_HECAP_PHY_SUBFMESTS_GET WMI_HECAP_PHY_SUBFMESTS_GET_D2
43571   #define WMI_HECAP_PHY_SUBFMESTS_SET WMI_HECAP_PHY_SUBFMESTS_SET_D2
43572   #define WMI_HECAP_PHY_PADDING_GET WMI_HECAP_PHY_PADDING_GET_D2
43573   #define WMI_HECAP_PHY_PADDING_SET WMI_HECAP_PHY_PADDING_SET_D2
43574   #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET WMI_HECAP_PHY_DLOFMAMUMIMO_GET_D2
43575   #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET WMI_HECAP_PHY_DLOFDMAMUMIO_SET_D2
43576   #define WMI_HECAP_PHY_32GI_GET WMI_HECAP_PHY_32GI_GET_D2
43577   #define WMI_HECAP_PHY_32GI_SET WMI_HECAP_PHY_32GI_SET_D2
43578   #define WMI_HECAP_PHY_NOSUNDIMENS_GET WMI_HECAP_PHY_NOSUNDIMENS_GET_D2
43579   #define WMI_HECAP_PHY_NOSUNDIMENS_SET WMI_HECAP_PHY_NOSUNDIMENS_SET_D2
43580   #define WMI_HECAP_PHY_40MHZNSS_GET WMI_HECAP_PHY_40MHZNSS_GET_D2
43581   #define WMI_HECAP_PHY_40MHZNSS_SET WMI_HECAP_PHY_40MHZNSS_SET_D2
43582   #define WMI_HECAP_PHY_ULOFDMA_GET WMI_HECAP_PHY_ULOFDMA_GET_D2
43583   #define WMI_HECAP_PHY_ULOFDMA_SET WMI_HECAP_PHY_ULOFDMA_SET_D2
43584   #define WMI_HECAP_PHY_DCM_GET WMI_HECAP_PHY_DCM_GET_D2
43585   #define WMI_HECAP_PHY_DCM_SET WMI_HECAP_PHY_DCM_SET_D2
43586   #define WMI_HECAP_PHY_NSTSLT80MHZ_GET WMI_HECAP_PHY_NSTSLT80MHZ_GET_D2
43587   #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2
43588   #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2
43589   #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2
43590   #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D2
43591   #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D2
43592   #define WMI_HECAP_MAC_PUNCSOUNDING_GET WMI_HECAP_MAC_PUNCSOUNDING_GET_D2
43593   #define WMI_HECAP_MAC_PUNCSOUNDING_SET WMI_HECAP_MAC_PUNCSOUNDING_SET_D2
43594   #define WMI_HECAP_MAC_HTVHTTRIGRX_GET WMI_HECAP_MAC_HTVHTTRIGRX_GET_D2
43595   #define WMI_HECAP_MAC_HTVHTTRIGRX_SET WMI_HECAP_MAC_HTVHTTRIGRX_SET_D2
43596 #endif /* SUPPORT_11AX_D3 */
43597 
43598 
43599 /****** 11BE EHT PHY Capabilities Information field ******/
43600 
43601 /* Bit 0: reserved */
43602 
43603 /* Bit 1: support for 320Mhz in 6 GHz */
43604 #define WMI_EHTCAP_PHY_320MHZIN6GHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 1, 1)
43605 #define WMI_EHTCAP_PHY_320MHZIN6GHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 1, 1, value)
43606 
43607 /* Bit 2: support for 242-tone RU in BW wider than 20Mhz */
43608 #define WMI_EHTCAP_PHY_242TONERUBWLT20MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 2, 1)
43609 #define WMI_EHTCAP_PHY_242TONERUBWLT20MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 2, 1, value)
43610 
43611 /* Bit 3: NDP with 4x EHT-LTF and 3.2us GI */
43612 #define WMI_EHTCAP_PHY_NDP4XEHTLTFAND320NSGI_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 3, 1)
43613 #define WMI_EHTCAP_PHY_NDP4XEHTLTFAND320NSGI_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 3, 1, value)
43614 
43615 /* Bit 4: partial bandwidth UL MU-MIMO */
43616 #define WMI_EHTCAP_PHY_PARTIALBWULMU_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 4, 1)
43617 #define WMI_EHTCAP_PHY_PARTIALBWULMU_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 4, 1, value)
43618 
43619 /* Bit 5: SU beamformer */
43620 #define WMI_EHTCAP_PHY_SUBFMR_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 5, 1)
43621 #define WMI_EHTCAP_PHY_SUBFMR_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 5, 1, value)
43622 
43623 /* Bit 6: SU beamformee */
43624 #define WMI_EHTCAP_PHY_SUBFME_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 6, 1)
43625 #define WMI_EHTCAP_PHY_SUBFME_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 6, 1, value)
43626 
43627 /* Bit 7-9: beamformee SS (<=80Mhz) */
43628 #define WMI_EHTCAP_PHY_BFMESSLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 7, 3)
43629 #define WMI_EHTCAP_PHY_BFMESSLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 7, 3, value)
43630 
43631 /* Bit 10-12: beamformee SS (=160Mhz) */
43632 #define WMI_EHTCAP_PHY_BFMESS160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 10, 3)
43633 #define WMI_EHTCAP_PHY_BFMESS160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 10, 3, value)
43634 
43635 /* Bit 13-15: beamformee SS (=320Mhz) */
43636 #define WMI_EHTCAP_PHY_BFMESS320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 13, 3)
43637 #define WMI_EHTCAP_PHY_BFMESS320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 13, 3, value)
43638 
43639 /* Bit 16-18: number of sounding dimensions (<=80Mhz) */
43640 #define WMI_EHTCAP_PHY_NUMSOUNDLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 16, 3)
43641 #define WMI_EHTCAP_PHY_NUMSOUNDLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 16, 3, value)
43642 
43643 /* Bit 19-21: number of sounding dimensions (=160Mhz) */
43644 #define WMI_EHTCAP_PHY_NUMSOUND160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 19, 3)
43645 #define WMI_EHTCAP_PHY_NUMSOUND160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 19, 3, value)
43646 
43647 /* Bit 22-24: number of sounding dimensions (=320Mhz) */
43648 #define WMI_EHTCAP_PHY_NUMSOUND320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 22, 3)
43649 #define WMI_EHTCAP_PHY_NUMSOUND320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 22, 3, value)
43650 
43651 /* Bit 25: ng = 16 SU feedback */
43652 #define WMI_EHTCAP_PHY_NG16SUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 25, 1)
43653 #define WMI_EHTCAP_PHY_NG16SUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 25, 1, value)
43654 
43655 /* Bit 26: ng = 16 MU feedback */
43656 #define WMI_EHTCAP_PHY_NG16MUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 26, 1)
43657 #define WMI_EHTCAP_PHY_NG16MUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 26, 1, value)
43658 
43659 /* Bit 27: codebook size {4,2} SU feedback */
43660 #define WMI_EHTCAP_PHY_CODBK42SUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 27, 1)
43661 #define WMI_EHTCAP_PHY_CODBK42SUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 27, 1, value)
43662 
43663 /* Bit 28: codebook size {7,5} MU feedback */
43664 #define WMI_EHTCAP_PHY_CODBK75MUFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 28, 1)
43665 #define WMI_EHTCAP_PHY_CODBK75MUFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 28, 1, value)
43666 
43667 /* Bit 29: triggered SU beamforming feedback */
43668 #define WMI_EHTCAP_PHY_TRIGSUBFFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 29, 1)
43669 #define WMI_EHTCAP_PHY_TRIGSUBFFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 29, 1, value)
43670 
43671 /* Bit 30: triggered MU beamforming partial BW feedback */
43672 #define WMI_EHTCAP_PHY_TRIGMUBFPARTBWFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 30, 1)
43673 #define WMI_EHTCAP_PHY_TRIGMUBFPARTBWFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 30, 1, value)
43674 
43675 /* Bit 31: triggered CQI feedback */
43676 #define WMI_EHTCAP_PHY_TRIGCQIFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[0], 31, 1)
43677 #define WMI_EHTCAP_PHY_TRIGCQIFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[0], 31, 1, value)
43678 
43679 /* Bit 32: partial bandwidth DL MU-MIMO */
43680 #define WMI_EHTCAP_PHY_PARTBWDLMUMIMO_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 0, 1)
43681 #define WMI_EHTCAP_PHY_PARTBWDLMUMIMO_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 0, 1, value)
43682 
43683 /* Bit 33: PSR-based SR support */
43684 #define WMI_EHTCAP_PHY_PSRSR_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 1, 1)
43685 #define WMI_EHTCAP_PHY_PSRSR_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 1, 1, value)
43686 
43687 /* Bit 34: power boost factor support */
43688 #define WMI_EHTCAP_PHY_PWRBSTFACTOR_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 2, 1)
43689 #define WMI_EHTCAP_PHY_PWRBSTFACTOR_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 2, 1, value)
43690 
43691 /* Bit 35: EHT MU PPDU with 4xEHT-LTF and 0.8us GI */
43692 #define WMI_EHTCAP_PHY_4XEHTLTFAND800NSGI_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 3, 1)
43693 #define WMI_EHTCAP_PHY_4XEHTLTFAND800NSGI_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 3, 1, value)
43694 
43695 /* Bit 36-39: max NC */
43696 #define WMI_EHTCAP_PHY_MAXNC_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 4, 4)
43697 #define WMI_EHTCAP_PHY_MAXNC_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 4, 4, value)
43698 
43699 /* Bit 40: non-triggered CQI feedback */
43700 #define WMI_EHTCAP_PHY_NONTRIGCQIFB_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 8, 1)
43701 #define WMI_EHTCAP_PHY_NONTRIGCQIFB_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 8, 1, value)
43702 
43703 /* Bit 41: Tx 1024-QAM and 4096-QAM < 242-tone RU support */
43704 #define WMI_EHTCAP_PHY_TX1024AND4096QAMLS242TONERU_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 9, 1)
43705 #define WMI_EHTCAP_PHY_TX1024AND4096QAMLS242TONERU_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 9, 1, value)
43706 
43707 /* Bit 42: Rx 1024-QAM and 4096-QAM < 242-tone RU support */
43708 #define WMI_EHTCAP_PHY_RX1024AND4096QAMLS242TONERU_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 10, 1)
43709 #define WMI_EHTCAP_PHY_RX1024AND4096QAMLS242TONERU_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 10, 1, value)
43710 
43711 /* Bit 43: PPE thresholds present */
43712 #define WMI_EHTCAP_PHY_PPETHRESPRESENT_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 11, 1)
43713 #define WMI_EHTCAP_PHY_PPETHRESPRESENT_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 11, 1, value)
43714 
43715 /* Bit 44-45: common nominal packet padding */
43716 #define WMI_EHTCAP_PHY_CMNNOMPKTPAD_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 12, 2)
43717 #define WMI_EHTCAP_PHY_CMNNOMPKTPAD_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 12, 2, value)
43718 
43719 /* Bit 46-50: max number of supported EHT-LTFs */
43720 #define WMI_EHTCAP_PHY_MAXNUMEHTLTF_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 14, 5)
43721 #define WMI_EHTCAP_PHY_MAXNUMEHTLTF_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 14, 5, value)
43722 
43723 /* Bit 51-54: support of MCS 15 */
43724 #define WMI_EHTCAP_PHY_SUPMCS15_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 19, 4)
43725 #define WMI_EHTCAP_PHY_SUPMCS15_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 19, 4, value)
43726 
43727 /* Bit 55: support of EHT DUP in 6 GHz */
43728 #define WMI_EHTCAP_PHY_EHTDUPIN6GHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 23, 1)
43729 #define WMI_EHTCAP_PHY_EHTDUPIN6GHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 23, 1, value)
43730 
43731 /* Bit 56: support for 20Mhz operating STA receiving NDP with wider bandwidth */
43732 #define WMI_EHTCAP_PHY_20MHZOPSTARXNDPWIDERBW_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 24, 1)
43733 #define WMI_EHTCAP_PHY_20MHZOPSTARXNDPWIDERBW_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 24, 1, value)
43734 
43735 /* Bit 57: non-OFDMA UL MU-MIMO (bw <= 80Mhz) */
43736 #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMOLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 25, 1)
43737 #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMOLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 25, 1, value)
43738 
43739 /* Bit 58: non-OFDMA UL MU-MIMO (bw = 160Mhz) */
43740 #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 26, 1)
43741 #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 26, 1, value)
43742 
43743 /* Bit 59: non-OFDMA UL MU-MIMO (bw = 320Mhz) */
43744 #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 27, 1)
43745 #define WMI_EHTCAP_PHY_NONOFDMAULMUMIMO320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 27, 1, value)
43746 
43747 /* Bit 60: MU beamformer (bw <= 80Mhz) */
43748 #define WMI_EHTCAP_PHY_MUBFMRLT80MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 28, 1)
43749 #define WMI_EHTCAP_PHY_MUBFMRLT80MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 28, 1, value)
43750 
43751 /* Bit 61: MU beamformer (bw = 160Mhz) */
43752 #define WMI_EHTCAP_PHY_MUBFMR160MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 29, 1)
43753 #define WMI_EHTCAP_PHY_MUBFMR160MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 29, 1, value)
43754 
43755 /* Bit 62: MU beamformer (bw = 320Mhz) */
43756 #define WMI_EHTCAP_PHY_MUBFMR320MHZ_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 30, 1)
43757 #define WMI_EHTCAP_PHY_MUBFMR320MHZ_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 30, 1, value)
43758 
43759 /* Bit 63: TB sounding feedback rate limit */
43760 #define WMI_EHTCAP_PHY_TBSUNDFBRATELIMIT_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[1], 31, 1)
43761 #define WMI_EHTCAP_PHY_TBSUNDFBRATELIMIT_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[1], 31, 1, value)
43762 
43763 /* Bit 64: Rx 1024-QAM in wider bandwidth DL OFDMA support */
43764 #define WMI_EHTCAP_PHY_RX1024QAMWIDERBWDLOFDMA_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 0, 1)
43765 #define WMI_EHTCAP_PHY_RX1024QAMWIDERBWDLOFDMA_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 0, 1, value)
43766 
43767 /* Bit 65: Rx 4096-QAM in wider bandwidth DL OFDMA support */
43768 #define WMI_EHTCAP_PHY_RX4096QAMWIDERBWDLOFDMA_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 1, 1)
43769 #define WMI_EHTCAP_PHY_RX4096QAMWIDERBWDLOFDMA_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 1, 1, value)
43770 
43771 /* Bit 66: 20Mhz-only limited capabilities support */
43772 #define WMI_EHTCAP_PHY_20MHZ_ONLY_CAPS_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 2, 1)
43773 #define WMI_EHTCAP_PHY_20MHZ_ONLY_CAPS_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 2, 1, value)
43774 
43775 /* Bit 67: 20Mhz-only triggered MU beamforming full BW feedback and DL MU-MIMO */
43776 #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)
43777 #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)
43778 
43779 /* Bit 68: 20Mhz-only M-RU support */
43780 #define WMI_EHTCAP_PHY_20MHZ_ONLY_MRU_SUPP_GET(eht_cap_phy) WMI_GET_BITS(eht_cap_phy[2], 4, 1)
43781 #define WMI_EHTCAP_PHY_20MHZ_ONLY_MRU_SUPP_SET(eht_cap_phy, value) WMI_SET_BITS(eht_cap_phy[2], 4, 1, value)
43782 
43783 
43784 /* Bits 69-71: reserved */
43785 
43786 /****** End of 11BE EHT PHY Capabilities Information field ******/
43787 
43788 /****** 11BE EHT MAC Capabilities Information field ******/
43789 
43790 /* Bit 0: NSEP/EPCS priority access supported: draft1.4 change the name from NSEP to EPCS
43791  *        To compatible with <= draft 1.4 ver, we keep 2 define there, but same bit.
43792  */
43793 #define WMI_EHTCAP_MAC_NSEPPRIACCESS_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 0, 1)
43794 #define WMI_EHTCAP_MAC_NSEPPRIACCESS_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 0, 1, value)
43795 #define WMI_EHTCAP_MAC_EPCSPRIACCESS_GET(eht_cap_mac) WMI_EHTCAP_MAC_NSEPPRIACCESS_GET(eht_cap_mac)
43796 #define WMI_EHTCAP_MAC_EPCSPRIACCESS_SET(eht_cap_mac, value) WMI_EHTCAP_MAC_NSEPPRIACCESS_SET(eht_cap_mac, value)
43797 
43798 /* Bit 1: EHT OM control support */
43799 #define WMI_EHTCAP_MAC_EHTOMCTRL_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 1, 1)
43800 #define WMI_EHTCAP_MAC_EHTOMCTRL_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 1, 1, value)
43801 
43802 /* Bit 2: triggered TXOP mode 1 support
43803  *        As in draft 1.4, we define mode2 and to compatible with old version, we keep 2 define there, but same bit.
43804  */
43805 #define WMI_EHTCAP_MAC_TRIGTXOP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 2, 1)
43806 #define WMI_EHTCAP_MAC_TRIGTXOP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 2, 1, value)
43807 #define WMI_EHTCAP_MAC_TRIGTXOPMODE1_GET(eht_cap_mac) WMI_EHTCAP_MAC_TRIGTXOP_GET(eht_cap_mac)
43808 #define WMI_EHTCAP_MAC_TRIGTXOPMODE1_SET(eht_cap_mac, value) WMI_EHTCAP_MAC_TRIGTXOP_SET(eht_cap_mac, value)
43809 
43810 /* Bit 3: triggered TXOP mode 2 support */
43811 #define WMI_EHTCAP_MAC_TRIGTXOPMODE2_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 3, 1)
43812 #define WMI_EHTCAP_MAC_TRIGTXOPMODE2_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 3, 1, value)
43813 
43814 /* Bit 4: restricted TWT support */
43815 #define WMI_EHTCAP_MAC_RESTRICTTWT_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 4, 1)
43816 #define WMI_EHTCAP_MAC_RESTRICTTWT_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 4, 1, value)
43817 
43818 /* Bit 5: SCS traffic description support */
43819 #define WMI_EHTCAP_MAC_SCSTRAFFICDESC_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 5, 1)
43820 #define WMI_EHTCAP_MAC_SCSTRAFFICDESC_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 5, 1, value)
43821 
43822 /* Bit 6-7: maximum MPDU length */
43823 #define WMI_EHTCAP_MAC_MAXMPDULEN_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 6, 2)
43824 #define WMI_EHTCAP_MAC_MAXMPDULEN_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 6, 2, value)
43825 
43826 /* Bit 8: Maximum A-MPDU Length Exponent Extension */
43827 #define WMI_EHTCAP_MAC_MAXAMPDULEN_EXP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 8, 1)
43828 #define WMI_EHTCAP_MAC_MAXAMPDULEN_EXP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 8, 1, value)
43829 
43830 /* Bit 9: EHT TRS support */
43831 #define WMI_EHTCAP_MAC_TRS_SUPPORT_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 9, 1)
43832 #define WMI_EHTCAP_MAC_TRS_SUPPORT_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 9, 1, value)
43833 
43834 /* Bit 10: TXOP return support in txop sharing mode 2 */
43835 #define WMI_EHTCAP_MAC_TXOP_RETURN_SUPP_IN_SHARINGMODE2_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 10, 1)
43836 #define WMI_EHTCAP_MAC_TXOP_RETURN_SUPP_IN_SHARINGMODE2_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 10, 1, value)
43837 
43838 /* Bit 11: two BQRs support */
43839 #define WMI_EHTCAP_MAC_TWO_BQRS_SUPP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 11, 1)
43840 #define WMI_EHTCAP_MAC_TWO_BQRS_SUPP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 11, 1, value)
43841 
43842 /* Bit 12-13: EHT link adaptation support */
43843 #define WMI_EHTCAP_MAC_EHT_LINK_ADAPTATION_SUPP_GET(eht_cap_mac) WMI_GET_BITS(eht_cap_mac[0], 12, 2)
43844 #define WMI_EHTCAP_MAC_EHT_LINK_ADAPTATION_SUPP_SET(eht_cap_mac, value) WMI_SET_BITS(eht_cap_mac[0], 12, 2, value)
43845 
43846 /* Bit 14-15: reserved */
43847 
43848 /****** End of 11BE EHT MAC Capabilities Information field ******/
43849 
43850 
43851 typedef struct {
43852     /** TLV tag and len; tag equals
43853     * WMITLV_TAG_STRUC_wmi_cfr_capture_event_fixed_param */
43854     A_UINT32 tlv_header;
43855     /* Method used to capture CFR - of type WMI_PEER_CFR_CAPTURE_METHOD */
43856     A_UINT32 capture_method;
43857     /* VDEV identifier */
43858     A_UINT32 vdev_id;
43859     /* Peer MAC address. In AP mode, this is the address of the connected peer
43860      * for which CFR capture is needed. In case of STA mode, this is the address
43861      * of the AP to which the STA is connected
43862      */
43863     wmi_mac_addr mac_addr;
43864     /* primary 20 MHz channel frequency in mhz */
43865     A_UINT32 chan_mhz;
43866     /* BW of measurement - of type WMI_PEER_CFR_CAPTURE_BW */
43867     A_UINT32 bandwidth;
43868     /* phy mode WLAN_PHY_MODE of the channel defined in wlan_defs.h*/
43869     A_UINT32 phy_mode;
43870     /* Center frequency 1 in MHz*/
43871     A_UINT32 band_center_freq1;
43872     /* Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
43873     A_UINT32 band_center_freq2;
43874     /* Number of spatial streams */
43875     A_UINT32 sts_count;
43876     /* Bits 31:0:   address of data from wmi_dma_buf_release_entry [31:0] */
43877     A_UINT32 correlation_info_1;
43878     /* Bits 11:0:   address of data from wmi_dma_buf_release_entry [43:32]
43879      * Bits 15:12:  reserved (set to 0x0)
43880      * Bits 31:16:  hardware PPDU ID [15:0]
43881      */
43882     A_UINT32 correlation_info_2;
43883     /* Bits 1:0:    TX status (if any); values defined in enum
43884     *               WMI_FRAME_TX_STATUS
43885      * Bits 30:2:   reserved (set to 0x0)
43886      * Bit  31:     Status of the CFR capture of the peer
43887      *              1 (True) - Successful; 0 (False) - Not successful
43888      */
43889     A_UINT32 status;
43890     /* Timestamp in microseconds at which the CFR was captured in the hardware.
43891      * The clock used for this timestamp is private to the target and
43892      * is not visible to the host i.e., Host can interpret only the
43893      * relative timestamp deltas from one message to the next,
43894      * but can't interpret the absolute timestamp from a single message.
43895      */
43896     A_UINT32 timestamp_us;
43897     /*
43898      * Count of the current CFR capture from FW.
43899      * This is helpful to identify any drops in FW.
43900      */
43901     A_UINT32 counter;
43902     /* Per chain RSSI of the peer, for up to WMI_MAX_CHAINS.
43903      * Each chain's entry reports the RSSI for different bands in dBm units.
43904      * Use WMI_UNIFIED_CHAIN_RSSI_GET to extract the value for a particular
43905      * band.
43906      * A band value of 0x80 (-128) is invalid.
43907      */
43908     A_UINT32 chain_rssi[WMI_MAX_CHAINS];
43909     /* Carrier frequency offset
43910        It is Difference between down conversion oscillator frequency at the receiver
43911        versus carrier frequency of the received signal. To convert to ppm, below
43912        equation needs to be used. Here, Fc is carrier frequency (primary 20 channel frequency) in Hz:
43913 
43914        PPM = cfo_measurement(13 bits)/((2^13)/(800e-9)/2/Fc*1e6)
43915        PPM ranges from -40 to +40
43916 
43917        Bits 0  : 0   Set to 1 to indicate cfo measurement value is valid
43918        Bits 1  : 14  14 bits cfo measurement raw data. 14 bit is signed bit.
43919                      For the above ppm equation , use the first 13 bits to calculate.
43920      */
43921     A_UINT32 cfo_measurement_valid :1,
43922              cfo_measurement :14,
43923              reserved :17;
43924 
43925     /* RX packet start timestamp.
43926      * It reports the time the first L-STF ADC sample arrived at RX antenna
43927      * It is in units of 480 MHz clock, i.e. number of clock cycles at 480 MHz.
43928      */
43929     A_UINT32 rx_start_ts;
43930 
43931     /*
43932      * The rx_ts_reset flag will be set to 1 upon every reset of rx_start_ts.
43933      */
43934     A_UINT32 rx_ts_reset;
43935 
43936     /*
43937      * MCS and Guard Interval.
43938      * MCS: For legacy mode only
43939      *    0: 48 Mbps
43940      *    1: 24 Mbps
43941      *    2: 12 Mbps
43942      *    3: 6 Mbps
43943      *    4: 54 Mbps
43944      *    5: 36 Mbps
43945      *    6: 18 Mbps
43946      *    7: 9 Mbps
43947      *    8-254: reserved
43948      *    255:   invalid entry
43949      *
43950      * GI: For Legacy mode only
43951      *    0: 0.8 us
43952      *    1: 0.4 us
43953      *    2: 1.6 us
43954      *    3: 3.2 us
43955      *    4-254: reserved
43956      *    255:   invalid entry
43957      *
43958      * Bits 0:7        mcs
43959      * Bits 8:15       gi_type
43960      * Bits 16:31      reserved
43961      */
43962     A_UINT32 mcs_gi_info;
43963 } wmi_peer_cfr_capture_event_fixed_param;
43964 
43965 #define WMI_CFR_MCS_GET(mcs_gi_info) \
43966         WMI_GET_BITS(mcs_gi_info, 0, 8)
43967 
43968 #define WMI_CFR_MCS_SET(mcs_gi_info, value) \
43969         WMI_SET_BITS(mcs_gi_info, 0, 8, value)
43970 
43971 #define WMI_CFR_GI_TYPE_GET(mcs_gi_info) \
43972         WMI_GET_BITS(mcs_gi_info, 8, 8)
43973 
43974 #define WMI_CFR_GI_TYPE_SET(mcs_gi_info, value) \
43975         WMI_SET_BITS(mcs_gi_info, 8, 8, value)
43976 
43977 
43978 #define WMI_UNIFIED_CHAIN_PHASE_MASK 0x0000ffff
43979 #define WMI_UNIFIED_CHAIN_PHASE_GET(tlv, chain_idx) \
43980     ((A_UINT16) ((tlv)->chain_phase[chain_idx] & WMI_UNIFIED_CHAIN_PHASE_MASK))
43981 #define WMI_UNIFIED_CHAIN_PHASE_SET(tlv, chain_idx, value) \
43982     (tlv)->chain_phase[chain_idx] = (WMI_UNIFIED_CHAIN_PHASE_MASK & (value))
43983 
43984 #define WMI_CFR_AGC_GAIN_CHAINS_PER_U32 4
43985 #define WMI_UNIFIED_AGC_GAIN_MASK 0x000000ff
43986 #define WMI_UNIFIED_AGC_GAIN_GET(tlv, chain_idx) \
43987     ((A_UINT8) ((tlv)->agc_gain_index[(chain_idx)/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] >> \
43988         ((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8) & WMI_UNIFIED_AGC_GAIN_MASK)
43989 #define WMI_UNIFIED_AGC_GAIN_SET(tlv, chain_idx, value) \
43990     (tlv)->agc_gain_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] = \
43991         (tlv)->agc_gain_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] & \
43992             ~(0xff << (((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8)) | \
43993             (((value)<<((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8))
43994 
43995 #define WMI_UNIFIED_AGC_GAIN_TBL_IDX_GET(tlv, chain_idx) \
43996     ((A_UINT8) ((tlv)->agc_gain_tbl_index[(chain_idx)/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] >> \
43997         ((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8) & WMI_UNIFIED_AGC_GAIN_MASK)
43998 
43999 #define WMI_UNIFIED_AGC_GAIN_TBL_IDX_SET(tlv, chain_idx, value) \
44000     (tlv)->agc_gain_tbl_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] = \
44001         (tlv)->agc_gain_tbl_index[chain_idx/WMI_CFR_AGC_GAIN_CHAINS_PER_U32] & \
44002             ~(0xff << (((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8)) | \
44003             (((value)<<((chain_idx)%WMI_CFR_AGC_GAIN_CHAINS_PER_U32)*8))
44004 
44005 typedef struct {
44006     /** TLV tag and len; tag equals
44007     * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_event_phase_fixed_param */
44008     A_UINT32 tlv_header;
44009 
44010     /* Per chain AoA phase data of the Peer, for up to WMI_MAX_CHAINS.
44011      * USE WMI_UNIFIED_CHAIN_PHASE_GET to extract the phase value for
44012      * a particular chain.
44013      * Only lower 2 bytes will contain phase data for a particular chain.
44014      * The values in phase data will be from 0  1023 as mapping of
44015      * 0-359 degrees using the formula -
44016      * phase data = phase in degrees * 1024 / 360
44017      *
44018      * Target will set 0xFFFF for all invalid chains.
44019      *
44020      * The WMI_UNIFIED_CHAIN_PHASE_GET/SET macros can be used to access
44021      * the valid portion of the 4-byte word containing the chain phase data.
44022      */
44023     A_UINT32 chain_phase[WMI_MAX_CHAINS];
44024 
44025     /* agc_gain_index
44026      * It shows an index in the AGC gain LUT.
44027      * agc gain should be in range between 0 to 62.
44028      * 4 AGC gain index values are packed into each A_UINT32 word;
44029      * use the WMI_UNITIFED_AGC_GAIN_GET/SET macros to read/write
44030      * the AGC gain indices for individual chains.
44031      */
44032     A_UINT32 agc_gain_index[WMI_MAX_CHAINS/WMI_CFR_AGC_GAIN_CHAINS_PER_U32];
44033 
44034     /*
44035      * Each chain is provided with 8 bits within agc_gain_tbl_index.
44036      * The value for each of these 8-bit portions is between 0 to 2:
44037      *  0 : Default Gain Table
44038      *  1 : Low RF Gain Table.
44039      *      Low gain applied at RF as compared to gains applied when
44040      *      gain_table _idx = 0 is selected.
44041      *  2 : Very Low RF Gain Table.
44042      *      It's similar to above with even lower gains applied.
44043      *
44044      * AoA should use the normal/regular GLUT, thus GAIN_TABLE_IDX
44045      * should always be 0. If it is not 0, it means that there was
44046      * out-of-band blocker causing the hardware to pick a different
44047      * gain table. In that case, AoA result will not be reliable.
44048      * Therefore, the recommendation is to stop doing AoA if
44049      * GAIN_TABLE_IDX != 0 and indicate error.
44050      */
44051     A_UINT32 agc_gain_tbl_index[WMI_MAX_CHAINS/WMI_CFR_AGC_GAIN_CHAINS_PER_U32];
44052 } wmi_peer_cfr_capture_event_phase_fixed_param;
44053 
44054 #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_OK      0x80000000
44055 #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_OK_S    31
44056 
44057 /* Failed to capture CFR as peer is in power save mode */
44058 #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_PS_FAILED      0x40000000
44059 #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_PS_FAILED_S    30
44060 
44061 #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_TX      0x00000003
44062 #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_TX_S    0
44063 
44064 /**
44065  *  wmi_cold_boot_cal_data config flags
44066  *  BIT 0     : 1 means more data will come, 0 means last event
44067  *  BIT 1-31  : Reserved
44068  */
44069 #define WMI_COLD_BOOT_CAL_DATA_SET_IS_MORE_DATA(flags, val)      WMI_SET_BITS(flags, 0, 1, val)
44070 #define WMI_COLD_BOOT_CAL_DATA_GET_IS_MORE_DATA(flags)           WMI_GET_BITS(flags, 0, 1)
44071 
44072 typedef struct {
44073     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_cold_boot_cal_data_fixed_param */
44074     A_UINT32 data_len; /** length in byte of data[]. */
44075     A_UINT32 flags; /** config flags : Only 0th bit is used, bit 1-31 are reserved */
44076 /* Following this structure is the TLV:
44077  *      A_UINT8 data[]; <-- length in byte given by field data_len.
44078  * This data array contains cold boot data calibration raw data.
44079  */
44080 } wmi_cold_boot_cal_data_fixed_param;
44081 
44082 typedef struct {
44083     A_UINT32 tlv_header;    /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_rap_info_event_fixed_param */
44084     /** pdev_id for identifying the MAC, the default value is WMI_PDEV_ID_SOC
44085       * See macros starting with WMI_PDEV_ID_ for values.
44086       */
44087     A_UINT32 pdev_id;
44088     A_UINT32 type; /** type of the rogue ap, see WMI_ROGUE_AP_TYPE */
44089     wmi_mac_addr bssid; /** bssid of the rogue ap */
44090 } wmi_pdev_rap_info_event_fixed_param;
44091 
44092 typedef struct {
44093     A_UINT32 tlv_header;    /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_sched_tidq_susp_info_event_fixed_param */
44094     A_UINT32 pdev_id; /** pdev id */
44095     A_UINT32 tid_num; /** tid_num that is suspended */
44096     A_UINT32 suspended_time_ms; /** time for which tid has been suspended in ms */
44097 } wmi_pdev_sched_tidq_susp_info_event_fixed_param;
44098 
44099 /*
44100  * WMI API for Firmware to indicate iface combinations which Firmware
44101  * support to Host
44102  */
44103 typedef struct {
44104     A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_wlanfw_iface_cmb_ind_event_fixed_param */
44105 
44106     /* common part */
44107     /* Consider DBS/DBDC for this new implementation */
44108     A_UINT32 pdev_n;
44109 
44110     /* iface combinations part -
44111      * Use subsequent TLV arrays to list supported combinations of interfaces.
44112      */
44113 
44114 /*
44115  * The TLVs listing interface combinations, will follow this TLV.
44116  * The number of combinations can be calculated by dividing the
44117  * TLV array length by the TLV array element length.
44118  *
44119  * The fixed_param TLV is directly followed by a list of
44120  * wlanfw_iface_combination elements:
44121  *     wlanfw_iface_combination combinations[0];
44122  *     wlanfw_iface_combination combinations[1];
44123  *     ...
44124  *     wlanfw_iface_combination combinations[N];
44125  *
44126  * After the list of wlanfw_iface_combinations is a list of interface limits.
44127  * The cmb_limits field of each wlanfw_iface_combination show which of the
44128  * limits within the "wlanfw_ifact_limit limits" list belong to that
44129  * iface_combination:
44130  *     limits[0]                                     <- cmb 0, limit 0
44131  *     ...
44132  *     limits[cmb[0].cmb_limits-1]                   <- cmb 0, limit N
44133  *     limits[cmb[0].cmb_limits]                     <- cmb 1, limit 0
44134  *     ...
44135  *     limits[cmb[0].cmb_limits+cmb[1].cmb_limits-1] <- cmb 1, limit N
44136  *     limits[cmb[0].cmb_limits+cmb[1].cmb_limits]   <- cmb 2, limit 0
44137  *     ...
44138  */
44139 } wmi_wlanfw_iface_cmb_ind_event_fixed_param;
44140 
44141 typedef struct {
44142     A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_wlanfw_iface_limit_param */
44143     /*
44144      * How many vdevs can work as below vdev_type/vdev_subtype
44145      * in one combination.
44146      */
44147     A_UINT32 vdev_limit_n;
44148     /*
44149      * Indicate what role above vdevs can work as.
44150      * Refer to "WMI_VDEV_TYPE_xx, WMI_UNIFIED_VDEV_SUBTYPE_xx"
44151      * for roles definition.
44152      */
44153     A_UINT32 vdev_type;
44154     A_UINT32 vdev_subtype;
44155 } wlanfw_iface_limit;
44156 
44157 /**
44158  * @brief specific configuration of valid_fields for host.
44159  * These flags are used for indicating which fields in wlanfw_iface_combination
44160  * contains valid value for Host Driver.
44161  * 0: Host can ignore this field
44162  * 1: field contains valid value for Host Driver
44163  */
44164 
44165 #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_S 0
44166 #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_M 0x1
44167 
44168 #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_S 1
44169 #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_M 0x2
44170 
44171 #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_S 2
44172 #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_M 0x4
44173 
44174 #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_S 3
44175 #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_M 0x8
44176 
44177 #define WMI_CMB_VALID_FIELDS_FLAG_SET(word32, flag, value) \
44178     do { \
44179         (word32) &= ~WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M; \
44180         (word32) |= ((value) << WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _S) & \
44181             WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M; \
44182     } while (0)
44183 
44184 #define WMI_CMB_VALID_FIELDS_FLAG_GET(word32, flag) \
44185     (((word32) & WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M) >> \
44186     WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _S)
44187 
44188 #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_SET(word32, value) \
44189     WMI_CMB_VALID_FIELDS_FLAG_SET((word32), PEER_MAX, (value))
44190 #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_GET(word32) \
44191     WMI_CMB_VALID_FIELDS_FLAG_GET((word32), PEER_MAX)
44192 
44193 #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_SET(word32, value) \
44194     WMI_CMB_VALID_FIELDS_FLAG_SET((word32), STA_AP_BCN_INT_MATCH, (value))
44195 #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_GET(word32) \
44196     WMI_CMB_VALID_FIELDS_FLAG_GET((word32), STA_AP_BCN_INT_MATCH)
44197 
44198 #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_SET(word32, value) \
44199     WMI_CMB_VALID_FIELDS_FLAG_SET((word32), BCN_INT_MIN, (value))
44200 #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_GET(word32) \
44201     WMI_CMB_VALID_FIELDS_FLAG_GET((word32), BCN_INT_MIN)
44202 
44203 #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_SET(word32, value) \
44204     WMI_CMB_VALID_FIELDS_FLAG_SET((word32), BCN_INT_N, (value))
44205 #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_GET(word32) \
44206     WMI_CMB_VALID_FIELDS_FLAG_GET((word32), BCN_INT_N)
44207 
44208 typedef struct {
44209     A_UINT32 tlv_header;
44210     /*
44211      * Max num Peers can be supported in this combination.
44212      * It excludes the self-peers associated with each vdev.
44213      * It's the number of real remote peers.
44214      * eg: when working as AP mode, indicating how many clients can be
44215      * supported to connect with this AP.
44216      */
44217     A_UINT32 peer_max;
44218     /* Home Channels supported on one single phy concurrently */
44219     A_UINT32 channel_n;
44220     /*
44221      * The number of "wlanfw_iface_limit" for a specified combination.
44222      * eg: there is 2 vdev, including 1 AP vdev and 1 STA vdev, then this
44223      * cmb_limits will be 2 for this combination.
44224      */
44225     A_UINT32 cmb_limits;
44226     /*
44227      * Beacon intervals for STA and AP types need to be match or not.
44228      * 1: need to be match
44229      * 0: not need
44230      */
44231     A_UINT32 sta_ap_bcn_int_match;
44232     /*
44233      * This combination supports different beacon intervals or not.
44234      * 0: Beacon interval is same for all interface
44235      * !0: STA Beacon interval AND GCD of AP Beacon intervals
44236      *     should be greater or equal to this value.
44237      */
44238     A_UINT32 bcn_int_min;
44239     /*
44240      * Number of different Beacon intervals
44241      */
44242     A_UINT32 bcn_int_n;
44243 
44244     /*
44245      * This indicates which field in this struct
44246      * contains valid value for Host Driver.
44247      * Refer to definitions for "WMI_CMB_VALID_FIELDS_FLAG_xx".
44248      */
44249     A_UINT32 valid_fields;
44250 } wlanfw_iface_combination;
44251 
44252 typedef struct {
44253     /** TLV tag and len; tag equals
44254     * WMITLV_TAG_STRUC_wmi_set_elna_bypass_cmd_fixed_param */
44255     A_UINT32 tlv_header;
44256     /* VDEV identifier */
44257     A_UINT32 vdev_id;
44258     /** 1-Enable, 0-Disable */
44259     A_UINT32 en_dis;
44260 } wmi_set_elna_bypass_cmd_fixed_param;
44261 
44262 typedef struct {
44263     /** TLV tag and len; tag equals
44264     * WMITLV_TAG_STRUC_wmi_get_elna_bypass_cmd_fixed_param */
44265     A_UINT32 tlv_header;
44266     /* VDEV identifier */
44267     A_UINT32 vdev_id;
44268 } wmi_get_elna_bypass_cmd_fixed_param;
44269 
44270 typedef struct {
44271     A_UINT32 tlv_header;    /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_elna_bypass_event_fixed_param */
44272     /* VDEV identifier */
44273     A_UINT32 vdev_id;
44274     /** 1-Enable, 0-Disable */
44275     A_UINT32 en_dis;
44276 } wmi_get_elna_bypass_event_fixed_param;
44277 
44278 typedef struct {
44279     /** TLV tag and len; tag equals
44280      * WMITLV_TAG_STRUC_wmi_get_channel_ani_cmd_fixed_param
44281      */
44282     A_UINT32 tlv_header;
44283     /**
44284      * TLV (tag length value) parameters follow the
44285      * structure. The TLV's are:
44286      * list of channels (center freq of primary 20 MHz of the channel, in MHz)
44287      * A_UINT32 channel_list[];
44288      */
44289 } wmi_get_channel_ani_cmd_fixed_param;
44290 
44291 typedef struct {
44292     /** TLV tag and len; tag equals
44293      * WMITLV_TAG_STRUC_wmi_get_channel_ani_event_fixed_param
44294      */
44295     A_UINT32 tlv_header;
44296     /**
44297      * TLV (tag length value) parameters follow the
44298      * structure. The TLV's are:
44299      * wmi_channel_ani_info_tlv_param ani_info[];
44300      */
44301 } wmi_get_channel_ani_event_fixed_param;
44302 
44303 typedef struct {
44304     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_ani_info_tlv_param */
44305     A_UINT32 tlv_header;
44306     /** channel freq (center of 20 MHz primary channel) in MHz */
44307     A_UINT32 chan_freq;
44308     /**
44309      * ANI (noise interference) level corresponding to the channel.
44310      * Values range from [0-9], with higher values indicating more
44311      * noise interference.
44312      */
44313     A_UINT32 ani_level;
44314 } wmi_channel_ani_info_tlv_param;
44315 
44316 /* This command is to specify to enable/disable audio frame aggr */
44317 typedef struct {
44318     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_enable_cmd_fixed_param */
44319     A_UINT32 aggr_enable; /* enable aggregation for audio frame */
44320     A_UINT32 tbd_enable;  /* enable time_based discarding for audio frame */
44321     A_UINT32 vdev_id;
44322 } wmi_audio_aggr_enable_cmd_fixed_param;
44323 
44324 typedef struct wmi_audio_aggr_rate_set_s {
44325     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_audio_aggr_rate_set */
44326     A_UINT32 mcs;
44327     A_UINT32 bandwidth; /* 0 for 20M, 1 for 40M and 2 for 80M, etc. */
44328     A_UINT32 vdev_id;
44329 } WMI_AUDIO_AGGR_RATE_SET_T;
44330 
44331 typedef struct {
44332     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_add_group */
44333     A_UINT32 group_id;      /* id of audio group */
44334     wmi_mac_addr multicast_addr; /* multicast address of audio group */
44335     A_UINT32 vdev_id;
44336 } wmi_audio_aggr_add_group_cmd_fixed_param;
44337 
44338 typedef struct {
44339     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_del_group */
44340     A_UINT32 group_id;
44341     A_UINT32 vdev_id;
44342 } wmi_audio_aggr_del_group_cmd_fixed_param;
44343 
44344 typedef struct {
44345     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_rate */
44346     A_UINT32 group_id;
44347     A_UINT32 vdev_id;
44348     /**
44349      * TLV (tag length value) parameters follow the
44350      * structure. The TLV's are:
44351      * WMI_AUDIO_AGGR_RATE_SET_T rate_set[];
44352      **/
44353 } wmi_audio_aggr_set_group_rate_cmd_fixed_param;
44354 
44355 typedef struct {
44356     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_retry */
44357     A_UINT32 group_id;
44358     A_UINT32 retry_thresh;
44359     A_UINT32 vdev_id;
44360 } wmi_audio_aggr_set_group_retry_cmd_fixed_param;
44361 
44362 typedef struct {
44363     A_UINT32 tlv_header;
44364     A_UINT32 vdev_id;
44365     A_UINT32 group_id;
44366     /*
44367      * bit0: if set, Enable HT20
44368      * bit1: if set, Enable HT40
44369      * bit2, bit3: Reserved
44370      * bit4: if set, Enable VHT20
44371      * bit5: if set, Enable VHT40
44372      * bit6: if set, Enable VHT80
44373      * bit7 ~ bit31: Reserved
44374      */
44375     A_UINT32 bw;
44376     A_UINT32 mcs_min;
44377     A_UINT32 mcs_max;
44378     A_UINT32 mcs_offset;
44379     A_UINT32 nss;
44380 } wmi_audio_aggr_set_group_auto_rate_cmd_fixed_param;
44381 
44382 typedef struct {
44383     A_UINT32 tlv_header;
44384     A_UINT32 vdev_id;
44385     A_UINT32 group_id;
44386     A_UINT32 interval;
44387 } wmi_audio_aggr_set_group_probe_cmd_fixed_param;
44388 
44389 typedef struct {
44390     /**
44391      * TLV tag and len;
44392      * tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_update_sta_group_info */
44393     A_UINT32 tlv_header;
44394 
44395     /* vdev id */
44396     A_UINT32 vdev_id; /* which STA/vdev's group membership is being specified */
44397 
44398     /* bitmap that indicates which groups this sta belongs to */
44399     A_UINT32 group_bmap;
44400 
44401 /*
44402  * This fixed_param struct is followed by a TLV array of wmi_mac_addr,
44403  * which specifies the multi-cast MAC address used for each group.
44404  * The number of elements within the TLV array matches the number of bits
44405  * set within group_bmap.
44406  */
44407 } wmi_audio_aggr_update_sta_group_info_cmd_fixed_param;
44408 
44409 typedef struct {
44410     /** TLV tag and len **/
44411     A_UINT32 tlv_header;
44412     /* VDEV identifier */
44413     A_UINT32 vdev_id;
44414     /*
44415      * Identifier from Host to indicate how many this cmd been sent to FW.
44416      * This value will be echoed back in the response_id field
44417      * of the WMI_AUDIO_AGGR_REPORT_STATISTICS_EVENTID.
44418      */
44419     A_UINT32 request_id;
44420 } wmi_audio_aggr_get_statistics_cmd_fixed_param;
44421 
44422 typedef struct {
44423     /** TLV tag and len **/
44424     A_UINT32 tlv_header;
44425     /* VDEV identifier */
44426     A_UINT32 vdev_id;
44427 } wmi_audio_aggr_reset_statistics_cmd_fixed_param;
44428 
44429 typedef struct {
44430     /** TLV tag and len **/
44431     A_UINT32 tlv_header;
44432     /* VDEV identifier */
44433     A_UINT32 vdev_id;
44434 
44435     /*
44436      * The user_mode and user_profile fields are passed through
44437      * the host driver to the target FW, but are never interpreted
44438      * by the host driver. The values for these fields are opaque
44439      * to the host, and are only interpreted by the FW.
44440      */
44441     A_UINT32 user_mode;
44442     A_UINT32 user_profile;
44443 } wmi_audio_aggr_set_rtscts_config_cmd_fixed_param;
44444 
44445 typedef enum {
44446     /* audio aggr scheduler method list */
44447     WMI_AUDIO_AGGR_SCHED_METHOD_HOST_CONTROL = 1,
44448     WMI_AUDIO_AGGR_SCHED_METHOD_HOST_CONTROL_PER_CYCLE = 2,
44449 
44450     WMI_AUDIO_AGGR_SCHED_METHOD_MAX,
44451 } WMI_AUDIO_AGGR_SCHED_METHOD_TYPE;
44452 
44453 typedef enum {
44454     /* audio aggr RTS-CTS Config */
44455     WMI_AUDIO_AGGR_RTS_CTS_CONFIG_DISABLED = 0,
44456     WMI_AUDIO_AGGR_RTS_CTS_CONFIG_PPDU = 1,
44457     WMI_AUDIO_AGGR_RTS_CTS_CONFIG_CYCLE = 2,
44458 
44459     WMI_AUDIO_AGGR_RTS_CTS_MAX,
44460 } WMI_AUDIO_AGGR_RTS_CTS_CONFIG_TYPE;
44461 
44462 typedef struct {
44463     /* TLV tag and len */
44464     A_UINT32 tlv_header;
44465 
44466     /* VDEV identifier */
44467     A_UINT32 vdev_id;
44468 
44469     /* selected audio aggr scheduler method
44470     *  valid methods can be found in WMI_AUDIO_AGGR_SCHED_METHOD_TYPE
44471     */
44472     A_UINT32 sched_method;
44473 
44474     /* rts-cts config
44475     * valid config can be found in WMI_AUDIO_AGGR_RTS_CTS_CONFIG_TYPE
44476     */
44477     A_UINT32 rtscts_config;
44478 } wmi_audio_aggr_set_sched_method_cmd_fixed_param;
44479 
44480 typedef struct {
44481     /* TLV tag and len */
44482     A_UINT32 tlv_header;
44483 
44484     /* VDEV identifier */
44485     A_UINT32 vdev_id;
44486 } wmi_audio_aggr_get_sched_method_cmd_fixed_param;
44487 
44488 typedef struct {
44489     /** TLV tag and len; tag equals
44490      * WMITLV_TAG_STRUC_wmi_set_ocl_cmd_fixed_param */
44491     A_UINT32 tlv_header;
44492     /* VDEV identifier */
44493     A_UINT32 vdev_id;
44494     /** enable/disable OCL, 1 - enable, 0 - disable*/
44495     A_UINT32 en_dis_chain;
44496 } wmi_set_ocl_cmd_fixed_param;
44497 
44498 typedef enum {
44499     /* HPA Handshake Stages */
44500     WMI_HPA_SMCK_REQUEST = 0,
44501     WMI_HPA_SMCK_RESPONSE = 1,
44502     WMI_HPA_SIGN_REQUEST = 2,
44503     WMI_HPA_SIGN_RESPONSE = 3,
44504     WMI_HPA_HANDSHAKE_STAGE_MAX,
44505 } WMI_HPA_STAGE_TYPE;
44506 
44507 typedef struct {
44508     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hpa_cmd_fixed_param */
44509     /* stage:
44510      * HPA Handshake Stage, filled with a WMI_HPA_STAGE_TYPE enum value
44511      */
44512     A_UINT32 stage;
44513 
44514     /* the base address and length of data on host memory */
44515     A_UINT32 base_paddr_low;  /* bits 31:0 */
44516     A_UINT32 base_paddr_high; /* bits 63:32 */
44517     A_UINT32 len;             /* units = bytes */
44518 } wmi_hpa_cmd_fixed_param;
44519 
44520 typedef struct {
44521     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hpa_evt_fixed_param */
44522     /* stage:
44523      * HPA Handshake Stage, filled with a WMI_HPA_STAGE_TYPE enum value
44524      */
44525     A_UINT32 stage;
44526 
44527     A_UINT32 nonce;
44528 } wmi_hpa_evt_fixed_param;
44529 
44530 typedef struct {
44531     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_sync_qtimer */
44532     A_UINT32 vdev_id;
44533     A_UINT32 qtimer_l32;
44534     A_UINT32 qtimer_u32;
44535 } wmi_audio_sync_qtimer_cmd_fixed_param;
44536 
44537 typedef struct {
44538     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_sync_trigger */
44539     A_UINT32 vdev_id;
44540     /* agg_relation:
44541      * indicates whether host needs only one pair of Qmaster and Qslave,
44542      * or Qmaster and Qslave pairs derived for each FTM frame exchange.
44543      *  0 indicates one pair for each FTM frame exchanged
44544      *  1 indicates only one pair of Qmaster and Qslave times.
44545      */
44546     A_UINT32 agg_relation;
44547 } wmi_audio_sync_trigger_cmd_fixed_param;
44548 
44549 typedef struct {
44550     /** TLV tag and len; tag equals
44551      * WMITLV_TAG_STRUC_wmi_pdev_mec_aging_timer_config_cmd_fixed_param
44552      */
44553     A_UINT32 tlv_header;
44554     /** SOC level Command. pdev_id - WMI_PDEV_ID_SOC is used.
44555      */
44556     A_UINT32 pdev_id;
44557     /* The Threshold for mec aging timer in ms
44558      */
44559     A_UINT32 mec_aging_timer_threshold;
44560 } wmi_pdev_mec_aging_timer_config_cmd_fixed_param;
44561 
44562 #define WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS           0
44563 #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS      1
44564 #define WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS           2
44565 #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS      3
44566 #define WMI_CFR_GROUP_BW_VALID_BIT_POS                4
44567 #define WMI_CFR_GROUP_NSS_VALID_BIT_POS               5
44568 #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS      6
44569 #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS      7
44570 #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS      8
44571 
44572 /* The bits in this mask mapped to WMI_PEER_CFR_CAPTURE_BW enum */
44573 #define WMI_CFR_GROUP_BW_MASK_NUM_BITS                6
44574 #define WMI_CFR_GROUP_BW_BIT_POS                      0
44575 
44576 /* The bits in this mask correspond to the values as below
44577  * bit 0 -> Nss 1
44578  * bit 1 -> Nss 2
44579  * ...
44580  * bit 7 -> Nss 8
44581  */
44582 #define WMI_CFR_GROUP_NSS_MASK_NUM_BITS               8
44583 #define WMI_CFR_GROUP_NSS_BIT_POS                     16
44584 
44585 #define WMI_CFR_GROUP_TA_ADDR_VALID_SET(param, value) \
44586     WMI_SET_BITS(param, WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS, 1, value)
44587 
44588 #define WMI_CFR_GROUP_TA_ADDR_VALID_GET(param)     \
44589     WMI_GET_BITS(param, WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS, 1)
44590 
44591 #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_SET(param, value) \
44592     WMI_SET_BITS(param, WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS, 1, value)
44593 
44594 #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_GET(param)     \
44595     WMI_GET_BITS(param, WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS, 1)
44596 
44597 #define WMI_CFR_GROUP_RA_ADDR_VALID_SET(param, value) \
44598     WMI_SET_BITS(param, WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS, 1, value)
44599 
44600 #define WMI_CFR_GROUP_RA_ADDR_VALID_GET(param)     \
44601     WMI_GET_BITS(param, WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS, 1)
44602 
44603 #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_SET(param, value) \
44604     WMI_SET_BITS(param, WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS, 1, value)
44605 
44606 #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_GET(param)     \
44607     WMI_GET_BITS(param, WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS, 1)
44608 
44609 #define WMI_CFR_GROUP_BW_VALID_SET(param, value) \
44610     WMI_SET_BITS(param, WMI_CFR_GROUP_BW_VALID_BIT_POS, 1, value)
44611 
44612 #define WMI_CFR_GROUP_BW_VALID_GET(param)     \
44613     WMI_GET_BITS(param, WMI_CFR_GROUP_BW_VALID_BIT_POS, 1)
44614 
44615 #define WMI_CFR_GROUP_NSS_VALID_SET(param, value) \
44616     WMI_SET_BITS(param, WMI_CFR_GROUP_NSS_VALID_BIT_POS, 1, value)
44617 
44618 #define WMI_CFR_GROUP_NSS_VALID_GET(param)     \
44619     WMI_GET_BITS(param, WMI_CFR_GROUP_NSS_VALID_BIT_POS, 1)
44620 
44621 #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_SET(param, value) \
44622     WMI_SET_BITS(param, WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS, 1, value)
44623 
44624 #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_GET(param)     \
44625     WMI_GET_BITS(param, WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS, 1)
44626 
44627 #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_SET(param, value) \
44628     WMI_SET_BITS(param, WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS, 1, value)
44629 
44630 #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_GET(param)     \
44631     WMI_GET_BITS(param, WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS, 1)
44632 
44633 #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_SET(param, value) \
44634     WMI_SET_BITS(param, WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS, 1, value)
44635 
44636 #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_GET(param)     \
44637     WMI_GET_BITS(param, WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS, 1)
44638 
44639 #define WMI_CFR_GROUP_BW_SET(param, value) \
44640     WMI_SET_BITS(param, WMI_CFR_GROUP_BW_BIT_POS, WMI_CFR_GROUP_BW_MASK_NUM_BITS, value)
44641 
44642 #define WMI_CFR_GROUP_BW_GET(param)     \
44643     WMI_GET_BITS(param, WMI_CFR_GROUP_BW_BIT_POS, WMI_CFR_GROUP_BW_MASK_NUM_BITS)
44644 
44645 #define WMI_CFR_GROUP_NSS_SET(param, value) \
44646     WMI_SET_BITS(param, WMI_CFR_GROUP_NSS_BIT_POS, WMI_CFR_GROUP_NSS_MASK_NUM_BITS, value)
44647 
44648 #define WMI_CFR_GROUP_NSS_GET(param)     \
44649     WMI_GET_BITS(param, WMI_CFR_GROUP_NSS_BIT_POS, WMI_CFR_GROUP_NSS_MASK_NUM_BITS)
44650 
44651 typedef struct {
44652     /** TLV tag and len; tag equals
44653      * WMITLV_TAG_STRUC_wmi_cfr_filter_group_config */
44654     A_UINT32 tlv_header;
44655     /* Filter group number for which the below filters needs to be applied */
44656     A_UINT32 filter_group_id;
44657     /* Indicates which of the below filter's value is valid
44658      * Bit 0:    Ta_addr is valid if set
44659      * Bit 1:    Ta_addr_mask is valid if set
44660      * Bit 2:    Ra_addr is valid if set
44661      * Bit 3:    Ra_addr_mask is valid if set
44662      * Bit 4:    Bandwidth is valid if set
44663      * Bit 5:    NSS is valid if set
44664      * Bit 6:    Mgmt_subtype is valid if set
44665      * Bit 7:    Ctrl_subtype is valid if set
44666      * Bit 8:    Data_subtype is valid if set
44667      * Bits 31:9 Reserved for future use
44668      */
44669     A_UINT32 filter_set_valid_mask;
44670     /* ta_addr:
44671      * Packets matching the TA_mac addr will be filtered in by MAC
44672      * for CFR capture.
44673      */
44674     wmi_mac_addr ta_addr;
44675     /* ta_addr_mask:
44676      * Packets matching the TA_mac addr Mask will be filtered in by MAC
44677      * for CFR capture.
44678      */
44679     wmi_mac_addr ta_addr_mask;
44680     /* ra_addr:
44681      * Packets matching the RA_mac addr will be filtered in by MAC
44682      * for CFR capture.
44683      */
44684     wmi_mac_addr ra_addr;
44685     /* ra_addr_mask:
44686      * Packets matching the RA_mac addr Mask will be filtered in by MAC
44687      * for CFR capture.
44688      */
44689     wmi_mac_addr ra_addr_mask;
44690     /* bw_nss_filter:
44691      * Indicates which bw and nss packets will be filtered for CFR capture
44692      * Bits 4:0   CFR capture will be done for packets matching the bandwidths
44693      *            specified within this bitmask
44694      * Bits 15:5  Reserved for future
44695      * Bits 23:16 CFR capture will be done for packets matching the Nss
44696      *            specified within this bitmask
44697      * Bits 31:24 Reserved for future
44698      */
44699     A_UINT32 bw_nss_filter;
44700     /* mgmt_subtype_filter:
44701      * Managments Packets matching the subtype filter categories will be
44702      * filtered in by MAC for CFR capture.
44703      * This is a bitmask, in which each bit represents the corresponding
44704      * mgmt subtype value as per ieee80211_defs.h
44705      */
44706     A_UINT32 mgmt_subtype_filter;
44707     /* ctrl_subtype_filter:
44708      * Control Packets matching the subtype filter category will be
44709      * filtered in by MAC for CFR capture.
44710      * This is a bitmask, in which each bit represents the corresponding
44711      * ctrl subtype value as per ieee80211_defs.h
44712      */
44713     A_UINT32 ctrl_subtype_filter;
44714     /* data_subtype_filter:
44715      * Data Packets matching the subtype filter category will be
44716      * filtered in by MAC for CFR capture.
44717      * This is a bitmask, in which each bit represents the corresponding
44718      * data subtype value as per ieee80211_defs.h
44719      */
44720     A_UINT32 data_subtype_filter;
44721 } wmi_cfr_filter_group_config;
44722 
44723 #define WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS           0
44724 #define WMI_CFR_ALL_FTM_ACK_EN_BIT_POS                1
44725 #define WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS          2
44726 #define WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS               3
44727 #define WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS          4
44728 #define WMI_CFR_ALL_PACKET_EN_BIT_POS                 5
44729 #define WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_BIT_POS    6
44730 
44731 #define WMI_CFR_CAPTURE_INTERVAL_NUM_BITS             24
44732 #define WMI_CFR_CAPTURE_INTERVAL_BIT_POS              0
44733 
44734 #define WMI_CFR_CAPTURE_DURATION_NUM_BITS             24
44735 #define WMI_CFR_CAPTURE_DURATION_BIT_POS              0
44736 
44737 #define WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS          16
44738 #define WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS           0
44739 
44740 #define WMI_CFR_UL_MU_USER_UPPER_NUM_BITS             5
44741 #define WMI_CFR_UL_MU_USER_UPPER_BIT_POS              0
44742 
44743 #define WMI_CFR_FREEZE_DELAY_CNT_EN_MASK              1
44744 #define WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS           0
44745 
44746 #define WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS         8
44747 #define WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS          1
44748 
44749 
44750 #define WMI_CFR_CAPTURE_COUNT_NUM_BITS                16
44751 #define WMI_CFR_CAPTURE_COUNT_BIT_POS                 0
44752 
44753 #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_NUM_BITS    1
44754 #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_BIT_POS     16
44755 
44756 
44757 #define WMI_CFR_DIRECTED_FTM_ACK_EN_SET(param, value) \
44758     WMI_SET_BITS(param, WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS, 1, value)
44759 
44760 #define WMI_CFR_DIRECTED_FTM_ACK_EN_GET(param)     \
44761     WMI_GET_BITS(param, WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS, 1)
44762 
44763 #define WMI_CFR_ALL_FTM_ACK_EN_SET(param, value) \
44764     WMI_SET_BITS(param, WMI_CFR_ALL_FTM_ACK_EN_BIT_POS, 1, value)
44765 
44766 #define WMI_CFR_ALL_FTM_ACK_EN_GET(param)     \
44767     WMI_GET_BITS(param, WMI_CFR_ALL_FTM_ACK_EN_BIT_POS, 1)
44768 
44769 #define WMI_CFR_NDPA_NDP_DIRECTED_EN_SET(param, value) \
44770     WMI_SET_BITS(param, WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS, 1, value)
44771 
44772 #define WMI_CFR_NDPA_NDP_DIRECTED_EN_GET(param)     \
44773     WMI_GET_BITS(param, WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS, 1)
44774 
44775 #define WMI_CFR_NDPA_NDP_ALL_EN_SET(param, value) \
44776     WMI_SET_BITS(param, WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS, 1, value)
44777 
44778 #define WWMI_CFR_NDPA_NDP_ALL_EN_GET WMI_CFR_NDPA_NDP_ALL_EN_GET
44779 #define WMI_CFR_NDPA_NDP_ALL_EN_GET(param)     \
44780     WMI_GET_BITS(param, WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS, 1)
44781 
44782 #define WMI_CFR_TA_RA_TYPE_FILTER_EN_SET(param, value) \
44783     WMI_SET_BITS(param, WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS, 1, value)
44784 
44785 #define WMI_CFR_TA_RA_TYPE_FILTER_EN_GET(param)     \
44786     WMI_GET_BITS(param, WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS, 1)
44787 
44788 #define WWMI_CFR_ALL_PACKET_EN_SET WMI_CFR_ALL_PACKET_EN_SET
44789 #define WMI_CFR_ALL_PACKET_EN_SET(param, value) \
44790     WMI_SET_BITS(param, WMI_CFR_ALL_PACKET_EN_BIT_POS, 1, value)
44791 
44792 #define WMI_CFR_ALL_PACKET_EN_GET(param)     \
44793     WMI_GET_BITS(param, WMI_CFR_ALL_PACKET_EN_BIT_POS, 1)
44794 
44795 #define WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_SET(param, value)  \
44796     WMI_SET_BITS(param, WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_BIT_POS, 1, value)
44797 
44798 #define WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_GET(param)  \
44799     WMI_GET_BITS(param, WMI_CFR_FILTER_IN_AS_FP_TA_RA_TYPE_BIT_POS, 1)
44800 
44801 #define WMI_CFR_CAPTURE_INTERVAL_SET(param, value) \
44802     WMI_SET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_NUM_BITS, value)
44803 
44804 #define WMI_CFR_CAPTURE_INTERVAL_GET(param)     \
44805     WMI_GET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_NUM_BITS)
44806 
44807 #define WMI_CFR_CAPTURE_DURATION_SET(param, value) \
44808     WMI_SET_BITS(param, WMI_CFR_CAPTURE_DURATION_BIT_POS, WMI_CFR_CAPTURE_DURATION_NUM_BITS, value)
44809 
44810 #define WMI_CFR_CAPTURE_DURATION_GET(param)     \
44811     WMI_GET_BITS(param, WMI_CFR_CAPTURE_DURATION_BIT_POS, WMI_CFR_CAPTURE_DURATION_NUM_BITS)
44812 
44813 #define WMI_CFR_FILTER_GROUP_BITMAP_SET(param, value) \
44814     WMI_SET_BITS(param, WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS, WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS, value)
44815 
44816 #define WMI_CFR_FILTER_GROUP_BITMAP_GET(param)     \
44817     WMI_GET_BITS(param, WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS, WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS)
44818 
44819 #define WMI_CFR_UL_MU_USER_UPPER_SET(param, value) \
44820     WMI_SET_BITS(param, WMI_CFR_UL_MU_USER_UPPER_BIT_POS, WMI_CFR_UL_MU_USER_UPPER_NUM_BITS, value)
44821 
44822 #define WMI_CFR_UL_MU_USER_UPPER_GET(param)     \
44823     WMI_GET_BITS(param, WMI_CFR_UL_MU_USER_UPPER_BIT_POS, WMI_CFR_UL_MU_USER_UPPER_NUM_BITS)
44824 
44825 #define WMI_CFR_FREEZE_DELAY_CNT_EN_SET(param, value) \
44826     WMI_SET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_EN_MASK, value)
44827 
44828 #define WMI_CFR_FREEZE_DELAY_CNT_EN_GET(param)     \
44829     WMI_GET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_EN_MASK)
44830 
44831 #define WMI_CFR_FREEZE_DELAY_CNT_THR_SET(param, value) \
44832     WMI_SET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS, value)
44833 
44834 #define WMI_CFR_FREEZE_DELAY_CNT_THR_GET(param)     \
44835     WMI_GET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS)
44836 
44837 #define WMI_CFR_CAPTURE_COUNT_SET(param, value) \
44838     WMI_SET_BITS(param, WMI_CFR_CAPTURE_COUNT_BIT_POS, WMI_CFR_CAPTURE_COUNT_NUM_BITS, value)
44839 
44840 #define WMI_CFR_CAPTURE_COUNT_GET(param)     \
44841     WMI_GET_BITS(param, WMI_CFR_CAPTURE_COUNT_BIT_POS, WMI_CFR_CAPTURE_COUNT_NUM_BITS)
44842 
44843 #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_SET(param, value) \
44844     WMI_SET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_NUM_BITS, value)
44845 
44846 #define WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_GET(param)     \
44847     WMI_GET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_NUM_BITS)
44848 
44849 typedef struct {
44850    /** TLV tag and len; tag equals
44851     * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_filter_cmd_fixed_param */
44852     A_UINT32 tlv_header;
44853     /** pdev_id for identifying the MAC
44854      * See macros starting with WMI_PDEV_ID_ for values.
44855      * In non-DBDC case host should set it to 0
44856      */
44857     A_UINT32 pdev_id;
44858     /* filter_type:
44859      * Indicates the type of filter to be enabled
44860      * Bit 0:    Filter Directed FTM ACK frames for CFR capture
44861      * Bit 1:    Filter All FTM ACK frames for CFR capture
44862      * Bit 2:    Filter NDPA NDP Directed Frames for CFR capture
44863      * Bit 3:    Filter NDPA NDP All Frames for CFR capture
44864      * Bit 4:    Filter Frames based on TA/RA/Subtype as provided
44865      *           in CFR Group config
44866      * Bit 5:    Filter in All packets for CFR Capture
44867      * Bit 6:    Filter in TA/RA frames as FP if this bit is set else as MO
44868      * Bits 31:7 Reserved for future use
44869      */
44870     A_UINT32 filter_type;
44871     /* capture_interval:
44872      * Capture interval field which is time in between consecutive
44873      * CFR capture, in microsecond units
44874      * Bits 23:0  Capture interval
44875      * Bits 31:24 Reserved for future use
44876      */
44877     A_UINT32 capture_interval;
44878     /* capture_duration:
44879      * Capture Duration field for which CFR capture has to happen,
44880      * in microsecond units
44881      * Bits 23:0  Capture Duration
44882      * Bits 31:24 Reserved for future use
44883      */
44884     A_UINT32 capture_duration;
44885     /* Bitfields set indicates which of the CFR group config is enabled
44886      * Bits 15:0  Filter Group enable Bits
44887      * Bits 31:16 Reserved for future use
44888      * If Bit 0 is set, then CFR filter group 0 alone is enabled and so on
44889      */
44890     A_UINT32 filter_group_bitmap;
44891     /* ul_mu_user_mask_lower:
44892      * Bitfields indicates which of the users in the current UL MU
44893      * transmission are enabled for CFR capture.
44894      * Bits 31 to 0 indicates user indexes for 32 users in a UL MU transmission.
44895      * If bit 0 is set, then the CFR capture will happen for user index 0
44896      * in the current UL MU Transmission.
44897      * If bits 0,2 are set, then CFR capture for UL MU TX corresponds to
44898      * user indices 0 and 2.
44899      */
44900     A_UINT32 ul_mu_user_mask_lower;
44901     /* ul_mu_user_mask_upper:
44902      * This is continuation of the above lower mask.
44903      * Bits 4:0  Bitfields indicates user indices from 33 to 37 users.
44904      * Bits 31:5 Reserved for future use
44905      * If bit 0 is set, then CFR capture is enabled for user index 33
44906      * in a UL MU transmission.
44907      */
44908     A_UINT32 ul_mu_user_mask_upper;
44909     /* freeze_tlv_delay_cnt
44910      * Indicates the number of consecutive Rx packets to be skipped
44911      * before CFR capture is enabled again.
44912      * Bits 8:0   Freeze Delay Count value
44913      * Bits 31:9  Reserved for future use
44914      */
44915     A_UINT32 freeze_tlv_delay_cnt;
44916 
44917     /* capture_count:
44918      * Indicates the number of consecutive packets for which CFR capture
44919      * is to be enabled.
44920      * Interpretation of capture_interval_mode_select (bit 16):
44921      *     Value 0: capture_interval + capture_duration fields are used
44922      *              to capture CFR for capture_duration after every
44923      *              capture_interval.
44924      *     Value 1: capture_interval + capture_count fields are used to
44925      *              capture CFR for capture_count+1 number of packets
44926      *              after every capture interval
44927      * Bit 15:0   : capture_count
44928      *              Refer to WMI_CFR_CAPTURE_COUNT_GET/SET macros.
44929      * Bit 16     : capture_interval_mode_select
44930      *              Refer to WMI_CFR_CAPTURE_INTERVAL_MODE_SEL_GET/SET macros.
44931      * Bits 31:17 : Reserved
44932      */
44933     A_UINT32 capture_count;
44934 
44935 /*
44936  * A variable-length TLV array of wmi_cfr_filter_group_config will
44937  * follow this fixed_param TLV
44938  * wmi_cfr_filter_group_config filter_group_config[];
44939  */
44940 } wmi_cfr_capture_filter_cmd_fixed_param;
44941 
44942 enum wmi_oem_data_evt_cause {
44943     WMI_OEM_DATA_EVT_CAUSE_UNSPECIFIED = 0,
44944     WMI_OEM_DATA_EVT_CAUSE_CMD_REQ = 1,
44945     WMI_OEM_DATA_EVT_CAUSE_ASYNC = 2,
44946     WMI_OEM_DATA_EVT_CAUSE_QMS = 3, /* DEPRECATED */
44947     WMI_OEM_DATA_EVT_CAUSE_SMEM_MAILBOX = 3,
44948 };
44949 
44950 typedef struct {
44951     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_data_event_fixed_param */
44952     A_UINT32 data_len; /** length in byte of data[]. */
44953     /* Event Cause reason from enum wmi_oem_data_evt_cause */
44954     A_UINT32 event_cause;
44955 /* Following this structure is the TLV:
44956  *      A_UINT8 data[]; <-- length in byte given by field data_len.
44957  * This data array contains OEM data, the payload begins with a field to tell the HOST regarding the kind of the OEM data.
44958  *      A_UINT8 file_name[]; <-- Name of the file to which HOST needs to write this OEM specific data.
44959  */
44960 } wmi_oem_data_event_fixed_param;
44961 
44962 #define WMI_VLAN_TX_BIT_POS                             0
44963 #define WMI_VLAN_RX_BIT_POS                             1
44964 #define WMI_TX_INSERT_OR_STRIP_BIT_POS                  2
44965 #define WMI_TX_STRIP_INSERT_VLAN_INNER_BIT_POS          3
44966 #define WMI_TX_STRIP_INSERT_VLAN_OUTER_BIT_POS          4
44967 #define WMI_RX_STRIP_VLAN_C_TAG_BIT_POS                 5
44968 #define WMI_RX_STRIP_VLAN_S_TAG_BIT_POS                 6
44969 #define WMI_RX_INSERT_VLAN_C_TAG_BIT_POS                7
44970 #define WMI_RX_INSERT_VLAN_S_TAG_BIT_POS                8
44971 
44972 #define WMI_TX_INSERT_VLAN_INNER_TCI_NUM_BITS           16
44973 #define WMI_TX_INSERT_VLAN_INNER_TCI_BIT_POS            0
44974 
44975 #define WMI_TX_INSERT_VLAN_OUTER_TCI_NUM_BITS           16
44976 #define WMI_TX_INSERT_VLAN_OUTER_TCI_BIT_POS            16
44977 
44978 
44979 #define WMI_VLAN_TX_SET(param, value) \
44980     WMI_SET_BITS(param, WMI_VLAN_TX_BIT_POS, 1, value)
44981 
44982 #define WMI_VLAN_TX_GET(param)     \
44983     WMI_GET_BITS(param, WMI_VLAN_TX_BIT_POS, 1)
44984 
44985 #define WMI_VLAN_RX_SET(param, value) \
44986     WMI_SET_BITS(param, WMI_VLAN_RX_BIT_POS, 1, value)
44987 
44988 #define WMI_VLAN_RX_GET(param)     \
44989     WMI_GET_BITS(param, WMI_VLAN_RX_BIT_POS, 1)
44990 
44991 #define WMI_TX_INSERT_OR_STRIP_SET(param, value) \
44992     WMI_SET_BITS(param, WMI_TX_INSERT_OR_STRIP_BIT_POS, 1, value)
44993 
44994 #define WMI_TX_INSERT_OR_STRIP_GET(param)     \
44995     WMI_GET_BITS(param, WMI_TX_INSERT_OR_STRIP_BIT_POS, 1)
44996 
44997 #define WMI_TX_STRIP_INSERT_VLAN_INNER_SET(param, value) \
44998     WMI_SET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_INNER_BIT_POS, 1, value)
44999 
45000 #define WMI_TX_STRIP_INSERT_VLAN_INNER_GET(param)     \
45001     WMI_GET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_INNER_BIT_POS, 1)
45002 
45003 #define WMI_TX_STRIP_INSERT_VLAN_OUTER_SET(param, value) \
45004     WMI_SET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_OUTER_BIT_POS, 1, value)
45005 
45006 #define WMI_TX_STRIP_INSERT_VLAN_OUTER_GET(param)     \
45007     WMI_GET_BITS(param, WMI_TX_STRIP_INSERT_VLAN_OUTER_BIT_POS, 1)
45008 
45009 #define WMI_RX_STRIP_VLAN_C_TAG_SET(param, value) \
45010     WMI_SET_BITS(param, WMI_RX_STRIP_VLAN_C_TAG_BIT_POS, 1, value)
45011 
45012 #define WMI_RX_STRIP_VLAN_C_TAG_GET(param)     \
45013     WMI_GET_BITS(param, WMI_RX_STRIP_VLAN_C_TAG_BIT_POS, 1)
45014 
45015 #define WMI_RX_STRIP_VLAN_S_TAG_SET(param, value) \
45016     WMI_SET_BITS(param, WMI_RX_STRIP_VLAN_S_TAG_BIT_POS, 1, value)
45017 
45018 #define WMI_RX_STRIP_VLAN_S_TAG_GET(param)     \
45019     WMI_GET_BITS(param, WMI_RX_STRIP_VLAN_S_TAG_BIT_POS, 1)
45020 
45021 #define WMI_RX_INSERT_VLAN_C_TAG_SET(param, value) \
45022     WMI_SET_BITS(param, WMI_RX_INSERT_VLAN_C_TAG_BIT_POS, 1, value)
45023 
45024 #define WMI_RX_INSERT_VLAN_C_TAG_GET(param)     \
45025     WMI_GET_BITS(param, WMI_RX_INSERT_VLAN_C_TAG_BIT_POS, 1)
45026 
45027 #define WMI_RX_INSERT_VLAN_S_TAG_SET(param, value) \
45028     WMI_SET_BITS(param, WMI_RX_INSERT_VLAN_S_TAG_BIT_POS, 1, value)
45029 
45030 #define WMI_RX_INSERT_VLAN_S_TAG_GET(param)     \
45031     WMI_GET_BITS(param, WMI_RX_INSERT_VLAN_S_TAG_BIT_POS, 1)
45032 
45033 #define WMI_TX_INSERT_VLAN_INNER_TCI_SET(param, value) \
45034     WMI_SET_BITS(param, WMI_TX_INSERT_VLAN_INNER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_INNER_TCI_NUM_BITS, value)
45035 
45036 #define WMI_TX_INSERT_VLAN_INNER_TCI_GET(param)     \
45037     WMI_GET_BITS(param, WMI_TX_INSERT_VLAN_INNER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_INNER_TCI_NUM_BITS)
45038 
45039 #define WMI_TX_INSERT_VLAN_OUTER_TCI_SET(param, value) \
45040     WMI_SET_BITS(param, WMI_TX_INSERT_VLAN_OUTER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_OUTER_TCI_NUM_BITS, value)
45041 
45042 #define WMI_TX_INSERT_VLAN_OUTER_TCI_GET(param)     \
45043     WMI_GET_BITS(param, WMI_TX_INSERT_VLAN_OUTER_TCI_BIT_POS, WMI_TX_INSERT_VLAN_OUTER_TCI_NUM_BITS)
45044 
45045 typedef struct {
45046    /** TLV tag and len; tag equals
45047     * WMITLV_TAG_STRUC_wmi_peer_config_vlan_cmd_fixed_param */
45048     A_UINT32 tlv_header;
45049     /** peer MAC address */
45050     wmi_mac_addr peer_macaddr;
45051     /* peer_vlan_config_mask:
45052      * Field indicates VLAN settings that need to set in RX and TX peer
45053      * Bit 0:    Indicates if the settings are present for TX peer
45054      *           [1 - present for TX peer]
45055      * Bit 1:    Indicates if the settings are present for RX peer
45056      *           [1 - present for RX peer]
45057      * Bit 2:    Setting the insert_or_strip bit in TX peer
45058      *           [0 - Strip, 1 - Insert]
45059      * Bit 3:    Setting the strip_insert_vlan_inner bit in TX peer
45060      *           [0 - Strip, 1 - Insert]
45061      * Bit 4:    Setting the strip_insert_vlan_outer bit in TX peer
45062      *           [0 - Strip, 1 - Insert]
45063      * Bit 5:    Setting the strip_vlan_c_tag_decap bit in RX peer [1 - Strip]
45064      * Bit 6:    Setting the strip_vlan_s_tag_decap bit in RX peer [1 - Strip]
45065      * Bit 7:    Setting the rx_insert_vlan_c_tag_padding bit in RX peer
45066      *           [1 - Insert]
45067      * Bit 8:    Setting the rx_insert_vlan_s_tag_padding bit in RX peer
45068      *           [1 - Insert]
45069      */
45070     A_UINT32 peer_vlan_config_mask;
45071 
45072     /* insert_vlan_tci:
45073      * Field indicates the word that needs to be inserted in the
45074      * inner or outer tag, if insertion is enabled by the
45075      * TX peer strip_insert_vlan_{inner,outer} fields along with
45076      * insert_or_strip field
45077      * Bits 0:15  insert_vlan_inner_tci
45078      * Bits 16:31 insert_vlan_outer_tci
45079      */
45080     A_UINT32 insert_vlan_tci;
45081     /* VDEV identifier */
45082     A_UINT32 vdev_id;
45083 } wmi_peer_config_vlan_cmd_fixed_param;
45084 
45085 typedef struct {
45086   /** TLV tag and len; tag equals
45087     * WMITLV_TAG_STRUC_wmi_peer_config_ppe_ds_cmd_fixed_param */
45088     A_UINT32 tlv_header;
45089 
45090     wmi_mac_addr peer_macaddr;
45091     A_UINT32 ppe_routing_enable; /* enum WMI_PPE_ROUTING_TYPE */
45092 
45093     /* The processing stages in PPE that this packet buffer need to go through
45094      * and on to which PPE queues these buffers should be mapped to.
45095      * Refer pkg/ppe/src/ppe_sc.h for service code types
45096      */
45097     A_UINT32 service_code;
45098 
45099     A_UINT32 priority_valid;
45100 
45101     /* Unique number that represents a VAP's vdev_id in PPE domain */
45102     A_UINT32 src_info;
45103 
45104     /* VDEV identifier */
45105     A_UINT32 vdev_id;
45106 } wmi_peer_config_ppe_ds_cmd_fixed_param;
45107 
45108 typedef enum {
45109     WMI_PPE_ROUTING_DISABLED = 0,
45110     WMI_AST_USE_PPE_ENABLED  = 1,
45111     WMI_AST_USE_PPE_DISABLED = 2,
45112     WMI_PPE_ROUTING_TYPE_MAX,
45113 } WMI_PPE_ROUTING_TYPE;
45114 
45115 typedef struct {
45116     /** TLV tag and len; tag equals
45117     * WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_restart_resp_event_fixed_param */
45118     A_UINT32 tlv_header;
45119     A_UINT32 pdev_id; /* ID of the pdev this response belongs to */
45120     A_UINT32 requestor_id;
45121     /** Return status. As per WMI_VDEV_START_RESPONSE_XXXXX */
45122     A_UINT32 status;
45123 
45124     /* The TLVs follows this structure:
45125      * A_UINT32 vdev_ids_bitmap[]; <--- Array of VDEV id bitmap.
45126      */
45127 } wmi_pdev_multiple_vdev_restart_resp_event_fixed_param;
45128 
45129 /** WMI event for Firmware to report soundbar audio frame statistics to Host **/
45130 typedef struct {
45131     /** TLV tag and len **/
45132     A_UINT32 tlv_header;
45133     A_UINT32 vdev_id; /* ID of the vdev this response belongs to */
45134     /** identify which request this responds to **/
45135     A_UINT32 response_id;
45136     /* audio frame statistics part -
45137      * Use subsequent TLV arrays to list group_stats and peer_stats.
45138      */
45139 
45140 /*
45141  * The TLVs listing group_stats, will follow this TLV.
45142  * The number of group_stats can be calculated by dividing the
45143  * TLV array length by the TLV array element length.
45144  *
45145  * The fixed_param TLV is directly followed by a list of
45146  * wmi_audio_aggr_group_stats elements:
45147  *     wmi_audio_aggr_group_stats group_stats[0];
45148  *     wmi_audio_aggr_group_stats group_stats[1];
45149  *     ...
45150  *     wmi_audio_aggr_group_stats group_stats[N];
45151  *
45152  * After the list of wmi_audio_aggr_group_stats is a list of peer_stats.
45153  *     wmi_audio_aggr_peer_stats peer_stats[0];
45154  *     wmi_audio_aggr_peer_stats peer_stats[1];
45155  *     ...
45156  *     wmi_audio_aggr_peer_stats peer_stats[N];
45157  *
45158  */
45159 } wmi_audio_aggr_statistics_event_fixed_param;
45160 
45161 typedef struct {
45162     /** TLV tag and len **/
45163     A_UINT32 tlv_header;
45164     /* Group mac_address */
45165     wmi_mac_addr group_addr;
45166     /* Group identity */
45167     A_UINT32 group_id;
45168     /* Multicast MSDU Data Packets received from Host for this Group */
45169     A_UINT32 mcast_tx;
45170     /*
45171      * Multicast MSDU Data Packets sent to OTA.
45172      * Customer defined SW Retry Packets not included, as these
45173      * SW Retry packets generated in FW locally, but not from Host.
45174      */
45175     A_UINT32 mcast_tx_ok;
45176     /*
45177      * Multicast MSDU Data Packets sent to OTA.
45178      * Only include Customer defined SW Retry Packets.
45179      */
45180     A_UINT32 mcast_tx_ok_retry;
45181     /*
45182      * Multicast MSDU Data Packets not sent to OTA,
45183      * discarded by tbd function due to timeout.
45184      * Customer defined SW Retry Packets not included.
45185      */
45186     A_UINT32 mcast_tx_tbd_lost;
45187     /*
45188      * Multicast MSDU Data Packets not sent to OTA,
45189      * discarded by tbd function due to timeout.
45190      * Only include Customer defined SW Retry Packets.
45191      */
45192     A_UINT32 mcast_tx_tbd_lost_retry;
45193 } wmi_audio_aggr_group_stats;
45194 
45195 typedef struct {
45196     /** TLV tag and len **/
45197     A_UINT32 tlv_header;
45198     /* STA mac_address */
45199     wmi_mac_addr peer_addr;
45200     /* Unicast MSDU Data Packets received from peer STA */
45201     A_UINT32 ucast_rx;
45202     /* Unicast MSDU Data Packets received from Host for Peer STA */
45203     A_UINT32 ucast_tx;
45204     /*
45205      * Unicast MSDU Data Packets received from Host,
45206      * and SW retry times for these packets.
45207      */
45208     A_UINT32 ucast_tx_retry;
45209     /*
45210      * Unicast MSDU Data Packets received from Host,
45211      * and sent to Peer STA successfully.
45212      */
45213     A_UINT32 ucast_tx_ok;
45214     /*
45215      * Unicast MSDU Data Packets received from Host,
45216      * but sent to Peer STA fail. not OTA, or no ACK from Peer.
45217      */
45218     A_UINT32 ucast_tx_lost;
45219     /*
45220      * Periodic NULL Data frames for multicast tx rate auto control.
45221      * Generated by FW locally, and sent to Peer STA successfully.
45222      */
45223     A_UINT32 null_frame_tx;
45224     /*
45225      * Periodic NULL Data frames for multicast tx rate auto control.
45226      * Generated by FW locally, but sent to Peer STA fail.
45227      */
45228     A_UINT32 null_frame_tx_lost;
45229 } wmi_audio_aggr_peer_stats;
45230 
45231 typedef struct {
45232     /** TLV tag and len **/
45233     A_UINT32 tlv_header;
45234 
45235     /* ID of the vdev this response belongs to */
45236     A_UINT32 vdev_id;
45237 
45238     /* selected audio aggr scheduler method
45239     *  valid methods can be found in WMI_AUDIO_AGGR_SCHED_METHOD_TYPE
45240     */
45241     A_UINT32 sched_method;
45242 
45243     /* rts-cts config
45244     * valid config can be found in WMI_AUDIO_AGGR_RTS_CTS_CONFIG_TYPE
45245     */
45246     A_UINT32 rtscts_config;
45247 } wmi_audio_aggr_sched_method_event_fixed_param;
45248 
45249 typedef struct {
45250     /** TLV tag and len; tag equals
45251     *WMITLV_TAG_STRUC_wmi_pdev_srg_bss_color_bitmap_cmd_fixed_param */
45252     A_UINT32 tlv_header;
45253     /** pdev_id for identifying the MAC
45254      * See macros starting with WMI_PDEV_ID_ for values.
45255      * In non-DBDC case host should set it to 0
45256      */
45257     A_UINT32 pdev_id;
45258     /* 64 bit bss color bitmap used by SRG based spatial reuse feature
45259      * bitmap[0] contains lower 32 bits and bitmap[1] contains
45260      * upper 32 bits.
45261      */
45262     A_UINT32 srg_bss_color_bitmap[2];
45263 } wmi_pdev_srg_bss_color_bitmap_cmd_fixed_param;
45264 
45265 typedef struct {
45266     /** TLV tag and len; tag equals
45267     *WMITLV_TAG_STRUC_wmi_pdev_srg_partial_bssid_bitmap_cmd_fixed_param */
45268     A_UINT32 tlv_header;
45269     /** pdev_id for identifying the MAC
45270      * See macros starting with WMI_PDEV_ID_ for values.
45271      * In non-DBDC case host should set it to 0
45272      */
45273     A_UINT32 pdev_id;
45274     /* 64 bit partial bssid bitmap used by SRG based spatial reuse feature
45275      * bitmap[0] contains lower 32 bits and bitmap[1] contains
45276      * upper 32 bits.
45277      */
45278     A_UINT32 srg_partial_bssid_bitmap[2];
45279 } wmi_pdev_srg_partial_bssid_bitmap_cmd_fixed_param;
45280 
45281 typedef struct {
45282     /** TLV tag and len; tag equals
45283      * WMITLV_TAG_STRUC_wmi_pdev_srg_obss_color_enable_bitmap_cmd_fixed_param */
45284     A_UINT32 tlv_header;
45285     /** pdev_id for identifying the MAC
45286      * See macros starting with WMI_PDEV_ID_ for values.
45287      * In non-DBDC case host should set it to 0
45288      */
45289     A_UINT32 pdev_id;
45290     /* 64 bit SRG obss color enable bitmap used by SRG based spatial reuse feature
45291      * bitmap[0] contains lower 32 bits and bitmap[1] contains
45292      * upper 32 bits.
45293      */
45294     A_UINT32 srg_obss_en_color_bitmap[2];
45295 } wmi_pdev_srg_obss_color_enable_bitmap_cmd_fixed_param;
45296 
45297 typedef struct {
45298     /** TLV tag and len; tag equals
45299      * WMITLV_TAG_STRUC_wmi_pdev_srg_obss_bssid_enable_bitmap_cmd_fixed_param */
45300     A_UINT32 tlv_header;
45301     /** pdev_id for identifying the MAC
45302      * See macros starting with WMI_PDEV_ID_ for values.
45303      * In non-DBDC case host should set it to 0
45304      */
45305     A_UINT32 pdev_id;
45306     /* 64 bit obss bssid enable bitmap used by SRG based spatial reuse feature
45307      * bitmap[0] contains lower 32 bits and bitmap[1] contains
45308      * upper 32 bits.
45309      */
45310     A_UINT32 srg_obss_en_bssid_bitmap[2];
45311 } wmi_pdev_srg_obss_bssid_enable_bitmap_cmd_fixed_param;
45312 
45313 typedef struct {
45314     /** TLV tag and len; tag equals
45315      * WMITLV_TAG_STRUC_wmi_pdev_non_srg_obss_color_enable_bitmap_cmd_fixed_param */
45316     A_UINT32 tlv_header;
45317     /** pdev_id for identifying the MAC
45318      * See macros starting with WMI_PDEV_ID_ for values.
45319      * In non-DBDC case host should set it to 0
45320      */
45321     A_UINT32 pdev_id;
45322     /* 64 bit Non_SRG obss color enable bitmap used by Non_SRG based spatial reuse feature
45323      * bitmap[0] contains lower 32 bits and bitmap[1] contains
45324      * upper 32 bits.
45325      */
45326     A_UINT32 non_srg_obss_en_color_bitmap[2];
45327 } wmi_pdev_non_srg_obss_color_enable_bitmap_cmd_fixed_param;
45328 
45329 typedef struct {
45330     /** TLV tag and len; tag equals
45331      * WMITLV_TAG_STRUC_wmi_pdev_non_srg_obss_bssid_enable_bitmap_cmd_fixed_param */
45332     A_UINT32 tlv_header;
45333     /** pdev_id for identifying the MAC
45334      * See macros starting with WMI_PDEV_ID_ for values.
45335      * In non-DBDC case host should set it to 0
45336      */
45337     A_UINT32 pdev_id;
45338     /* 64 bit obss bssid enable bitmap used by Non_SRG based spatial reuse feature
45339      * bitmap[0] contains lower 32 bits and bitmap[1] contains
45340      * upper 32 bits.
45341      */
45342     A_UINT32 non_srg_obss_en_bssid_bitmap[2];
45343 } wmi_pdev_non_srg_obss_bssid_enable_bitmap_cmd_fixed_param;
45344 
45345 typedef struct {
45346     /** TLV tag and len; tag equals
45347      * WMITLV_TAG_STRUC_wmi_pdev_enable_duration_based_tx_mode_selection_cmd_fixed_param
45348      */
45349     A_UINT32 tlv_header;
45350     /** pdev_id for identifying the MAC
45351      * See macros starting with WMI_PDEV_ID_ for values.
45352      * In non-DBDC case host should set it to 0
45353      */
45354     A_UINT32 pdev_id;
45355     /* enable/disable Duration based Tx Mode selection */
45356     A_UINT32 duration_based_tx_mode_selection;
45357 } wmi_pdev_enable_duration_based_tx_mode_selection_cmd_fixed_param;
45358 
45359 typedef enum {
45360     /* Simulation test command types */
45361     WMI_SIM_TEST_FRAME_CONTENT_CHANGE_CMD,
45362     WMI_SIM_TEST_DROP_FRAME_CMD,
45363     WMI_SIM_TEST_DELAY_FRAME_CMD,
45364     WMI_SIM_TEST_CONFIGURATION_CMD,
45365 
45366     WMI_SIM_TEST_CMD_UNKNOWN = 255,
45367 } WMI_SIMULATION_TEST_CMD_TYPE;
45368 
45369 typedef enum {
45370     /* Simulation test sub-command types */
45371     WMI_SIM_TEST_SUB_CMD_UNKNOWN = 255,
45372 } WMI_SIMULATION_TEST_SUB_CMD_TYPE;
45373 
45374 #define WMI_SIM_FRAME_TYPE_BIT_POS      0
45375 #define WMI_SIM_FRAME_SUBTYPE_BIT_POS   8
45376 #define WMI_SIM_FRAME_SEQ_BIT_POS       16
45377 #define WMI_SIM_FRAME_OFFSET_BIT_POS    0
45378 #define WMI_SIM_FRAME_LENGTH_BIT_POS    16
45379 
45380 #define WMI_SIM_FRAME_TYPE_SET(param, value) \
45381     WMI_SET_BITS(param, WMI_SIM_FRAME_TYPE_BIT_POS, 8, value)
45382 #define WMI_SIM_FRAME_TYPE_GET(param)     \
45383     WMI_GET_BITS(param, WMI_SIM_FRAME_TYPE_BIT_POS, 8)
45384 
45385 #define WMI_SIM_FRAME_SUBTYPE_SET(param, value) \
45386     WMI_SET_BITS(param, WMI_SIM_FRAME_SUBTYPE_BIT_POS, 8, value)
45387 #define WMI_SIM_FRAME_SUBTYPE_GET(param)     \
45388     WMI_GET_BITS(param, WMI_SIM_FRAME_SUBTYPE_BIT_POS, 8)
45389 
45390 #define WMI_SIM_FRAME_SEQ_SET(param, value) \
45391     WMI_SET_BITS(param, WMI_SIM_FRAME_SEQ_BIT_POS, 8, value)
45392 #define WMI_SIM_FRAME_SEQ_GET(param)     \
45393     WMI_GET_BITS(param, WMI_SIM_FRAME_SEQ_BIT_POS, 8)
45394 
45395 #define WMI_SIM_FRAME_OFFSET_SET(param, value) \
45396     WMI_SET_BITS(param, WMI_SIM_FRAME_OFFSET_BIT_POS, 16, value)
45397 #define WMI_SIM_FRAME_OFFSET_GET(param)     \
45398     WMI_GET_BITS(param, WMI_SIM_FRAME_OFFSET_BIT_POS, 16)
45399 
45400 #define WMI_SIM_FRAME_LENGTH_SET(param, value) \
45401     WMI_SET_BITS(param, WMI_SIM_FRAME_LENGTH_BIT_POS, 16, value)
45402 #define WMI_SIM_FRAME_LENGTH_GET(param)     \
45403     WMI_GET_BITS(param, WMI_SIM_FRAME_LENGTH_BIT_POS, 16)
45404 
45405 typedef struct {
45406     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_simulation_test_cmd_fixed_param  */
45407     A_UINT32 tlv_header;
45408     /** pdev_id for identifying the MAC.
45409      * See macros starting with WMI_PDEV_ID_ for values.
45410      * In non-DBDC case host should set it to 0.
45411      */
45412     A_UINT32 pdev_id;
45413     /** vdev_id for identifying the vap simulation command needs to be applied.
45414      * This is for future purpose, currently only 1 vap is supported for
45415      * simulation test mode.
45416      * Host will always set it to 0 for now.
45417      */
45418     A_UINT32 vdev_id;
45419     /** peer MAC address for identifying the peer for which the simulation
45420      * command needs to be applied.
45421      * peer_macaddr needs to be set to '0' for simulation commands which
45422      * needs to be applied at pdev or vdev level.
45423      */
45424     wmi_mac_addr peer_macaddr;
45425     /** test command type, as per WMI_SIMULATION_TEST_CMD_TYPE */
45426     A_UINT32 test_cmd_type;
45427     /** test command type, as per WMI_SIMULATION_TEST_SUB_CMD_TYPE */
45428     A_UINT32 test_subcmd_type;
45429     /**
45430      * The frame type, frame subtype, and frame sequence number
45431      * are stored as bitfields within the below A_UINT32 "word".
45432      * Use the WMI_SIM_xxx_GET/SET macros to read and
45433      * write these bitfields.
45434      **/
45435     A_UINT32 frame_type_subtype_seq;
45436     /**
45437      * The frame offset and frame length,
45438      * are stored as bitfields within the below A_UINT32 "word".
45439      * Use the WMI_SIM_xxx_GET/SET macros to read and
45440      * write these bitfields.
45441      **/
45442     A_UINT32 frame_offset_length;
45443     /** buf_len: Buffer length in bytes
45444      * In some cases buf_len == frame_length, but not always.
45445      * For example, a DELAY_FRAME command will not involve any frame
45446      * contents, so frame_length will be zero, but buf_len will be
45447      * non-zero because it will contain command-specific parameters.
45448      */
45449     A_UINT32 buf_len;
45450 /* This TLV is followed by array of bytes:
45451  *   A_UINT8 bufp[];
45452  *       For FRAME_CONTENT_CHANGE commands, bufp contains the first 64 bytes
45453  *       of the frame.
45454  */
45455 } wmi_simulation_test_cmd_fixed_param;
45456 
45457 typedef struct {
45458     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_rsnxe */
45459     A_UINT32 tlv_header;
45460     /* rsnxe_param
45461      * Override RSNXE Used bit in FT reassoc request.
45462      *   Possible values from host are:
45463      *   0  use default value based on capability
45464      *   1  override with 1
45465      *   2  override with 0
45466      */
45467     A_UINT32 rsnxe_param;
45468 } wmi_wfa_config_rsnxe;
45469 
45470 typedef struct {
45471     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_csa */
45472     A_UINT32 tlv_header;
45473     /* ignore_csa
45474      * Ignore CSA from AP and keep STA in current channel and don't deauth AP.
45475      *   Possible values from host are:
45476      *   0  default behavior
45477      *   1  ignore CSA
45478      */
45479     A_UINT32 ignore_csa;
45480 } wmi_wfa_config_csa;
45481 
45482 typedef enum {
45483     WMI_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_REQ          = 0x00000001,
45484     WMI_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_RSP          = 0x00000002,
45485     WMI_WFA_CONFIG_OCV_FRMTYPE_FT_REASSOC_REQ       = 0x00000004,
45486     WMI_WFA_CONFIG_OCV_FRMTYPE_FILS_REASSOC_REQ     = 0x00000008,
45487 } WMI_WFA_CONFIG_OCV_FRMTYPE;
45488 
45489 typedef struct {
45490     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_ocv */
45491     A_UINT32 tlv_header;
45492     /* frame_types
45493      * Override OCI channel number in specified frames.
45494      * Possible frame types from host are enum WMI_WFA_CONFIG_OCV_FRMTYPE.
45495      */
45496     A_UINT32 frame_types;
45497     /* Frequency value in mhz to override in specified frame type */
45498     A_UINT32 chan_freq;
45499 } wmi_wfa_config_ocv;
45500 
45501 typedef struct {
45502     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_saquery */
45503     A_UINT32 tlv_header;
45504     /* remain_connect_on_saquery_timeout
45505      * Don't send deauth on SA Query response timeout.
45506      *   Possible values from host are:
45507      *   0  default behavior
45508      *   1  don't send deauth on SA Query response timeout
45509      */
45510     A_UINT32 remain_connect_on_saquery_timeout;
45511 } wmi_wfa_config_saquery;
45512 
45513 typedef struct {
45514     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_ofdma */
45515     A_UINT32 tlv_header;
45516     /* force_he_trigger_to_eht_sta
45517      *   Possible values from host are:
45518      *   0  default behavior
45519      *   1  instead of sending EHT triggers to EHT stations, send HE triggers
45520      */
45521     A_UINT32 force_he_trigger_to_eht_sta;
45522 } wmi_wfa_config_ofdma;
45523 
45524 typedef struct {
45525     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wfa_config_cmd_fixed_param */
45526     A_UINT32 tlv_header;
45527     /** VDEV identifier */
45528     A_UINT32 vdev_id;
45529     /* The below TLV arrays follow this structure:
45530      * wmi_wfa_config_rsnxe   wfa_config_rsnxe[];   (0 or 1 elements)
45531      * wmi_wfa_config_csa     wfa_config_csa[];     (0 or 1 elements)
45532      * wmi_wfa_config_ocv     wfa_config_ocv[];     (0 or 1 elements)
45533      * wmi_wfa_config_saquery wfa_config_saquery[]; (0 or 1 elements)
45534      * wmi_wfa_config_ofdma   wfa_config_ofdma[];   (0 or 1 elements)
45535      */
45536 } wmi_wfa_config_cmd_fixed_param;
45537 
45538 #define WMI_TWT_SESSION_FLAG_FLOW_ID_GET(_var) WMI_GET_BITS(_var, 0, 16)
45539 #define WMI_TWT_SESSION_FLAG_FLOW_ID_SET(_var, _val) WMI_SET_BITS(_var, 0, 16, _val)
45540 
45541 #define WMI_TWT_SESSION_FLAG_BCAST_TWT_GET(_var) WMI_GET_BITS(_var, 16, 1)
45542 #define WMI_TWT_SESSION_FLAG_BCAST_TWT_SET(_var, _val) WMI_SET_BITS(_var, 16, 1, _val)
45543 
45544 #define WMI_TWT_SESSION_FLAG_TRIGGER_TWT_GET(_var) WMI_GET_BITS(_var, 17, 1)
45545 #define WMI_TWT_SESSION_FLAG_TRIGGER_TWT_SET(_var, _val) WMI_SET_BITS(_var, 17, 1, _val)
45546 
45547 #define WMI_TWT_SESSION_FLAG_ANNOUN_TWT_GET(_var) WMI_GET_BITS(_var, 18, 1)
45548 #define WMI_TWT_SESSION_FLAG_ANNOUN_TWT_SET(_var, _val) WMI_SET_BITS(_var, 18, 1, _val)
45549 
45550 #define WMI_TWT_SESSION_FLAG_TWT_PROTECTION_GET(_var) WMI_GET_BITS(_var, 19, 1)
45551 #define WMI_TWT_SESSION_FLAG_TWT_PROTECTION_SET(_var, _val) WMI_SET_BITS(_var, 19, 1, _val)
45552 
45553 #define WMI_TWT_SESSION_FLAG_TWT_INFO_FRAME_DISABLED_GET(_var) WMI_GET_BITS(_var, 20, 1)
45554 #define WMI_TWT_SESSION_FLAG_TWT_INFO_FRAME_DISABLED_SET(_var, _val) WMI_SET_BITS(_var, 20, 1, _val)
45555 
45556 #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_VALID_GET(_var) WMI_GET_BITS(_var, 21, 1)
45557 #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_VALID_SET(_var, _val) WMI_SET_BITS(_var, 21, 1, _val)
45558 
45559 #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_GET(_var) WMI_GET_BITS(_var, 22, 1)
45560 #define WMI_TWT_SESSION_FLAG_TWT_PM_RESPONDER_MODE_SET(_var, _val) WMI_SET_BITS(_var, 22, 1, _val)
45561 
45562 #define WMI_TWT_SESSION_FLAG_RESTRICTED_TWT_GET(_var) WMI_GET_BITS(_var, 23, 1)
45563 #define WMI_TWT_SESSION_FLAG_RESTRICTED_TWT_SET(_var, _val) WMI_SET_BITS(_var, 23, 1, _val)
45564 
45565 typedef struct {
45566     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_session_stats_info */
45567     A_UINT32 tlv_hdr;
45568 
45569     A_UINT32     vdev_id;
45570     wmi_mac_addr peer_mac;
45571     A_UINT32 event_type; /* event type - defined in enum wmi_twt_session_stats_type */
45572     /*
45573      * Flags to provide information on TWT session and session types.
45574      * This field is filled with the bitwise combination of the flag values
45575      * defined by WMI_TWT_SESSION_FLAG_xxx
45576      */
45577     A_UINT32     flow_id_flags;
45578     A_UINT32     dialog_id;
45579     A_UINT32     wake_dura_us;
45580     A_UINT32     wake_intvl_us;
45581     /* this long time after TWT resumed the 1st Service Period will start */
45582     A_UINT32     sp_offset_us;
45583     /* service period start TSF */
45584     A_UINT32     sp_tsf_us_lo; /* bits 31:0 */
45585     A_UINT32     sp_tsf_us_hi; /* bits 63:32 */
45586     /* Current TSF */
45587     A_UINT32     curr_tsf_us_lo; /* bits 31:0 */
45588     A_UINT32     curr_tsf_us_hi; /* bits 63:32 */
45589 } wmi_twt_session_stats_info;
45590 
45591 enum wmi_twt_session_stats_type {
45592     WMI_TWT_SESSION_SETUP     = 1,
45593     WMI_TWT_SESSION_TEARDOWN  = 2,
45594     WMI_TWT_SESSION_UPDATE    = 3,
45595     WMI_TWT_SESSION_QUERY_RSP = 4,
45596 };
45597 
45598 typedef struct {
45599     /** TLV tag and len; tag equals
45600     * WMITLV_TAG_STRUC_wmi_pdev_twt_session_stats_event_fixed_param */
45601     A_UINT32 tlv_header;
45602 
45603     A_UINT32 pdev_id; /* ID of the pdev this response belongs to */
45604 
45605     /* The TLVs follows this structure:
45606      * wmi_twt_session_stats_info twt_sessions[]; <--- Array of twt_session.
45607      */
45608 } wmi_pdev_twt_session_stats_event_fixed_param;
45609 
45610 typedef struct wmi_pdev_vendor_event
45611 {
45612     /* type is WMITLV_TAG_STRUC_wmi_vendor_pdev_event_fixed_param */
45613     A_UINT32 tlv_header;
45614     /* pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. */
45615     A_UINT32 pdev_id;
45616     /* Any vendor specialization cases will need to add sub_type enum defs. */
45617     A_UINT32 sub_type;
45618     wmi_pdev_vendor_event_val evt;
45619     /* NOTE:
45620      * Future changes may increase the size of pdev_vendor_event.
45621      * Consequently, no fields can be added here after pdev_vendor_event,
45622      * because their offsets within wmi_pdev_vendor_event_fixed_param
45623      * would change, causing backwards incompatibilities.
45624      */
45625 /*
45626  * This fixed_param TLV may be followed by the below TLVs:
45627  *   - A_UINT32 opaque_vendor_var_len_data[]:
45628  *     Variable-length array of opaque data.
45629  *     The _fixed_param.sub_type value clarifies how to interpret the
45630  *     contents of this opaque data.
45631  */
45632 } wmi_pdev_vendor_event_fixed_param;
45633 typedef wmi_pdev_vendor_event_fixed_param wmi_vendor_pdev_event_fixed_param;
45634 
45635 typedef struct wmi_vdev_vendor_event
45636 {
45637     /* type is WMITLV_TAG_STRUC_wmi_vendor_vdev_event_fixed_param */
45638     A_UINT32 tlv_header;
45639     /* pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. */
45640     A_UINT32 pdev_id;
45641     /* unique id identifying the VDEV, generated by the caller */
45642     A_UINT32 vdev_id;
45643     /* Any vendor specialization cases will need to add sub_type enum defs. */
45644     A_UINT32 sub_type;
45645     wmi_vdev_vendor_event_val evt;
45646     /* NOTE:
45647      * Future changes may increase the size of vdev_vendor_event.
45648      * Consequently, no fields can be added here after vdev_vendor_event,
45649      * because their offsets within wmi_vdev_vendor_event_fixed_param
45650      * would change, causing backwards incompatibilities.
45651      */
45652 /*
45653  * This fixed_param TLV may be followed by the below TLVs:
45654  *   - A_UINT32 opaque_vendor_var_len_data[]:
45655  *     Variable-length array of opaque data.
45656  *     The _fixed_param.sub_type value clarifies how to interpret the
45657  *     contents of this opaque data.
45658  */
45659 } wmi_vdev_vendor_event_fixed_param;
45660 typedef wmi_vdev_vendor_event_fixed_param wmi_vendor_vdev_event_fixed_param;
45661 
45662 typedef struct wmi_peer_vendor_event
45663 {
45664     /* type is WMITLV_TAG_STRUC_wmi_vendor_peer_event_fixed_param */
45665     A_UINT32 tlv_header;
45666     /* pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. */
45667     A_UINT32 pdev_id;
45668     /* unique id identifying the VDEV, generated by the caller */
45669     A_UINT32 vdev_id;
45670     /* peer MAC address */
45671     wmi_mac_addr peer_macaddr;
45672     /* Any vendor specialization cases will need to add sub_type enum defs. */
45673     A_UINT32 sub_type;
45674     wmi_peer_vendor_event_val evt;
45675     /* NOTE:
45676      * Future changes may increase the size of peer_vendor_event.
45677      * Consequently, no fields can be added here after peer_vendor_event,
45678      * because their offsets within wmi_peer_vendor_event_fixed_param
45679      * would change, causing backwards incompatibilities.
45680      */
45681 /*
45682  * This fixed_param TLV may be followed by the below TLVs:
45683  *   - A_UINT32 opaque_vendor_var_len_data[]:
45684  *     Variable-length array of opaque data.
45685  *     The _fixed_param.sub_type value clarifies how to interpret the
45686  *     contents of this opaque data.
45687  */
45688 } wmi_peer_vendor_event_fixed_param;
45689 typedef wmi_peer_vendor_event_fixed_param wmi_vendor_peer_event_fixed_param;
45690 
45691 typedef struct wmi_pdev_vendor_cmd
45692 {
45693     /* type is WMITLV_TAG_STRUC_wmi_vendor_pdev_cmd_fixed_param */
45694     A_UINT32 tlv_header;
45695     /* pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. */
45696     A_UINT32 pdev_id;
45697     /* Any vendor specialization cases will need to add sub_type enum defs. */
45698     A_UINT32 sub_type;
45699     wmi_pdev_vendor_cmd_val cmd;
45700     /* NOTE:
45701      * Future changes may increase the size of pdev_vendor_cmd.
45702      * Consequently, no fields can be added here after pdev_vendor_cmd,
45703      * because their offsets within wmi_pdev_vendor_cmd_fixed_param
45704      * would change, causing backwards incompatibilities.
45705      */
45706 /*
45707  * This fixed_param TLV may be followed by the below TLVs:
45708  *   - A_UINT32 opaque_vendor_var_len_data[]:
45709  *     Variable-length array of opaque data.
45710  *     The _fixed_param.sub_type value clarifies how to interpret the
45711  *     contents of this opaque data.
45712  */
45713 } wmi_pdev_vendor_cmd_fixed_param;
45714 typedef wmi_pdev_vendor_cmd_fixed_param wmi_vendor_pdev_cmd_fixed_param;
45715 
45716 typedef struct wmi_vdev_vendor_cmd
45717 {
45718     /* type is WMITLV_TAG_STRUC_wmi_vendor_vdev_cmd_fixed_param */
45719     A_UINT32 tlv_header;
45720     /* pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. */
45721     A_UINT32 pdev_id;
45722     /* unique id identifying the VDEV, generated by the caller */
45723     A_UINT32 vdev_id;
45724     /* Any vendor specialization cases will need to add sub_type enum defs. */
45725     A_UINT32 sub_type;
45726     wmi_vdev_vendor_cmd_val cmd;
45727     /* NOTE:
45728      * Future changes may increase the size of vdev_vendor_cmd.
45729      * Consequently, no fields can be added here after vdev_vendor_cmd,
45730      * because their offsets within wmi_vdev_vendor_cmd_fixed_param
45731      * would change, causing backwards incompatibilities.
45732      */
45733 /*
45734  * This fixed_param TLV may be followed by the below TLVs:
45735  *   - A_UINT32 opaque_vendor_var_len_data[]:
45736  *     Variable-length array of opaque data.
45737  *     The _fixed_param.sub_type value clarifies how to interpret the
45738  *     contents of this opaque data.
45739  */
45740 } wmi_vdev_vendor_cmd_fixed_param;
45741 typedef wmi_vdev_vendor_cmd_fixed_param wmi_vendor_vdev_cmd_fixed_param;
45742 
45743 typedef struct wmi_peer_vendor_cmd
45744 {
45745     /* type is WMITLV_TAG_STRUC_wmi_vendor_peer_cmd_fixed_param */
45746     A_UINT32 tlv_header;
45747     /* pdev_id for identifying the MAC.  See macros starting with WMI_PDEV_ID_ for values. */
45748     A_UINT32 pdev_id;
45749     /* unique id identifying the VDEV, generated by the caller */
45750     A_UINT32 vdev_id;
45751     /* peer MAC address */
45752     wmi_mac_addr peer_macaddr;
45753     /* Any vendor specialization cases will need to add sub_type enum defs. */
45754     A_UINT32 sub_type;
45755     wmi_peer_vendor_cmd_val cmd;
45756     /* NOTE:
45757      * Future changes may increase the size of peer_vendor_cmd.
45758      * Consequently, no fields can be added here after peer_vendor_cmd,
45759      * because their offsets within wmi_peer_vendor_cmd_fixed_param
45760      * would change, causing backwards incompatibilities.
45761      */
45762 /*
45763  * This fixed_param TLV may be followed by the below TLVs:
45764  *   - A_UINT32 opaque_vendor_var_len_data[]:
45765  *     Variable-length array of opaque data.
45766  *     The _fixed_param.sub_type value clarifies how to interpret the
45767  *     contents of this opaque data.
45768  */
45769 } wmi_peer_vendor_cmd_fixed_param;
45770 typedef wmi_peer_vendor_cmd_fixed_param wmi_vendor_peer_cmd_fixed_param;
45771 
45772 typedef enum {
45773     WMI_MLO_LINK_FORCE_ACTIVE                 = 1, /* Force specific links active */
45774     WMI_MLO_LINK_FORCE_INACTIVE               = 2, /* Force specific links inactive */
45775     WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM        = 3, /* Force active a number of links, firmware to decide which links to inactive */
45776     WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM      = 4, /* Force inactive a number of links, firmware to decide which links to inactive */
45777     WMI_MLO_LINK_NO_FORCE                     = 5, /* Cancel the force operation of specific links, allow firmware to decide */
45778     WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE        = 6, /* combination of force specific links active & force specific links inactive */
45779     WMI_MLO_LINK_NON_FORCE_UPDATE             = 7, /* Used when host wants to update other fields like disallow_mlo_mode_bmap */
45780 } WMI_MLO_LINK_FORCE_MODE;
45781 
45782 typedef enum {
45783     WMI_MLO_LINK_FORCE_REASON_NEW_CONNECT      = 1, /* Set force specific links because of new connection */
45784     WMI_MLO_LINK_FORCE_REASON_NEW_DISCONNECT   = 2, /* Set force specific links because of new dis-connection */
45785     WMI_MLO_LINK_FORCE_REASON_LINK_REMOVAL     = 3, /* Set force specific links because of AP-side link removal */
45786     WMI_MLO_LINK_FORCE_REASON_TDLS             = 4, /* Set force specific links because of 11BE MLO TDLS setup/teardown */
45787     WMI_MLO_LINK_FORCE_REASON_REVERT_FAILURE   = 5, /* Set force specific links for revert previous failed due to host reject */
45788 } WMI_MLO_LINK_FORCE_REASON;
45789 
45790 #define WMI_MLO_CONTROL_FLAGS_GET_OVERWRITE_FORCE_ACTIVE(mlo_flags) \
45791     WMI_GET_BITS(control_flags, 0, 1)
45792 #define WMI_MLO_CONTROL_FLAGS_SET_OVERWRITE_FORCE_ACTIVE(mlo_flags, value) \
45793     WMI_SET_BITS(control_flags, 0, 1, value)
45794 #define WMI_MLO_CONTROL_FLAGS_GET_OVERWRITE_FORCE_INACTIVE(mlo_flags) \
45795     WMI_GET_BITS(control_flags, 1, 1)
45796 #define WMI_MLO_CONTROL_FLAGS_SET_OVERWRITE_FORCE_INACTIVE(mlo_flags, value) \
45797     WMI_SET_BITS(control_flags, 1, 1, value)
45798 #define WMI_MLO_CONTROL_FLAGS_GET_DYNAMIC_FORCE_LINK_NUM(mlo_flags) \
45799     WMI_GET_BITS(control_flags, 2, 1)
45800 #define WMI_MLO_CONTROL_FLAGS_SET_DYNAMIC_FORCE_LINK_NUM(mlo_flags, value) \
45801     WMI_SET_BITS(control_flags, 2, 1, value)
45802 
45803 /*
45804  * This structure is used for passing wmi_mlo_control_flags.
45805  *
45806  *  - When force_mode is WMI_MLO_LINK_FORCE_ACTIVE or
45807  *    WMI_MLO_LINK_FORCE_INACTIVE host can pass below control flags,
45808  *    to indicate if FW need to clear earlier force bitmap config.
45809  *
45810  *  - When force mode is WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
45811  *    WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM, host can pass below control flags,
45812  *    to indicate if FW need to use force link number instead of force link
45813  *    bitmap.
45814  */
45815 typedef struct {
45816     union {
45817         struct {
45818             A_UINT32 overwrite_force_active_bitmap:1, /* indicate overwrite all earlier force_active bitmaps */
45819                      overwrite_force_inactive_bitmap:1, /* indicate overwrite all earlier force_inactive bitmaps */
45820                      dynamic_force_link_num:1, /* indicate fw to use force link number instead of force link bitmap */
45821                      unused: 29;
45822         };
45823         A_UINT32 control_flags;
45824     };
45825 } wmi_mlo_control_flags;
45826 
45827 typedef struct wmi_mlo_link_set_active_cmd
45828 {
45829     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_set_active_cmd_fixed_param; */
45830     A_UINT32 tlv_header;
45831     /** enum WMI_MLO_LINK_FORCE_MODE */
45832     A_UINT32 force_mode;
45833     /** reason of force link active / inactive, enum WMI_MLO_LINK_FORCE_REASON */
45834     A_UINT32 reason;
45835     /* indicate use vdev_id bitmap or link_id_bitmap */
45836     A_UINT32 use_ieee_link_id_bitmap;
45837 
45838     wmi_mac_addr ap_mld_mac_addr;
45839 
45840     wmi_mlo_control_flags ctrl_flags;
45841 /* The TLVs follows this structure:
45842  * wmi_mlo_set_active_link_number_param link_number_param[];
45843  *     Link number parameters, optional TLV.
45844  *     Present when force type is WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
45845  *     WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM.
45846  *     In other cases the length of array should be 0.
45847  *---
45848  * If use_ieee_link_id_bitmap equals 0 vdev_id_bitmap[] & vdev_id_bitmap2[]
45849  * are valid.
45850  * A_UINT32 vdev_id_bitmap[];
45851  *     Optional TLV, present when force type is WMI_MLO_LINK_FORCE_ACTIVE
45852  *     or WMI_MLO_LINK_FORCE_INACTIVE or WMI_MLO_LINK_NO_FORCE,
45853  *     to specific the vdevs to configure.
45854  *     For force mode WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE vdev_id_bitmap[]
45855  *     carry the active vdev bitmap.
45856  *     In other cases the length of the array should be 0.
45857  * A_UINT32 vdev_id_bitmap2[];
45858  *     For force mode WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE vdev_id_bitmap2[]
45859  *     carry the inactive vdev bitmap.
45860  *     In other cases the length of the array should be 0.
45861  *---
45862  * If use_ieee_link_id_bitmap equals 1 ieee_link_id_bitmap[] &
45863  * ieee_link_id_bitmap2[] are valid.
45864  * A_UINT32 ieee_link_id_bitmap[];
45865  *     present for  WMI_MLO_LINK_FORCE_ACTIVE
45866  *     or WMI_MLO_LINK_FORCE_INACTIVE or WMI_MLO_LINK_NO_FORCE
45867  *     or WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
45868  *     WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM
45869  * A_UINT32 ieee_link_id_bitmap2[];
45870  *     For force mode WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE ieee_link_id_bitmap2[]
45871  *     carry the inactive linkid bitmap.
45872  *     In other cases the length of the array should be 0.
45873  *---
45874  * wmi_disallowed_mlo_mode_bitmap_param_t disallow_mlo_mode_bmap[];
45875  */
45876 } wmi_mlo_link_set_active_cmd_fixed_param;
45877 
45878 typedef struct wmi_mlo_set_active_link_number_param
45879 {
45880     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_set_active_link_number_param */
45881     A_UINT32 tlv_header;
45882     /** number of link to be config */
45883     A_UINT32 num_of_link;
45884     /** VDEV type, see values for vdev_type (WMI_VDEV_TYPE_AP,WMI_VDEV_TYPE_STA,
45885      *  WMI_VDEV_TYPE_IBSS, WMI_VDEV_TYPE_MONITOR,WMI_VDEV_TYPE_NAN,WMI_VDEV_TYPE_NDI ...)
45886      */
45887     A_UINT32 vdev_type;
45888     /** VDEV subtype, see values for vdev_subtype (WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE,
45889      *  WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT, WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO ...)*/
45890     A_UINT32 vdev_subtype;
45891     /** home channel frequency in MHz of the vdev*/
45892     A_UINT32 home_freq;
45893 
45894 } wmi_mlo_set_active_link_number_param;
45895 
45896 #define WMI_MLO_MODE_MLMR  0x1
45897 #define WMI_MLO_MODE_EMLSR 0x2
45898 
45899 #define WMI_MLO_IEEE_LINK_ID_INVALID 0xFF
45900 
45901 #define WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID1(ieee_link_id_comb) WMI_GET_BITS(ieee_link_id_comb, 0, 8)
45902 #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)
45903 
45904 #define WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID2(ieee_link_id_comb) WMI_GET_BITS(ieee_link_id_comb, 8, 8)
45905 #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)
45906 
45907 #define WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID3(ieee_link_id_comb) WMI_GET_BITS(ieee_link_id_comb, 16, 8)
45908 #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)
45909 
45910 #define WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID4(ieee_link_id_comb) WMI_GET_BITS(ieee_link_id_comb, 24, 8)
45911 #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)
45912 
45913 
45914 typedef struct wmi_disallowed_mlo_mode_bitmap_param
45915 {
45916     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_disallowed_mlo_mode_bitmap_param */
45917     A_UINT32 tlv_header;
45918     /** disallowed_mode_bitmap:
45919      * Bitmap of MLO Modes like MLMR, eMLSR which are not allowed.
45920      * Refer to WMI_MLO_MODE_*
45921      * disallowed_mode_bitmap          Meaning
45922      * ======================          =================
45923      *   0x0                           No restriction
45924      *   0x1                           MLMR is not allowed
45925      *   0x2                           EMLSR is not allowed
45926      *   0x3                           MLMR and EMLSR are not allowed
45927      */
45928     A_UINT32 disallowed_mode_bitmap;
45929 
45930     /** ieee_link_id_comb:
45931      * Give combination of IEEE link IDs for which above disallowed_mode_bitmap
45932      * is applicable.
45933      * Each 8-bits in ieee_link_id_comb represents one link ID.
45934      * A link ID is an integer value between 0 and 14.
45935      * Please set WMI_MLO_IEEE_LINK_ID_INVALID (0xff) if 8-bits is not used.
45936      * Use WMI_MLO_IEEE_LINK_ID_COMB_GET_LINK_ID* and _SET_LINK_ID* to get/set
45937      * link IDs in this field.
45938      */
45939     A_UINT32 ieee_link_id_comb;
45940 
45941 
45942     /** Example:
45943      * Say there are 3 MLO links with ieee link IDs as 1,2 and 10.
45944      * Say host wants to disallow MLMR between links with IDs 1 and 2,
45945      *                   disallow eMLSR between links with IDs 1 and 10,
45946      *                   disallow MLMR and eMLSR for links with IDs 2 and 10.
45947      * There will be 3 TLVs of type wmi_disallowed_mlo_mode_bitmap_param
45948      * like below.
45949      *
45950      *  wmi_disallowed_mlo_mode_bitmap_param[0]:
45951      *       disallowed_mode_bitmap = 0x1,
45952      *       ieee_link_id_comb = 0xFFFF0201
45953      *          WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID1(ieee_link_id_comb, 0x01)
45954      *          WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID2(ieee_link_id_comb, 0x02)
45955      *
45956      *  wmi_disallowed_mlo_mode_bitmap_param[1]
45957      *       disallowed_mode_bitmap = 0x2,
45958      *       ieee_link_id_comb = 0xFFFF0A01
45959      *          WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID1(ieee_link_id_comb, 0x01)
45960      *          WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID2(ieee_link_id_comb, 0x0a)
45961      *
45962      *  wmi_disallowed_mlo_mode_bitmap_param[2]
45963      *       disallowed_mode_bitmap = 0x3,
45964      *       ieee_link_id_comb = 0xFFFF0A02
45965      *          WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID1(ieee_link_id_comb, 0x02)
45966      *          WMI_MLO_IEEE_LINK_ID_COMB_SET_LINK_ID2(ieee_link_id_comb, 0x0a)
45967      */
45968 } wmi_disallowed_mlo_mode_bitmap_param;
45969 
45970 typedef enum {
45971     WMI_MLO_LINK_SET_ACTIVE_STATUS_SUCCESS     = 0,
45972     WMI_MLO_LINK_SET_ACTIVE_STATUS_HOST_REJECT = 1,
45973 } WMI_MLO_LINK_SET_ACTIVE_STATUS;
45974 
45975 typedef struct wmi_mlo_link_set_active_resp_event
45976 {
45977     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_set_active_resp_event_fixed_param; */
45978     A_UINT32 tlv_header;
45979 
45980     /** Return status. 0 for success, non-zero otherwise */
45981     A_UINT32 status;
45982 
45983     /* indicate use vdev_id bitmap or link_id_bitmap */
45984     A_UINT32 use_ieee_link_id_bitmap;
45985 
45986     wmi_mac_addr ap_mld_mac_addr;
45987 
45988 /* The TLVs follows this structure:
45989  *---
45990  * If use_ieee_link_id_bitmap equals 0, vdev_bitmap[] are valid.
45991  *     A_UINT32 force_active_vdev_bitmap[]; <-- current force active vdev.
45992  *     A_UINT32 force_inactive_vdev_bitmap[]; <-- current force inactive vdevs
45993  *---
45994  * If use_ieee_link_id_bitmap equals 1, ieee_link_id_bitmap[] are valid.
45995  *     A_UINT32 force_active_ieee_link_id_bitmap[];
45996  *     A_UINT32 force_inactive_ieee_link_id_bitmap[];
45997  *---
45998  *  current active ieee link id bitmap & inactive ieee link id bitmap
45999  *     A_UINT32 current_active_ieee_link_id_bitmap[];
46000  *     A_UINT32 current_inactive_ieee_link_id_bitmap[];
46001  */
46002 } wmi_mlo_link_set_active_resp_event_fixed_param;
46003 
46004 typedef struct {
46005     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_setup_cmd_fixed_param; */
46006     A_UINT32 tlv_header;
46007     /** Unique ID representing the hw_links part of the MLD */
46008     A_UINT32 mld_group_id;
46009     /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
46010     A_UINT32 pdev_id;
46011 /*
46012  * Followed by TLVs:
46013  *     A_UINT32 hw_link_ids[];
46014  */
46015 } wmi_mlo_setup_cmd_fixed_param;
46016 
46017 typedef struct {
46018     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_setup_complete_event_fixed_param; */
46019     A_UINT32 tlv_header;
46020     /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
46021     A_UINT32 pdev_id;
46022     /** Return status. 0 for success, non-zero otherwise */
46023     A_UINT32 status;
46024     /** max_ml_peer_ids:
46025      * Max number of ml_peerids across the SOC, Derived as
46026      *     max_mlo_peer * num chips.
46027      * (Max_mlo_peer and num_chips are provided by Host Platform
46028      * in QMI exchange).
46029      */
46030     A_UINT32 max_ml_peer_ids;
46031 } wmi_mlo_setup_complete_event_fixed_param;
46032 
46033 typedef struct {
46034     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_ready_cmd_fixed_param; */
46035     A_UINT32 tlv_header;
46036     /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
46037     A_UINT32 pdev_id;
46038 } wmi_mlo_ready_cmd_fixed_param;
46039 
46040 typedef enum wmi_mlo_tear_down_reason_code_type {
46041     WMI_MLO_TEARDOWN_REASON_SSR,
46042         /* keep old name as alias for new name */
46043         WMI_MLO_TEARDOWN_SSR_REASON = WMI_MLO_TEARDOWN_REASON_SSR,
46044     WMI_MLO_TEARDOWN_REASON_HOST_INITIATED,
46045         /* keep old name as alias for new name */
46046         WMI_MLO_TEARDOWN_HOST_INITIATED_REASON =
46047             WMI_MLO_TEARDOWN_REASON_HOST_INITIATED,
46048     WMI_MLO_TEARDOWN_REASON_STANDBY_DOWN,
46049     WMI_MLO_TEARDOWN_REASON_DYNAMIC_WSI_REMAP,
46050 } WMI_MLO_TEARDOWN_REASON_TYPE;
46051 
46052 typedef struct {
46053     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_teardown_fixed_param; */
46054     A_UINT32 tlv_header;
46055     /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
46056     A_UINT32 pdev_id;
46057     /** reason_code: of type WMI_TEARDOWN_REASON_TYPE */
46058     A_UINT32 reason_code;
46059     /* trigger_umac_reset : of type A_BOOL to indicate the umac reset for the partner chip. */
46060     A_UINT32 trigger_umac_reset;
46061     /* erp_standby_mode : of type A_BOOL to indicate the chip is going to be active in ERP */
46062     A_UINT32 erp_standby_mode;
46063 } wmi_mlo_teardown_fixed_param;
46064 
46065 typedef struct {
46066     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_teardown_complete_fixed_param; */
46067     A_UINT32 tlv_header;
46068     /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
46069     A_UINT32 pdev_id;
46070     /** Return status. 0 for success, non-zero otherwise */
46071     A_UINT32 status;
46072 } wmi_mlo_teardown_complete_fixed_param;
46073 
46074 typedef struct {
46075     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_peer_recommended_links; */
46076     A_UINT32 tlv_header;
46077     /** AID (association id) of this station */
46078     A_UINT32 assoc_id;
46079     /** Request link id set to disable */
46080     A_UINT32 linkid_bitmap;
46081 } wmi_mlo_peer_recommended_links;
46082 
46083 typedef struct {
46084     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_recommendation_fixed_param */
46085     A_UINT32 tlv_header;
46086     /* unique id identifying the VDEV, generated by the caller */
46087     A_UINT32 vdev_id;
46088     /* DTIM specified in units of num beacon intervals */
46089     A_UINT32 dtim_period;
46090     /* The TLVs follows this structure:
46091      * wmi_mlo_peer_recommended_links recommended_links[];
46092      */
46093 } wmi_mlo_link_recommendation_fixed_param;
46094 
46095 #define WMI_TID_TO_LINK_MAP_TID_NUM_GET(_var)               WMI_GET_BITS(_var, 0, 5)
46096 #define WMI_TID_TO_LINK_MAP_TID_NUM_SET(_var, _val)         WMI_SET_BITS(_var, 0, 5, _val)
46097 
46098 #define WMI_TID_TO_LINK_MAP_DIR_GET(_var)                   WMI_GET_BITS(_var, 5, 2)
46099 #define WMI_TID_TO_LINK_MAP_DIR_SET(_var, _val)             WMI_SET_BITS(_var, 5, 2, _val)
46100 
46101 #define WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_GET(_var)       WMI_GET_BITS(_var, 7, 1)
46102 #define WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_SET(_var, _val) WMI_SET_BITS(_var, 7, 1, _val)
46103 
46104 #define WMI_TID_TO_LINK_MAP_LINK_MASK_GET(_var)             WMI_GET_BITS(_var, 8, 16)
46105 #define WMI_TID_TO_LINK_MAP_LINK_MASK_SET(_var, _val)       WMI_SET_BITS(_var, 8, 16, _val)
46106 
46107 enum {
46108     WMI_TID_TO_LINK_MAP_DIR_DL,
46109     WMI_TID_TO_LINK_MAP_DIR_UL,
46110     WMI_TID_TO_LINK_MAP_DIR_BIDI,
46111 };
46112 
46113 typedef struct {
46114     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tid_to_link_map */
46115     A_UINT32 tlv_header;
46116 
46117     /**
46118      * A_UINT32
46119      *     WMI_TID_TO_LINK_MAP_TID_NUM_GET / WMI_TID_TO_LINK_MAP_TID_NUM_SET
46120      *     tid_num:5,
46121      *
46122      *     WMI_TID_TO_LINK_MAP_DIR_GET / WMI_TID_TO_LINK_MAP_DIR_SET
46123      *     dir:2,                 // 0 - DL, 1 - UL, 2 - BiDi
46124      *
46125      *     WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_GET /
46126      *         WMI_TID_TO_LINK_MAP_DEFAULT_MAPPING_SET
46127      *     default_link_mapping:1, // If this is set to 1, ignore
46128      *                             // link_mapping_mask for the specific tid
46129      *
46130      *     WMI_TID_TO_LINK_MAP_LINK_MASK_GET / WMI_TID_TO_LINK_MAP_LINK_MASK_SET
46131      *     link_mapping_mask:16,
46132      *
46133      *     rsvd:8;
46134      */
46135     A_UINT32 tid_to_link_map_info;
46136 } wmi_tid_to_link_map;
46137 
46138 #define WMI_MAX_NUM_PREFERRED_LINKS 4
46139 
46140 /* NOTE:
46141  * wmi_peer_preferred_link_map will be deprecated and replaced
46142  * by wmi_mlo_peer_link_control_param.
46143  */
46144 typedef struct {
46145     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_preferred_link_map */
46146     A_UINT32 tlv_header;
46147 
46148     /* num_preferred_links:
46149      * If it is 0, all links are equally preferred and which link to be used
46150      *  in each schedule is decided by FW.
46151      */
46152     A_UINT32 num_preferred_links;
46153 
46154     /* [0] - highest preferred link, [1] - 2nd preferred link, etc. */
46155     A_UINT32 preferred_link_order[WMI_MAX_NUM_PREFERRED_LINKS];
46156 
46157     /* expected_max_latency_ms:
46158      * 0     - Expected Max Latency to be estimated in Firmware
46159      * Non 0 - Firmware should try to achieve given max latency
46160      *         in first preferred link.
46161      *         If unable to meet in first preferred link, start scheduling
46162      *         in next preferred link and so on.
46163      */
46164     A_UINT32 expected_max_latency_ms[WLAN_MAX_AC];
46165 } wmi_peer_preferred_link_map;
46166 
46167 #define WMI_MLO_PEER_LINK_CONTROL_PARAM_SET_TX_LINK_TUPLE_CONFIG(comp, value) \
46168     WMI_SET_BITS(comp, 0, 1, value)
46169 #define WMI_MLO_PEER_LINK_CONTROL_PARAM_GET_TX_LINK_TUPLE_CONFIG(comp) \
46170     WMI_GET_BITS(comp, 0, 1)
46171 
46172 #define WMI_MLO_PEER_LINK_CONTROL_PARAM_SET_PREFERRED_LINK_CONFIG(comp, value) \
46173     WMI_SET_BITS(comp, 1, 1, value)
46174 #define WMI_MLO_PEER_LINK_CONTROL_PARAM_GET_PREFERRED_LINK_CONFIG(comp) \
46175     WMI_GET_BITS(comp, 1, 1)
46176 
46177 #define WMI_MAX_NUM_MLO_LINKS 5
46178 
46179 typedef struct {
46180     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_preferred_link_map */
46181     A_UINT32 tlv_header;
46182 
46183     /** flags:
46184      * Bit0    : tx_link_tuple enable/disable.
46185      *           When enabled, f/w picks the links in tx_link_tuple_bitmap
46186      *           for TX scheduling.
46187      * Bit1    : preferred_link enable/disable.
46188      *           When enabled, f/w schedules the data on preferred link first.
46189      *           If it fails to deliver within a timeout, it additionally
46190      *           starts attempting TX on non-preferred links.
46191      * Bit2-31 : reserved
46192      */
46193      A_UINT32 flags;
46194 
46195     /* num_links: number of links present in link_priority_order array below.
46196      * 0        - we dont have sorted list of link priority
46197      * non zero - this should be the max number of links that the peer supports.
46198      */
46199     A_UINT32 num_links;
46200 
46201     /* link_priority_order:
46202      * [0] - ID of highest priority link,
46203      * [1] - ID of 2nd highest priority link, etc.
46204      */
46205     A_UINT32 link_priority_order[WMI_MAX_NUM_MLO_LINKS];
46206 
46207     /* tx_link_tuple_bitmap:
46208      * bitmap of indices within link_priority_order array that needs to be
46209      * selected in the TX link tuple.
46210      * FW will not attempt scheduling on a link if it is not part of the
46211      * tx_link_tuple.
46212      */
46213     A_UINT32 tx_link_tuple_bitmap;
46214 
46215     /* max_timeout_ms: applicable only when preferred_link is enabled
46216      * 0     - max_timeout_ms to be estimated in Firmware
46217      * Non 0 - value beyond which, firmware should additionally start
46218      *         scheduling on non preferred links
46219      */
46220     A_UINT32 max_timeout_ms[WLAN_MAX_AC];
46221 } wmi_mlo_peer_link_control_param;
46222 
46223 typedef struct {
46224     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_to_link_map_fixed_param */
46225     A_UINT32 tlv_header;
46226     /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
46227     A_UINT32 pdev_id;
46228 
46229     /** MLO Peer's current link MAC address */
46230     wmi_mac_addr link_macaddr;
46231 
46232     /** mapping_switch_time from the T2LM IE */
46233     A_UINT32 mapping_switch_time;
46234 
46235     /** expected_duration from the T2LM IE, in units of TUs */
46236     A_UINT32 expected_duration;
46237 
46238     /**
46239      * Following this structure is the TLV:
46240      *   - struct wmi_tid_to_link_map tid_to_link_map[];
46241      *   - struct wmi_peer_preferred_link_map peer_preferred_link_map[];
46242      *     Note - TLV array of peer_preferred_link_map has either 0 or 1
46243      *     entries, not multiple entries.
46244      *   - struct wmi_mlo_peer_link_control_param[];
46245      *     Note: can have 0 or 1 entry.
46246      */
46247 } wmi_peer_tid_to_link_map_fixed_param;
46248 
46249 typedef struct{
46250     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_ap_vdev_tid_to_link_map_cmd_fixed_param */
46251     A_UINT32 tlv_header;
46252     /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
46253     A_UINT32 pdev_id;
46254     /** vdev_id for identifying the MLO Vap */
46255     A_UINT32 vdev_id;
46256     /** DEPRECATED: disabled link bits */
46257     A_UINT32 disabled_link_bitmap; /* DEPRECATED */
46258     /**
46259      * Following this structure is the TLV:
46260      * struct wmi_mlo_ap_vdev_tid_to_link_map_ie_info[];
46261      */
46262 } wmi_mlo_ap_vdev_tid_to_link_map_cmd_fixed_param;
46263 
46264 typedef enum {
46265     /* Mapping Switch TSF */
46266     WMI_MAP_SWITCH_TIMER_TSF,
46267     /* Mapping Switch Timer Expired */
46268     WMI_MAP_SWITCH_TIMER_EXPIRED,
46269     /* Expected Duration Expired */
46270     WMI_EXPECTED_DUR_EXPIRED,
46271 } WMI_MLO_TID_TO_LINK_MAP_STATUS;
46272 
46273 #define WMI_BCAST_T2LM_MAX 16 /* max number of vdevs covered by T2LM stats */
46274 typedef struct {
46275     /* TLV tag and len; tag equals
46276      * WMITLV_TAG_STRUC_wmi_ctrl_path_t2lm_stats_struct
46277      */
46278     A_UINT32 tlv_header;
46279     /*
46280      * The below arrays store per-vdev counters, and are indexed by vdev ID.
46281      * The number of valid elements is min(WMI_BCAST_T2LM_MAX, num vdevs).
46282      */
46283     A_UINT32 bcast_t2lm_wmi_cmd[WMI_BCAST_T2LM_MAX];
46284     A_UINT32 bcast_t2lm_wmi_evt_map_swt_tme_tsf[WMI_BCAST_T2LM_MAX];
46285     A_UINT32 bcast_t2lm_wmi_evt_map_swt_tme_exp[WMI_BCAST_T2LM_MAX];
46286     A_UINT32 bcast_t2lm_wmi_evt_exp_dur_exp[WMI_BCAST_T2LM_MAX];
46287 } wmi_ctrl_path_t2lm_stats_struct;
46288 
46289 typedef struct{
46290     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_ap_vdev_tid_to_link_map_evt_fixed_param */
46291     A_UINT32 tlv_header;
46292     /* vdev_id of AP MLO vap */
46293     A_UINT32 vdev_id;
46294     /* containts mapping status of WMI_MLO_TID_TO_LINK_MAP_STATUS */
46295     A_UINT32 status_type;
46296     /* Mapping switch time of current TSF value */
46297     A_UINT32 mapping_switch_tsf;
46298 } wmi_mlo_ap_vdev_tid_to_link_map_evt_fixed_param;
46299 
46300 /* CTRL Field  bit-5-7 reserved */
46301 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DIR_GET(_var)                WMI_GET_BITS(_var, 0, 2)
46302 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DIR_SET(_var, _val)          WMI_SET_BITS(_var, 0, 2, _val)
46303 
46304 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DEF_LINK_GET(_var)           WMI_GET_BITS(_var, 2, 1)
46305 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DEF_LINK_SET(_var, _val)     WMI_SET_BITS(_var, 2, 1, _val)
46306 
46307 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_SWT_TIME_GET(_var)           WMI_GET_BITS(_var, 3, 1)
46308 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_SWT_TIME_SET(_var, _val)     WMI_SET_BITS(_var, 3, 1, _val)
46309 
46310 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DUR_TIME_GET(_var)           WMI_GET_BITS(_var, 4, 1)
46311 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DUR_TIME_SET(_var, _val)     WMI_SET_BITS(_var, 4, 1, _val)
46312 
46313 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_SIZE_GET(_var)       WMI_GET_BITS(_var, 5, 1)
46314 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_SIZE_SET(_var, _val) WMI_SET_BITS(_var, 5, 1, _val)
46315 
46316 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_PRE_GET(_var)       WMI_GET_BITS(_var, 8, 8)
46317 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_PRE_SET(_var, _val) WMI_SET_BITS(_var, 8, 8, _val)
46318 
46319 /* IEEE Link ID 15 bits on each link id 1 bit is reserved */
46320 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_0_GET(_var)          WMI_GET_BITS(_var, 0, 15)
46321 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_0_SET(_var, _val)    WMI_SET_BITS(_var, 0, 15, _val)
46322 
46323 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_1_GET(_var)          WMI_GET_BITS(_var, 16, 15)
46324 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_1_SET(_var, _val)    WMI_SET_BITS(_var, 16, 15, _val)
46325 
46326 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_2_GET(_var)          WMI_GET_BITS(_var, 0, 15)
46327 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_2_SET(_var, _val)    WMI_SET_BITS(_var, 0, 15, _val)
46328 
46329 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_3_GET(_var)          WMI_GET_BITS(_var, 16, 15)
46330 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_3_SET(_var, _val)    WMI_SET_BITS(_var, 16, 15, _val)
46331 
46332 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_4_GET(_var)          WMI_GET_BITS(_var, 0, 15)
46333 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_4_SET(_var, _val)    WMI_SET_BITS(_var, 0, 15, _val)
46334 
46335 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_5_GET(_var)          WMI_GET_BITS(_var, 16, 15)
46336 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_5_SET(_var, _val)    WMI_SET_BITS(_var, 16, 15, _val)
46337 
46338 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_6_GET(_var)          WMI_GET_BITS(_var, 0, 15)
46339 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_6_SET(_var, _val)    WMI_SET_BITS(_var, 0, 15, _val)
46340 
46341 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_7_GET(_var)          WMI_GET_BITS(_var, 16, 15)
46342 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_7_SET(_var, _val)    WMI_SET_BITS(_var, 16, 15, _val)
46343 
46344 /* HW Link ID each hw link with 16-bit */
46345 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_0_GET(_var)            WMI_GET_BITS(_var, 0, 16)
46346 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_0_SET(_var, _val)      WMI_SET_BITS(_var, 0, 16, _val)
46347 
46348 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_1_GET(_var)            WMI_GET_BITS(_var, 16, 16)
46349 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_1_SET(_var, _val)      WMI_SET_BITS(_var, 16, 16, _val)
46350 
46351 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_2_GET(_var)            WMI_GET_BITS(_var, 0, 16)
46352 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_2_SET(_var, _val)      WMI_SET_BITS(_var, 0, 16, _val)
46353 
46354 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_3_GET(_var)            WMI_GET_BITS(_var, 16, 16)
46355 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_3_SET(_var, _val)      WMI_SET_BITS(_var, 16, 16, _val)
46356 
46357 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_4_GET(_var)            WMI_GET_BITS(_var, 0, 16)
46358 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_4_SET(_var, _val)      WMI_SET_BITS(_var, 0, 16, _val)
46359 
46360 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_5_GET(_var)            WMI_GET_BITS(_var, 16, 16)
46361 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_5_SET(_var, _val)      WMI_SET_BITS(_var, 16, 16, _val)
46362 
46363 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_6_GET(_var)            WMI_GET_BITS(_var, 0, 16)
46364 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_6_SET(_var, _val)      WMI_SET_BITS(_var, 0, 16, _val)
46365 
46366 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_7_GET(_var)            WMI_GET_BITS(_var, 16, 16)
46367 #define WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_7_SET(_var, _val)      WMI_SET_BITS(_var, 16, 16, _val)
46368 
46369 typedef struct {
46370     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tid_to_link_map */
46371     A_UINT32 tlv_header;
46372     /*
46373      * A_UINT32
46374      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DIR_GET /
46375      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DIR_SET
46376      *      direction: 2       // 0 - DL, 1 - UL, 2 - BiDi
46377      *
46378      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DEF_LINK_GET /
46379      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DEF_LINK_SET
46380      *      default_link_mapping:1 // 1 - Default Link Mapping Present
46381      *                             // 0 - Default Link Mapping not present
46382      *
46383      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_SWT_TIME_GET /
46384      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_SWT_TIME_SET
46385      *      mapping_switch_time_present:1 // 1 - Mapping Switch Time
46386      *                                    //     Field Present
46387      *                                    // 0 - Mapping Switch Time
46388      *                                    //     Field not Present
46389      *
46390      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DUR_TIME_GET /
46391      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_DUR_TIME_SET
46392      *      expected_duration_present:1  // 1 - Expected Duration Field Present
46393      *                                   // 0 - Expected Duration Field
46394      *                                   //     not Present
46395      *
46396      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_SIZE_GET
46397      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_SIZE_SET
46398      *      link_mapping_size:1          // 1 - Link Mapping Size  1 Octets
46399      *                                   // 0 - Link Mapping Size  2 Octets
46400      *
46401      *      reserved:2
46402      *
46403      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_PRE_GET /
46404      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_CTRL_LINK_MAP_PRE_SET
46405      *      link_mapping_presence_indicator:8 // Link mapping presence indicator
46406      *
46407      *      reserved2:16 // upper 16 bits are unused
46408      */
46409     A_UINT32 tid_to_link_map_ctrl;
46410 
46411     /*
46412      * Mapping Switch time represents TSF time for the New TID_TO_LINK Mapping
46413      * will be established
46414      * 16 bit of TSF time ( from bits 10 to 25)
46415      *
46416      * Default to Non-Default: One TID_TO_LINK Mapping IE
46417      * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
46418      * Mapping switch time present for New Non-Default Mapping
46419      *
46420      * Non-Default to Non-Default: Two TID_TO_LINK Mapping IE
46421      * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
46422      * Mapping switch time not present for 1st TID_TO_LINK Mapping
46423      * (Current Non-Default Mapping) value would be zero
46424      * Mapping switch time present for 2nd TID_TO_LINK Mapping
46425      * (New Non-Default Mapping)
46426      *
46427      * Non_Default to Default: One TID_TO_LINK Mapping IE
46428      * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
46429      * Mapping switch time not present value would be zero
46430      */
46431     A_UINT32 map_switch_time;
46432     /*
46433      * Expected duration would be either duration/remaining duration of Mapping
46434      *
46435      * Default to Non-Default: One TID_TO_LINK Mapping IE
46436      * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
46437      * Expected duration represents duration of New Non-Default Mapping
46438      * will be effective
46439      *
46440      * Non-Default to Non-Default: Two TID_TO_LINK Mapping IE
46441      * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
46442      * Expected duration represents remaing duration of 1st TID_TO_LINK
46443      * Mapping (Current Non-Default Mapping)
46444      * Expected duration represents duration of the 2nd TID_TO_LINK
46445      * Mapping (New Non-Default Mapping ) will be effective
46446      *
46447      * Non_Default to Default: One TID_TO_LINK Mapping IE
46448      * (wmi_mlo_ap_vdev_tid_to_link_map_ie_info)
46449      * Expected duration represents remaing duration of Current Non-Default
46450      * Mapping
46451      */
46452     A_UINT32 expected_duration;
46453 
46454     /*
46455      * for default_link_mapping ieee_tid_0_1_link_map value would be zero
46456      * which means IE should not include this param
46457      * A_UINT32
46458      *
46459      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_0_GET /
46460      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_0_SET
46461      *      tid_0_link_id:15 // TID_0 Link IDs (0 to 14)
46462      *                       // Non-Zero value represents links mapped
46463      *                       // to this TID.
46464      *                       // Zero value represents links are not mapped
46465      *                       // to this TID.
46466      *
46467      *      reserved:1
46468      *
46469      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_1_GET /
46470      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_1_SET
46471      *      tid_1_link_id:15 // TID_1 Link IDs (0 to 14)
46472      *                       // Non-Zero value represents links mapped
46473      *                       // to this TID.
46474      *                       // Zero value represents links are not mapped
46475      *                       // to this TID.
46476      *
46477      *      reserved:1
46478      */
46479     A_UINT32 ieee_tid_0_1_link_map;
46480     /*
46481      *  for default_link_mapping ieee_tid_2_3_link_map value would be zero
46482      *  which means IE should not include this param
46483      * A_UINT32
46484      *
46485      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_2_GET /
46486      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_2_SET
46487      *      tid_2_link_id:15 // TID_2 Link IDs (0 to 14)
46488      *                       // Non-Zero value represents links mapped
46489      *                       // to this TID.
46490      *                       // Zero value represents links are not mapped
46491      *                       // to this TID.
46492      *
46493      *      reserved:1
46494      *
46495      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_3_GET /
46496      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_3_SET
46497      *      tid_3_link_id:15 // TID_3 Link IDs (0 to 14)
46498      *                       // Non-Zero value represents links mapped
46499      *                       // to this TID.
46500      *                       // Zero value represents links are not mapped
46501      *                       // to this TID.
46502      *
46503      *      reserved:1
46504      */
46505     A_UINT32 ieee_tid_2_3_link_map;
46506     /*
46507      * for default_link_mapping ieee_tid_4_5_link_map value would be zero
46508      * which means IE should not include this param
46509      * A_UINT32
46510      *
46511      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_4_GET /
46512      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_4_SET
46513      *      tid_4_link_id:15 // TID_4 Link IDs (0 to 14)
46514      *                       // Non-Zero value represents links mapped
46515      *                       // to this TID.
46516      *                       // Zero value represents links are not mapped
46517      *                       // to this TID.
46518      *
46519      *      reserved:1
46520      *
46521      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_5_GET /
46522      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_5_SET
46523      *      tid_5_link_id:15 // TID_5 Link IDs (0 to 14)
46524      *                       // Non-Zero value represents links mapped
46525      *                       // to this TID.
46526      *                       // Zero value represents links are not mapped
46527      *                       // to this TID.
46528      *
46529      *      reserved:1
46530      */
46531     A_UINT32 ieee_tid_4_5_link_map;
46532     /*
46533      * for default_link_mapping ieee_tid_6_7_link_map value would be zero
46534      * which means IE should not include this param
46535      * A_UINT32
46536      *
46537      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_6_GET /
46538      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_6_SET
46539      *      tid_6_link_id:15 // TID_6 Link IDs (0 to 14)
46540      *                       // Non-Zero value represents links mapped
46541      *                       // to this TID.
46542      *                       // Zero value represents links are not mapped
46543      *                       // to this TID.
46544      *
46545      *      reserved:1
46546      *
46547      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_7_GET /
46548      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_IEEE_LINK_ID_7_SET
46549      *      tid_7_link_id:15 // TID_7 Link IDs (0 to 14)
46550      *                       // Non-Zero value represents links mapped
46551      *                       // to this TID.
46552      *                       // Zero value represents links are not mapped
46553      *                       // to this TID.
46554      *
46555      *      reserved:1
46556      */
46557     A_UINT32 ieee_tid_6_7_link_map;
46558 
46559     /*
46560      * hw_link_map will be used by the FW to pause or unpause the TIDs
46561      * in all the associated MLD STAs in the corresponsing MLD VAP
46562      * A_UINT32
46563      *
46564      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_0_GET /
46565      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_0_SET
46566      *      hw_tid_0_link_map:16
46567      *
46568      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_1_GET /
46569      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_1_SET
46570      *      hw_tid_1_link_map:16
46571      */
46572     A_UINT32 hw_tid_0_1_link_map;
46573     /*
46574      * hw_link_map will be used by the FW to pause or unpause the TIDs
46575      * in all the associated MLD STAs in the corresponsing MLD VAP
46576      * A_UINT32
46577      *
46578      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_2_GET /
46579      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_2_SET
46580      *      hw_tid_2_link_map:16
46581      *
46582      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_3_GET /
46583      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_3_SET
46584      *      hw_tid_3_link_map:16
46585      */
46586     A_UINT32 hw_tid_2_3_link_map;
46587     /*
46588      * hw_link_map will be used by the FW to pause or unpause the TIDs
46589      * in all the associated MLD STAs in the corresponsing MLD VAP
46590      * A_UINT32
46591      *
46592      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_4_GET /
46593      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_4_SET
46594      *      hw_tid_4_link_map:16
46595      *
46596      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_5_GET /
46597      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_5_SET
46598      *      hw_tid_5_link_map:16
46599      */
46600     A_UINT32 hw_tid_4_5_link_map;
46601     /*
46602      * hw_link_map will be used by the FW to pause or unpause the TIDs
46603      * in all the associated MLD STAs in the corresponsing MLD VAP
46604      * A_UINT32
46605      *
46606      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_6_GET /
46607      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_6_SET
46608      *      hw_tid_6_link_map:16
46609      *
46610      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_7_GET /
46611      *      WMI_MLO_VDEV_TID_TO_LINK_MAP_HW_LINK_ID_7_SET
46612      *      hw_tid_7_link_map:16
46613      */
46614     A_UINT32 hw_tid_6_7_link_map;
46615 
46616     /* Indicates the disabled link map for 802.11be T2LM */
46617     A_UINT32 disabled_link_bitmap;
46618 } wmi_mlo_ap_vdev_tid_to_link_map_ie_info;
46619 
46620 #define WMI_NUM_TID_PER_AC 2
46621 typedef struct {
46622     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_evt_fixed_param */
46623     A_UINT32 tlv_header;
46624     wmi_mac_addr mld_mac;
46625     /* hwlink_priority:
46626      * Based on capacity, hw chip is ordered here.
46627      * hwlink_priority[0] holds the HW chip ID which is the top priority,
46628      * hwlink_priority[1] holds the HW chip ID which is the 2nd priority,
46629      * etc.
46630      */
46631     A_UINT32 hwlink_priority[WMI_MAX_NUM_MLO_LINKS];
46632     /* link_bmap:
46633      * Bitmap segments for the primary TIDs (0/1/4/6)
46634      * are provided in link_bmap[0].
46635      * Bitmap segments for the secondary TIDs (3/2/5/7)
46636      * are provided in link_bmap[1].
46637      * link_bmap[0]:
46638      *     bits  4:0  are used to indicate which links are used for TID 0
46639      *     bits  9:5  are used to indicate which links are used for TID 1
46640      *     bits 14:10 are used to indicate which links are used for TID 4
46641      *     bits 19:15 are used to indicate which links are used for TID 6
46642      *     bits 31:20 are unused
46643      * link_bmap[0]:
46644      *     bits  4:0  are used to indicate which links are used for TID 3
46645      *     bits  9:5  are used to indicate which links are used for TID 2
46646      *     bits 14:10 are used to indicate which links are used for TID 5
46647      *     bits 19:15 are used to indicate which links are used for TID 7
46648      *     bits 31:20 are unused
46649      */
46650     A_UINT32 link_bmap[WMI_NUM_TID_PER_AC];
46651 } wmi_mlo_tlt_selection_for_tid_spray_event_fixed_param;
46652 
46653 #define WMI_IGMP_OFFLOAD_SUPPORT_DISABLE_BITMASK    0x0
46654 #define WMI_IGMP_V1_OFFLOAD_SUPPORT_BITMASK         0x1
46655 #define WMI_IGMP_V2_OFFLOAD_SUPPORT_BITMASK         0x2
46656 #define WMI_IGMP_V3_OFFLOAD_SUPPORT_BITMASK         0x4
46657 #define WMI_IGMP_OFFLOAD_SUPPORT_ALL_VERSION        0x7
46658 
46659 typedef struct {
46660     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_igmp_offload_fixed_param */
46661     A_UINT32 vdev_id;                   /** VDEV identifier */
46662     A_UINT32 enable;                    /** IGMP offload support enable/disable */
46663     A_UINT32 version_support_bitmask;   /** IGMP version support v1, v2 and/or v3*/
46664 
46665 /* Following this structure are the TLVs:
46666  *     WMI_IPV4_ADDR  grp_ip_address[num_mcast_ipv4_addr];
46667  */
46668 } wmi_igmp_offload_fixed_param;
46669 
46670 /* flags for ICMP Offload IP4,IP6 */
46671 #define WMI_ICMP_OFFLOAD_IPV4_ENABLED_BIT 0
46672 #define WMI_ICMP_OFFLOAD_IPV6_ENABLED_BIT 1
46673 
46674 /* set IPv4 enabled/disabled flag and get the flag */
46675 #define WMI_SET_ICMP_OFFLOAD_IPV4_ENABLED_BIT(valid_bitmask)  \
46676     WMI_SET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV4_ENABLED_BIT, 1, 1)
46677 
46678 #define WMI_SET_ICMP_OFFLOAD_IPV4_DISABLED_BIT(valid_bitmask) \
46679     WMI_SET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV4_ENABLED_BIT, 1, 0)
46680 
46681 #define WMI_GET_ICMP_OFFLOAD_IPV4_ENABLED(valid_bitmask) \
46682     WMI_GET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV4_ENABLED_BIT, 1)
46683 
46684 /* set IPv6 enabled flag, disabled and get the flag */
46685 #define WMI_SET_ICMP_OFFLOAD_IPV6_ENABLED_BIT(valid_bitmask) \
46686     WMI_SET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV6_ENABLED_BIT, 1, 1)
46687 
46688 #define WMI_SET_ICMP_OFFLOAD_IPV6_DISABLED_BIT(valid_bitmask) \
46689     WMI_SET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV6_ENABLED_BIT, 1, 0)
46690 
46691 #define WMI_GET_ICMP_OFFLOAD_IPV6_ENABLED(valid_bitmask) \
46692     WMI_GET_BITS(valid_bitmask, WMI_ICMP_OFFLOAD_IPV6_ENABLED_BIT, 1)
46693 
46694 typedef struct {
46695     /** TLV tag and len; tag equals
46696      * WMITLV_TAG_STRUC_wmi_vdev_icmp_offload_cmd_fixed_param
46697      */
46698     A_UINT32      tlv_header;
46699     A_UINT32      vdev_id;
46700     A_UINT32      enable;
46701     /* bitmask for valid ipv4/ipv6 address */
46702     A_UINT32      valid_bitmask;
46703     WMI_IPV4_ADDR ipv4_addr;
46704 /* Following this structure are the TLVs:
46705  *      WMI_IPV6_ADDR ipv6_addr[num_ipv6_addr];
46706  */
46707 } wmi_icmp_offload_fixed_param;
46708 
46709 typedef struct {
46710     /** TLV tag and len; tag equals
46711     * WMITLV_TAG_STRUC_wmi_vdev_smart_monitor_event_fixed_param */
46712     A_UINT32 tlv_header;
46713     /* VDEV identifier */
46714     A_UINT32 vdev_id;
46715     /** Average RSSI value of Data Frames */
46716     A_INT32 avg_rssi_data_dbm;
46717     /** rx_vht_sgi:
46718      * Short guard interval state of Data frames obtaining from rx PPDU TLV
46719      * of VHTSIGA buf.
46720      *     0: Default (No sgi set)
46721      *     1: sgi set
46722      */
46723     A_UINT32 rx_vht_sgi;
46724 } wmi_vdev_smart_monitor_event_fixed_param;
46725 
46726 typedef struct {
46727     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_set_param_cmd_fixed_param */
46728     A_UINT32 pdev_id;
46729     /** parameter id   */
46730     A_UINT32 param_id;
46731     /** parameter value */
46732     A_UINT32 param_value;
46733     /* The TLVs follows this structure:
46734      * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
46735      */
46736 } wmi_pdev_multiple_vdev_set_param_cmd_fixed_param;
46737 
46738 typedef struct {
46739     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_param_info */
46740     /** ID of the parameter being set */
46741     A_UINT32 param_id;
46742     /** value of the parameter being set */
46743     A_UINT32 param_value;
46744 } wmi_set_param_info;
46745 
46746 typedef struct {
46747     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_multiple_pdev_vdev_param_cmd_fixed_param */
46748     /** Command is for vdev or pdev: 0 = pdev, 1 = vdev */
46749     A_UINT32 is_vdev;
46750     /** unique dev_id identifying the VDEV/PDEV */
46751     A_UINT32 dev_id;
46752     /*
46753      * Following this structure is the TLV:
46754      *     wmi_set_param_info param_info[];
46755      */
46756 } wmi_set_multiple_pdev_vdev_param_cmd_fixed_param;
46757 
46758 typedef enum {
46759     WMI_MU_SNIF_DISABLE,
46760     WMI_MU_SNIF_USER_INPUT,
46761     WMI_MU_SNIF_WILDCARD,
46762 } WMI_MU_SNIF_MODE;
46763 
46764 typedef struct {
46765     /** TLV tag and len; tag equals
46766       * WMITLV_TAG_STRUC_wmi_vdev_set_mu_snif_cmd_param */
46767     A_UINT32 tlv_header;
46768     /* VDEV identifier */
46769     A_UINT32 vdev_id;
46770     /* MU sniffer mode - refer to WMI_MU_SNIF_MODE enum */
46771     A_UINT32 mode;
46772     /* max num of user to decode */
46773     A_UINT32 max_num_user;
46774 /**
46775  * TLV (tag length value) parameters follow setting MU sniffer command
46776  * structure. The TLV's are:
46777  * A_UINT32 aids[];
46778  */
46779 } wmi_vdev_set_mu_snif_cmd_param;
46780 
46781 typedef struct {
46782     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dbs_or_sbs_cap_ext*/
46783     A_UINT32 tlv_header;
46784     /* hw_mode_id: refer to WMI_HW_MODE_CAPABILITIES */
46785     A_UINT32 hw_mode_id;
46786     /*
46787      * If sbs_lower_band_end_freq is set to non-zero, it indicates
46788      * async SBS mode is supported, and lower-band/higher band to MAC
46789      * mapping is switch-able. unit: MHz. examples 5180, 5320
46790      * If sbs_mid_band_end_freq is set to non-zero, it indicates
46791      * async flexible SBS mode is supported, lower/higher band cutoff frequency
46792      * can be selected from sbs_lower_band_end_freq or sbs_mid_band_end_freq.
46793      * unit: MHz, examples 5900.
46794      */
46795     A_UINT32 sbs_lower_band_end_freq;
46796     A_UINT32 sbs_mid_band_end_freq;
46797 } wmi_dbs_or_sbs_cap_ext;
46798 
46799 typedef struct {
46800     A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_cust_bdf_version_capabilities*/
46801     /* Cust bdf Major version in bdf */
46802     A_UINT32 cust_bdf_ver_major;
46803     /* Cust bdf Minor version in bdf */
46804     A_UINT32 cust_bdf_ver_minor;
46805 } wmi_cust_bdf_version_capabilities;
46806 
46807 enum WMI_CODEL_ENABLE_VALUES {
46808     WMI_CODEL_DISABLED,
46809     WMI_CODEL_ENABLED,
46810     /* WMI_CODEL_DEBUG:
46811      * partly enabled – track interval and check target, but don’t drop
46812      */
46813     WMI_CODEL_DEBUG,
46814 };
46815 
46816 typedef enum {
46817     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MIN_THRUPUT    = 0,
46818     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MAX_THRUPUT    = 0xffffffff,
46819     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_BURST_SIZE     = 0,
46820     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_SVC_INTERVAL   = 0xffffffff,
46821     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_DELAY_BOUND    = 0xffffffff,
46822     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_TIME_TO_LIVE   = 0xffffffff,
46823     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_PRIORITY       = 0,
46824     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_TID            = 0xffffffff,
46825     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MSDU_LOSS_RATE = 0,
46826     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_DISABLED_SCHED_MODE = 0,
46827     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_ENABLED  = WMI_CODEL_DISABLED,
46828     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_LATENCY_TARGET_MS = 0xffffffff,
46829     WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_INTERVAL_MS       = 0xffffffff,
46830 } WMI_SAWF_SVC_CLASS_PARAM_DEFAULTS;
46831 
46832 #define WMI_CODEL_INTERVAL_MAX_MS       0x0000ffff
46833 #define WMI_CODEL_LATENCY_TARGET_MAX_MS 0x00003fff
46834 
46835 typedef struct {
46836     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sawf_svc_class_cfg_cmd_fixed_param */
46837     A_UINT32 svc_class_id; /* which service class is being configured */
46838     /*-----
46839      * The below fields specify the values for the parameters of the
46840      * service class being configured.
46841      * Each such service class parameter has a default value specified in the
46842      * above WMI_SAWF_SVC_CLASS_PARAM_DEFAULTS enum.
46843      * This default value shall be specified for service classes where
46844      * the parameter in question is not applicable.
46845      * For example, for service classes that have no minimum throughput
46846      * requirement, the min_thruput_kbps field should be set to
46847      * WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MIN_THRUPUT, i.e. 0.
46848      *-----*/
46849     /* min_thruput_kbps:
46850      * How much throughput should be "guaranteed" for each MSDU queue
46851      * belonging to this service class.
46852      * Units are kilobits per second.
46853      */
46854     A_UINT32 min_thruput_kbps;
46855     /* max_thruput_kbps:
46856      * What upper limit on throughput shall be applied to MSDU queues belonging
46857      * to this service class, if other peer-TIDs are not meeting their QoS
46858      * service goals.
46859      * Units are kilobits per second.
46860      */
46861     A_UINT32 max_thruput_kbps;
46862     /* burst_size_bytes:
46863      * How much data (i.e. how many MSDUs) should be pulled from a
46864      * MSDU queue belonging to this service class to be formed into MPDUs
46865      * and enqueued for transmission.
46866      * Similarly, how long should a tx op be for MPDUs containing MSDUs from
46867      * this service class, to ensure that the necessary amount of data gets
46868      * delivered to the peer.
46869      * Units are bytes.
46870      */
46871     A_UINT32 burst_size_bytes;
46872     /* svc_interval_ms:
46873      * How frequently MSDUs belonging to this service class should be
46874      * formed into MPDUs and enqueued for transmission.
46875      * The svc_interval_ms parameter is expected to be <= the delay_bound_ms
46876      * parameter.
46877      * Units are milliseconds.
46878      */
46879     A_UINT32 svc_interval_ms;
46880     /* delay_bound_ms:
46881      * How promptly the MSDUs belonging to this service class need to be
46882      * delivered to the recipient peer.
46883      * Units are milliseconds.
46884      */
46885     A_UINT32 delay_bound_ms;
46886     /* time_to_live_ms:
46887      * How long MSDUs belonging to this service class remain valid.
46888      * If the MSDU has not been successfully transmitted before this
46889      * time-to-live time has elapsed, the MSDU should be discarded.
46890      * The time_to_live_ms parameter is expected to be >= the delay_bound_ms
46891      * parameter.
46892      * Units are milliseconds.
46893      */
46894     A_UINT32 time_to_live_ms;
46895     /* priority:
46896      * What degree of precedence shall the WLAN FW's tx scheduler use
46897      * when considering whether to transmit MPDUs generated from MSDUs
46898      * belonging to this service class.
46899      */
46900     A_UINT32 priority;
46901     /* tid:
46902      * Which WLAN TID shall be used for delivering traffic of this
46903      * service class.
46904      */
46905     A_UINT32 tid;
46906     /* msdu_loss_rate_ppm:
46907      * This parameter indicates the acceptable rate of MSDU loss.
46908      * Units are parts per million.
46909      * E.g. if it is acceptable for 1 MSDU of every 10000 to be lost,
46910      * the msdu_loss_rate_ppm value would be 100,
46911      * since 100 / 1000000 = 1 / 10000.
46912      */
46913     A_UINT32 msdu_loss_rate_ppm;
46914     /*
46915      * The disabled DL and UL scheduler modes bitmap.
46916      *
46917      * Each bit in the "disabled_sched_modes" bitmap indicates whether a
46918      * specific scheduler mode may be selected by the fast loop scheduler. A
46919      * "1" bit indicates that mode is disabled, and a "0" bit indicates the
46920      * mode is enabled.
46921      *
46922      * The WMI_SCHED_MODE_FLAGS enum defines the bit positions for each mode.
46923      */
46924     A_UINT32 disabled_sched_modes;
46925 
46926     A_UINT32 codel_enabled; /* contains a WMI_CODEL_ENABLE_VALUES enum value */
46927     /* codel_latency_target_ms:
46928      * The codel_latency_target_ms field specifies the latency target for
46929      * MSDU queues belonging to this service class.
46930      * The latency of each such MSDU queue will periodically be checked
46931      * (with the periodicity controlled by the code_interval_ms parameter).
46932      * If the MSDU queue's latency is above this target latency, a MSDU will
46933      * be dropped from the head of the queue, to attempt to get the flow's
46934      * producer to scale down its rate of MSDU production.
46935      * This value should be roughly 10% to 30% of the codel_interval_ms value.
46936      * This value must be <= WMI_CODEL_LATENCY_TARGET_MAX_MS (or must equal
46937      * WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_LATENCY_TARGET_MS).
46938      */
46939     A_UINT32 codel_latency_target_ms;
46940     /* codel_interval_ms:
46941      * The codel_interval_ms field specifies the baseline interval between
46942      * successive checks that a given MSDU queue's latency is under the
46943      * CoDel target latency.
46944      * If in a given interval a MSDU queue has a latency exceeding the target,
46945      * the duration of the subsequent interval for that MSDU queue will be
46946      * reduced.  The interval will get reset to the baseline interval when
46947      * the MSDU queue's latency is again under the CoDel target latency.
46948      * This value must be <= WMI_CODEL_INTERVAL_MAX_MS (or must equal
46949      * WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_INTERVAL_MS).
46950      */
46951     A_UINT32 codel_interval_ms;
46952 } wmi_sawf_svc_class_cfg_cmd_fixed_param;
46953 
46954 typedef struct {
46955     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sawf_svc_class_disable_cmd_fixed_param */
46956     A_UINT32 svc_class_id; /* which service class is being disabled */
46957 } wmi_sawf_svc_class_disable_cmd_fixed_param;
46958 
46959 typedef struct {
46960     A_UINT32 tlv_header;  /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sw_cal_ver_cap */
46961     A_UINT32 bdf_cal_ver; /* SW cal version in BDF */
46962     A_UINT32 ftm_cal_ver; /* SW cal version in factory data */
46963     A_UINT32 status;      /* Return status. 0 for success, non-zero otherwise */
46964 } wmi_sw_cal_ver_cap;
46965 
46966 typedef struct {
46967     /** TLV tag and len; tag equals
46968       * WMITLV_TAG_STRUC_wmi_soc_tqm_reset_enable_disable_cmd_fixed_param
46969       */
46970     A_UINT32 tlv_header;
46971     /** 0 - disable TQM-reset feature, 1 - enable TQM-reset feature */
46972     A_UINT32 enable;
46973 } wmi_soc_tqm_reset_enable_disable_cmd_fixed_param;
46974 
46975 typedef struct {
46976     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_multiple_peer_group_cmd_fixed_param */
46977     A_UINT32 vdev_id;
46978     A_UINT32 pdev_id;
46979     /** Sub command id - populated with a WMI_CMD_ID value.
46980      * Currently supported command ids are WMI_PEER_REMOVE_WDS_ENTRY_CMDID.
46981      */
46982     A_UINT32  sub_cmd_id;
46983     /* The TLVs follows this structure:
46984      * wmi_mac_addr wds_macaddr[]; <--- Array of wds mac addresses.
46985      */
46986 } wmi_vdev_multiple_peer_group_cmd_fixed_param;
46987 
46988 /* WMI_VDEV_PN_MGMT_RX_FILTER_CMDID */
46989 typedef struct {
46990     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_pn_mgmt_rx_filter_cmd_fixed_param */
46991     A_UINT32 vdev_id;
46992     /* RX Filter - MGMT/Action frame type is specified in each bit as per 802.11 spec
46993      * PN check will be done for all MGMT frames irrespective of RX Filter.
46994      * Rx filter is only used to decide whether PN failed frames should be forwarded to host
46995      * Example for forwarding beacon and de-auth pkt alone to host then bit 8(Beacon) and 12(De-auth) must be set */
46996     A_UINT32 pn_rx_filter;
46997 } wmi_vdev_pn_mgmt_rx_filter_cmd_fixed_param; /* Filter for Neighbor Rx Packets */
46998 
46999 typedef struct {
47000     A_UINT32 tlv_header;
47001     /* egid_info:
47002      * Identify which ESL group is active and the duty cycle configured
47003      * for each group.
47004      * This is a 128-bit bitmap to represent 16 ESL sets, with each set
47005      * having 8 members.
47006      * For a given set, the 1-values within the 8-bit bitmap identify
47007      * which groups are active.  The number of active groups within each
47008      * set of 8 indirectly determines the WLAN/BT duty cycle:
47009      *     number of 1-bits    |
47010      *     within 8-bit bitmap | WLAN / BT duty cycle
47011      *     --------------------+----------------
47012      *            0            | 100 ms  WLAN
47013      *            1            | 87.5 ms WLAN, 12.5 ms BT
47014      *            2            | 75 ms   WLAN, 25 ms   BT
47015      *            3            | 62.5 ms WLAN, 37.5 ms BT
47016      *            4            | 50 ms   WLAN, 50 ms   BT
47017      *            5            | 37.5 ms WLAN, 62.5 ms BT
47018      *            6            | 25 ms   WLAN, 75 ms   BT
47019      *            7            | 12.5 ms WLAN, 87.5 ms BT
47020      *            8            |               100 ms  BT
47021      * The lowest bits in the bitmap represent the highest ESL groups,
47022      * E.g. bitmap bit 0 corresponds to ESL group 127, bit 1 corresponds
47023      * to ESL group 126, bit 7 corresponds to ESL group 120, bit 8
47024      * corresponds to ESL group 119, etc.
47025      *
47026      * So for example, if the lowest 8 bits of egid_info are 0x07, this
47027      * indicates that groups 125-127 are active and 120-124 are inactive,
47028      * and that the duty cycle is 62.5 ms WLAN + 37.5 ms BT.
47029      */
47030     A_UINT32 egid_info[4];
47031 } wmi_esl_egid_cmd_fixed_param;
47032 
47033 #define WMI_RTT_PASN_PEER_CREATE_SECURITY_MODE_GET(flag)          WMI_GET_BITS(flag, 0, 2)
47034 #define WMI_RTT_PASN_PEER_CREATE_SECURITY_MODE_SET(flag,val)      WMI_SET_BITS(flag, 0, 2, val)
47035 #define WMI_RTT_PASN_PEER_CREATE_FORCE_SELF_MAC_USE_GET(flag)     WMI_GET_BITS(flag, 2, 1)
47036 #define WMI_RTT_PASN_PEER_CREATE_FORCE_SELF_MAC_USE_SET(flag,val) WMI_SET_BITS(flag, 2, 1, val)
47037 
47038 typedef struct {
47039     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_peer_create_req_event_fixed_param */
47040     /** unique id identifying the VDEV, generated by the caller */
47041     A_UINT32 vdev_id;
47042 /**
47043  * The following TLV will follow this fixed_param TLV:
47044  *
47045  * wmi_rtt_pasn_peer_create_req_param rtt_pasn_peer_param[]
47046  */
47047 } wmi_rtt_pasn_peer_create_req_event_fixed_param;
47048 
47049 typedef struct {
47050     A_UINT32     tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_peer_create_req_param */
47051 
47052     wmi_mac_addr self_mac_addr; /* self MAC address (can be vdev address or random mac address) */
47053     wmi_mac_addr dest_mac_addr; /* MAC address of the peer */
47054 
47055     A_UINT32     control_flag; /* some control information here */
47056     /*********************************************************************************
47057      * Bits 1:0:   Security mode, check wmi_rtt_security_mode for detail.
47058      *             Host driver to request supplicant to derive and install PASN keys if security mode is set.
47059      * Bit 2:      Force_self_mac_addr_use, To indicate supplicant/hostapd to use this self mac addr to (re)generate PASN keys,
47060      *             and flush old cache( if it exists) for dest_mac_addr with old self_mac_addr.
47061      * Bits 31:3:  Reserved
47062      */
47063 } wmi_rtt_pasn_peer_create_req_param;
47064 
47065 
47066 typedef struct {
47067     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_auth_status_cmd_fixed_param */
47068 /**
47069  * The following TLV will follow this fixed_param TLV:
47070  *
47071  * wmi_rtt_pasn_auth_status_param pasn_auth_status_param[]
47072  */
47073 } wmi_rtt_pasn_auth_status_cmd_fixed_param;
47074 
47075 typedef struct {
47076     A_UINT32     tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_auth_status_param */
47077     /* MAC address of the peer */
47078     wmi_mac_addr peer_mac_addr;
47079     /* Return status. 0 for success, non-zero otherwise */
47080     A_UINT32     status;
47081     /* Source address used for doing PASN authentication */
47082     wmi_mac_addr source_mac_addr;
47083 } wmi_rtt_pasn_auth_status_param;
47084 
47085 
47086 #define WMI_RTT_PASN_PEER_DELETE_DELETED_BIT_GET(flag)     WMI_GET_BITS(flag, 0, 1)
47087 #define WMI_RTT_PASN_PEER_DELETE_DELETED_BIT_SET(flag,val) WMI_SET_BITS(flag, 0, 1, val)
47088 #define WMI_RTT_PASN_PEER_DELETE_FLUSH_KEYS_GET(flag)      WMI_GET_BITS(flag, 1, 1)
47089 #define WMI_RTT_PASN_PEER_DELETE_FLUSH_KEYS_SET(flag,val)  WMI_SET_BITS(flag, 1, 1, val)
47090 
47091 typedef struct {
47092     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_peer_delete_event_fixed_param */
47093     /** unique id identifying the VDEV, generated by the caller */
47094     A_UINT32 vdev_id;
47095 /**
47096  * The following TLV will follow this fixed_param TLV:
47097  *
47098  * wmi_rtt_pasn_peer_delete_param rtt_pasn_peer_param[]
47099  */
47100 } wmi_rtt_pasn_peer_delete_event_fixed_param;
47101 
47102 typedef struct {
47103     A_UINT32     tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_peer_delete_param */
47104     /* MAC address of the peer */
47105     wmi_mac_addr peer_mac_addr;
47106     /* some control information here */
47107     A_UINT32     control_flag;
47108 /**********************************************************************************
47109  * Bit 0:    peer_deleted (This is set to 1 if peer has already been deleted by the target)
47110  * Bit 1:    flush keys (This is set to 1 if target wants the cached PASN keys to be flushed)
47111  * Bits 31:2: reserved
47112  */
47113 } wmi_rtt_pasn_peer_delete_param;
47114 
47115 typedef struct {
47116     A_UINT32     tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rtt_pasn_deauth_cmd_fixed_param */
47117     /* MAC address of the peer */
47118     wmi_mac_addr peer_mac_addr;
47119 } wmi_rtt_pasn_deauth_cmd_fixed_param;
47120 
47121 typedef struct {
47122     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_scratch_reg_info */
47123     /** what the register is used for - see WFSS_PMM_SCRATCH_REG_PURPOSE enum */
47124     A_UINT32 pmm_scratch_reg_purpose;
47125     /** Address of scratch register */
47126     A_UINT32 pmm_scratch_reg_address;
47127 } wmi_pmm_scratch_reg_info;
47128 
47129 typedef struct {
47130     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_scratch_reg_allocation_cmd_fixed_param */
47131     /** pdev_id for identifying the MAC */
47132     A_UINT32 pdev_id;
47133     /*
47134      * Following this structure is the TLV:
47135      *     wmi_pmm_scratch_reg_info scratch_reg_info[];
47136      */
47137 } wmi_pmm_scratch_reg_allocation_cmd_fixed_param;
47138 
47139 typedef struct {
47140     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_available_scratch_reg_info */
47141     /** Scratch register address */
47142     A_UINT32 pmm_scratch_reg_address;
47143 } wmi_pmm_available_scratch_reg_info;
47144 
47145 typedef struct {
47146     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_available_scratch_reg_event_fixed_param */
47147     /** pdev_id for identifying the MAC */
47148     A_UINT32 pdev_id;
47149     /*
47150      * Following this structure is the TLV:
47151      *     wmi_pmm_available_scratch_reg_info pmm_available_scratch_reg_info[];
47152      */
47153 } wmi_pmm_available_scratch_reg_event_fixed_param;
47154 
47155 typedef struct {
47156     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pmm_scratch_reg_allocation_complete_event_fixed_param */
47157     /** pdev_id for identifying the MAC */
47158     A_UINT32 pdev_id;
47159     /** 1 - success, 0 - failed */
47160     A_UINT32 is_allocated;
47161 } wmi_pmm_scratch_reg_allocation_complete_event_fixed_param;
47162 
47163 typedef enum {
47164     WMI_NO_FLUSH,
47165     WMI_TWT_FLUSH,
47166 
47167     /* Add new flush policies above */
47168     WMI_MAX_FLUSH_POLICY
47169 } wmi_peer_flush_policy;
47170 
47171 typedef struct {
47172     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_policy_cmd_fixed_param */
47173     A_UINT32 vdev_id;
47174     /** peer MAC address */
47175     wmi_mac_addr peer_macaddr;
47176     /** The tids to flush */
47177     A_UINT32 peer_tid_bitmap;
47178     /* wmi_peer_flush_policy */
47179     A_UINT32 flush_policy;
47180     /* n_TWT_SPs_to_expire:
47181      * Expire / drop packets whose age is greater than this specified number
47182      * of TWT service periods.
47183      */
47184     A_UINT32 n_TWT_SPs_to_expire;
47185 } wmi_peer_flush_policy_cmd_fixed_param;
47186 
47187 /* health monitor infra Def */
47188 typedef struct {
47189     /** TLV tag and len */
47190     A_UINT32 tlv_header;
47191     A_UINT32 ring_buf_paddr_low;
47192     A_UINT32 ring_buf_paddr_high;
47193     A_UINT32 initial_upload_period_ms;
47194 } wmi_health_mon_init_done_fixed_param;
47195 
47196 /** ODD **/
47197 
47198 /* Livedump Data structures */
47199 #define WMI_ODD_LIVEDUMP_RESP_SET_STATUS(status, val) \
47200     WMI_SET_BITS(status, 0, 4, val)
47201 #define WMI_ODD_LIVEDUMP_RESP_GET_STATUS(status) \
47202     WMI_GET_BITS(status, 0, 4)
47203 
47204 typedef enum {
47205     ODD_LIVEDUMP_STATUS_SUCCESS = 0,
47206     ODD_LIVEDUMP_STATUS_FAILURE,
47207     ODD_MAX_LIVEDUMP_STATUS,
47208 } odd_livedump_resp_status;
47209 
47210 typedef struct {
47211     A_UINT32 tlv_header;
47212     A_UINT32 odd_livedump_request_id;
47213     /* Following this structure is the TLV:
47214      *    A_UINT32 odd_livedump_id_list[]; <-- array livedump_id list
47215      */
47216 } wmi_livedump_request_cmd_fixed_param;
47217 
47218 typedef struct {
47219     A_UINT32 tlv_header;
47220     /* odd_livedump_request_id:
47221      * this echoes the request id that was sent in the wmi_livedump_cmd_param
47222      */
47223     A_UINT32 odd_livedump_request_id;
47224     /*
47225      * 4 LSB's to indicate status of the odd_livedump_request_id processed
47226      * by the FW, the other 28bits to kept for future enhancements.
47227      * The status will be defined in the enum odd_livedump_resp_status
47228      * 0 - SUCCESS
47229      * 1 - FAILURE
47230      * Refer to the WMI_ODD_LIVEDUMP_RESP_SET,_GET_STATUS macros.
47231      */
47232     A_UINT32 status;
47233 } wmi_livedump_response_event_fixed_param;
47234 
47235 #define WMI_MLO_LINK_REMOVAL_GET_VDEVID(tbtt_info)               WMI_GET_BITS(tbtt_info, 0, 8)
47236 #define WMI_MLO_LINK_REMOVAL_SET_VDEVID(tbtt_info, value)        WMI_SET_BITS(tbtt_info, 0, 8, value)
47237 #define WMI_MLO_LINK_REMOVAL_GET_LINKID(tbtt_info)               WMI_GET_BITS(tbtt_info, 8, 8)
47238 #define WMI_MLO_LINK_REMOVAL_SET_LINKID(tbtt_info, value)        WMI_SET_BITS(tbtt_info, 8, 8, value)
47239 #define WMI_MLO_LINK_REMOVAL_GET_TBTT_COUNT(tbtt_info)           WMI_GET_BITS(tbtt_info, 16, 16)
47240 #define WMI_MLO_LINK_REMOVAL_SET_TBTT_COUNT(tbtt_info, value)    WMI_SET_BITS(tbtt_info, 16, 16, value)
47241 
47242 typedef struct {
47243     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_tbtt_count; */
47244     A_UINT32 tlv_header;
47245     union {
47246         struct {
47247             A_UINT32 vdev_id:8,
47248                      link_id:8,
47249                      tbtt_count:16;
47250         };
47251         A_UINT32 tbtt_info;
47252     };
47253 } wmi_mlo_link_removal_tbtt_count;
47254 
47255 typedef struct {
47256     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_tbtt_update; */
47257     A_UINT32 tlv_header;
47258 
47259     A_UINT32 tbtt_count;
47260 
47261     A_UINT32 qtimer_ts_low; /* lower-32 bits */
47262     A_UINT32 qtimer_ts_high; /* higher-32 bits */
47263 
47264     A_UINT32 tsf_low; /* lower-32 bits */
47265     A_UINT32 tsf_high; /* higher-32 bits */
47266 } wmi_mlo_link_removal_tbtt_update;
47267 
47268 typedef struct {
47269    /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_evt_fixed_param; */
47270     A_UINT32 tlv_header;
47271     A_UINT32 vdev_id;
47272 
47273     /*
47274      * Followed by TLVs:
47275      *     wmi_mlo_link_removal_tbtt_update
47276      */
47277 } wmi_mlo_link_removal_evt_fixed_param;
47278 
47279 typedef struct {
47280     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_removal_cmd_fixed_param */
47281     A_UINT32 tlv_header;
47282     A_UINT32 vdev_id;
47283     A_UINT32 reconfig_ml_ie_num_bytes_valid;
47284 
47285    /* This TLV is followed by array of bytes:
47286     *   A_UINT8 reconfig_ml_ie[]; <-- Entire reconfiguration element (multi-link control + common-info + 1 per-sta profile)
47287     */
47288 } wmi_mlo_link_removal_cmd_fixed_param;
47289 
47290 typedef struct {
47291     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_per_peer_sched_mode_disable */
47292 
47293     /* Peer MAC Address */
47294     wmi_mac_addr peer_macaddr;
47295 
47296     /*
47297      * The disabled DL and UL scheduler modes bitmap.
47298      *
47299      * This command is not supported in STA mode.
47300      *
47301      * A value of 1 in a given bit position disables the corresponding mode,
47302      * and a value of 0 enables the mode. The WMI_SCHED_MODE_FLAGS enum defines
47303      * the bit positions for each mode.
47304      *
47305      * A single 32 bit value is used to store the following configuration
47306      * bitmap.
47307      *
47308      * bit   | sched mode
47309      * ---------------
47310      *   0   | DL MU-MIMO
47311      *   1   | UL MU-MIMO
47312      *   2   | DL OFDMA
47313      *   3   | UL OFDMA
47314      * 4..31 | RESERVED
47315      */
47316     A_UINT32 disabled_sched_modes;
47317 } wmi_per_peer_sched_mode_disable;
47318 
47319 typedef struct {
47320     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sched_mode_disable_fixed_param */
47321     A_UINT32 pdev_id;
47322     /* The TLVs for each peer follows:
47323      *     wmi_per_peer_sched_mode_disable per_peer_sched_mode_disable[];
47324      */
47325 } wmi_peer_sched_mode_disable_fixed_param;
47326 
47327 typedef enum {
47328     /*
47329      * No timestamp source is used, and the start_timestamp field  should be
47330      * ignored. FW will start the probing of the requested mode ASAP after
47331      * receiving this message.
47332      */
47333     WMI_SCHED_MODE_PROBE_TSTAMP_SRC_NONE = 0,
47334 } WMI_SCHED_MODE_PROBE_TSTAMP_SRC;
47335 
47336 typedef struct {
47337     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_sched_mode_probe_req_fixed_param */
47338 
47339     A_UINT32 vdev_id;
47340 
47341     /*
47342      * The scheduler mode to probe. Only a single mode may currently be
47343      * specified in this WMI command (separate commands must be sent to probe
47344      * multiple modes). This limitation may be removed in a future version of
47345      * FW.
47346      *
47347      * This command is not supported in STA mode.
47348      *
47349      * The WMI_SCHED_MODE_FLAGS enum defines the scheduler mode values.
47350      */
47351     A_UINT32 sched_mode_to_probe;
47352 
47353     /*
47354      * 32-bit cookie that will be sent back in the probing completion / stats
47355      * WMI message. FW does not interpret any bits in this field, and simply
47356      * replays it back to the host.
47357      */
47358     A_UINT32 cookie;
47359 
47360     /*
47361      * The clock reference to use for the start_timestamp field. The enum
47362      * WMI_SCHED_MODE_PROBE_TSTAMP_SRC defines the valid timestamp sources.
47363      */
47364     A_UINT32 timestamp_source;
47365 
47366     /*
47367      * The start timestamp indicating when the FW scheduler should start the
47368      * probing period. Note that although the FW tries to honor this start
47369      * time, it may not always be possible to. For instance, if the command
47370      * arrives after the indicated start timestamp, or if channel congestion
47371      * delays the APs ability to transmit over the air.
47372      *
47373      * If the timestamp_source field is set to
47374      * WMI_SCHED_MODE_PROBE_TSTAMP_SRC_NONE, then the value of this field is
47375      * ignored by FW.
47376      */
47377     A_UINT32 start_timestamp_lo;
47378     A_UINT32 start_timestamp_hi;
47379 
47380     /*
47381      * The on and off duration of the probing mode.
47382      *
47383      * The scheduler will turn the mode on first for the specified
47384      * "on_duration_ms", and then turn it off for the specified
47385      * "off_duration_ms".
47386      *
47387      * During the on and off duration, FW will collect delivered bytes
47388      * statistics to estimate the vdev level throughput achieved for both the
47389      * on and off region. These statistics will be delivered in the
47390      * wmi_vdev_sched_mode_probe_resp WMI message after both the "on" and "off"
47391      * durations have elapsed.
47392      */
47393     A_UINT32 on_duration_ms;
47394     A_UINT32 off_duration_ms;
47395 } wmi_vdev_sched_mode_probe_req_fixed_param;
47396 
47397 typedef struct {
47398     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_sched_mode_probe_resp_fixed_param */
47399 
47400     A_UINT32 vdev_id;
47401 
47402     /*
47403      * The 32-bit cookie copied from the wmi_vdev_sched_mode_probe_req
47404      * message.
47405      */
47406     A_UINT32 cookie;
47407 
47408     /*
47409      * The observed throughput at the vdev level during the mode-enabled
47410      * portion of the mode probe.
47411      */
47412     A_UINT32 tput_mbps_on;
47413 
47414     /*
47415      * The observed throughput at the vdev level during the mode-disabled
47416      * portion of the mode probe.
47417      */
47418     A_UINT32 tput_mbps_off;
47419 } wmi_vdev_sched_mode_probe_resp_fixed_param;
47420 
47421 /** Coordinated-AP TDMA **/
47422 
47423 #define WMI_TDMA_MAX_ACTIVE_SCHEDULES  10
47424 
47425 typedef struct {
47426     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdma_schedule_request_cmd_fixed_param **/
47427     /** pdev_id
47428      * PDEV ID for identifying the MAC for which this schedule
47429      * is being requested.
47430      */
47431     A_UINT32 pdev_id;
47432     /** schedule_type
47433      * 0 = Reserved
47434      * 1 = Restricted
47435      * UINT32_MAX = Cancel all TDMA schedules and ignore other parameters below.
47436      */
47437     A_UINT32 schedule_type;
47438     /** schedule_handle_id
47439      * Unique ID to identify this TDMA schedule
47440      */
47441     A_UINT32 schedule_handle_id;
47442     /** owner_bssid
47443      * The BSSID this TDMA schedule is reserved for
47444      */
47445     wmi_mac_addr owner_bssid;
47446     /** start_time_tsf_low
47447      * Lower 32-bits of Synchronized Start time for the first busy slot
47448      * in this TDMA schedule.
47449      * It should be a PMM global FW TSF reference
47450      */
47451     A_UINT32 start_time_tsf_low;
47452     /** start_time_tsf_high
47453      * Higher 32-bits of Synchronized Start time for the first busy slot
47454      * in this TDMA schedule.
47455      * It should be a PMM global FW TSF reference
47456      */
47457     A_UINT32 start_time_tsf_high;
47458     /** num_busy_slots
47459      * Number of busy periods in this schedule
47460      */
47461     A_UINT32 num_busy_slots;
47462     /** busy_slot_dur_ms
47463      * The fixed duration of each busy slot in milliseconds
47464      */
47465     A_UINT32 busy_slot_dur_ms;
47466     /** busy_slot_intvl_ms
47467      * The fixed interval between the start of two consecutive busy slots
47468      * in milliseconds.
47469      */
47470     A_UINT32 busy_slot_intvl_ms;
47471     /** edca_params_valid
47472      * Indicates whether the following EDCA fields aifsn, ecwmin, ecwmax
47473      * are valid or not
47474      * 1 = Valid. 0 = Not Valid.
47475      */
47476     A_UINT32 edca_params_valid;
47477     /** aifsn
47478      * Arbitration inter frame spacing number for this schedule type.
47479      * Range: 2-15.
47480      * For voice, video, best-effort, background ACs
47481      */
47482     A_UINT32 aifsn[WMI_AC_MAX];
47483     /** ecwmin
47484      * Exponent form of Contention Window minimum value for this schedule type.
47485      * Range: 2 - 1024.
47486      * For voice, video, best-effort, background ACs
47487      */
47488     A_UINT32 ecwmin[WMI_AC_MAX];
47489     /** ecwmax
47490      * Exponent form of Contention Window maximum value for this schedule type.
47491      * Range: 2 - 1024.
47492      * For voice, video, best-effort, background ACs
47493      */
47494     A_UINT32 ecwmax[WMI_AC_MAX];
47495 } wmi_tdma_schedule_request_cmd_fixed_param;
47496 
47497 typedef struct {
47498     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table _fixed_param */
47499     A_UINT32 pdev_id;
47500     /* freq_band:
47501      * Indicates the intended FreqBand for updating targetPowerR2PTable.
47502      *     0: 5G
47503      *     1: 2G
47504      *     2: 6G
47505      */
47506     A_UINT32 freq_band;
47507     /* sub_band:
47508      * Denotes band defined in targetPowerR2PFreqRangexG BDF fields.
47509      * Valid values for each target is listed below
47510      * For 11AX targets,
47511      * 2G - 0
47512      * 5G/6G - 0/1/2
47513      *
47514      * For 11BE targets,
47515      * 2G - 0
47516      * 5G/6G - 0/1
47517      */
47518     A_UINT32 sub_band;
47519     /* is_ext:
47520      * Applicable only for 11BE targets
47521      * 0 - Default targetPowerR2PTable
47522      * 1 - To update targetPowerR2PTable in extension fields
47523      * For 11AX targets, value is expected to be 0.
47524      */
47525     A_UINT32 is_ext;
47526     A_UINT32 target_type; /* 0 - IPQ95xx, 1 - QCN90xx, 0x10 - QCN92xx */
47527     A_UINT32 r2p_array_len; /* length of targetPowerR2PTable */
47528     /* end_of_r2ptable_update:
47529      * This field can be used to indicate FW to trigger update of SW structures
47530      * once user has updated for all the sub-bands of the Frequency band.
47531      * This would be used when there are multiple sub-bands.
47532      */
47533     A_UINT32 end_of_r2ptable_update;
47534 /*
47535  * Following this structure is the TLV containing targetPowerR2PTablexG
47536  * of type INT8 and with a unit of 0.25dBm.
47537  */
47538 } wmi_pdev_set_tgtr2p_table_cmd_fixed_param;
47539 
47540 typedef enum {
47541     WMI_PDEV_TGTR2P_SUCCESS = 0,
47542     WMI_PDEV_TGTR2P_SUCCESS_WAITING_FOR_END_OF_UPDATE,
47543     WMI_PDEV_TGTR2P_ERROR_INVALID_FREQ_BAND,
47544     WMI_PDEV_TGTR2P_ERROR_INVALID_SUB_BAND,
47545     WMI_PDEV_TGTR2P_ERROR_EXTENSION_FIELDS_NOT_ENABLED_IN_BDF,
47546     WMI_PDEV_TGTR2P_ERROR_INVALID_TARGET_TPYE,
47547     WMI_PDEV_TGTR2P_ERROR_R2P_ARRAY_LEN_MISMATCH,
47548 } wmi_pdev_set_tgtr2p_event_status_type;
47549 
47550 typedef struct {
47551     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table_event_fixed_param */
47552 
47553     /* status:
47554      * enum wmi_pdev_set_tgtr2p_event_status_type to indicate the status
47555      * code/result
47556      */
47557     A_UINT32 status;
47558     A_UINT32 pdev_id; /* to identify for which pdev the response is received */
47559 } wmi_pdev_set_tgtr2p_table_event_fixed_param;
47560 
47561 
47562 #define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM         4
47563 
47564 #define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_2G_RATE_NUM       18
47565 
47566 #define WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_5G_6G_RATE_NUM    24
47567 
47568 typedef struct {
47569     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_custom_tx_power_per_mcs_cmd_fixed_param */
47570     A_UINT32 pdev_id;
47571 
47572     /* Every band's bitmap is per chain per mcs, the bit set indicate the txpower value existed
47573      * in txpower_array, otherwise, it means no setting from up-layer and need treat the setting
47574      * txpower as zero
47575      */
47576 
47577     /* currently 2GHz band has 2 chains (though space is allocated for up
47578      * to 4 chains) and each chain has 18 rates.
47579      * bitmap_of_2GHz_band[0] -> chain 0 bitmap:
47580      * |bit  0|bit  1|......|bit  17|
47581      * |rate 0|rate 1|......|rate 17|
47582      *
47583      * bitmap_of_2GHz_band[1] -> chain 1 bitmap:
47584      * |bit  0|bit  1|......|bit  17|
47585      * |rate 0|rate 1|......|rate 17|
47586      *
47587      * bitmap_of_2GHz_band[2] -> reserved
47588      * bitmap_of_2GHz_band[3] -> reserved
47589      */
47590     A_UINT32 bitmap_of_2GHz_band[WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM];
47591 
47592     /* 5GHz band has 4 chains and each chain has 24 rates.
47593      * bitmap_of_5GHz_band[0] -> chain 0 bitmap:
47594      * |bit  0|bit  1|......|bit  23|
47595      * |rate 0|rate 1|......|rate 23|
47596      *
47597      * bitmap_of_5GHz_band[1] -> chain 1 bitmap:
47598      * |bit  0|bit  1|......|bit  23|
47599      * |rate 0|rate 1|......|rate 23|
47600      *
47601      * bitmap_of_5GHz_band[2] -> chain 2 bitmap:
47602      * |bit  0|bit  1|......|bit  23|
47603      * |rate 0|rate 1|......|rate 23|
47604      *
47605      * bitmap_of_5GHz_band[3] -> chain 3 bitmap:
47606      * |bit  0|bit  1|......|bit  23|
47607      * |rate 0|rate 1|......|rate 23|
47608      */
47609     A_UINT32 bitmap_of_5GHz_band[WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM];
47610 
47611     /* 6GHz band has 4 chains and each chain has 24 rates.
47612      * bitmap_of_6GHz_band[0] -> chain 0 bitmap:
47613      * |bit  0|bit  1|......|bit  23|
47614      * |rate 0|rate 1|......|rate 23|
47615      *
47616      * bitmap_of_6GHz_band[1] -> chain 1 bitmap:
47617      * |bit  0|bit  1|......|bit  23|
47618      * |rate 0|rate 1|......|rate 23|
47619      *
47620      * bitmap_of_6GHz_band[2] -> chain 2 bitmap:
47621      * |bit  0|bit  1|......|bit  23|
47622      * |rate 0|rate 1|......|rate 23|
47623      *
47624      * bitmap_of_6GHz_band[3] -> chain 3 bitmap:
47625      * |bit  0|bit  1|......|bit  23|
47626      * |rate 0|rate 1|......|rate 23|
47627      */
47628     A_UINT32 bitmap_of_6GHz_band[WMI_PDEV_SET_CUSTOM_TX_PWR_MAX_CHAIN_NUM];
47629 
47630     A_UINT32 txpower_array_len;
47631 
47632 /* This TLV is followed by array of bytes:
47633  * A_UINT8 txpower_bkoff_array[]:
47634  *     The txpower backoff value for each bit set within the per-band bitmaps
47635  *     above, in dB units.
47636  *     The elements from the 2GHz band occur first, then the elements from the
47637  *     5GHz band, then the elements from the 6GHz band.
47638  *     Within each band, the elements from the lower chain numbers (i.e. the
47639  *     lower words within the bitmap array) occur first.
47640  *     Within each chain of each band, the element from the lower rate indices
47641  *     (i.e. the least significant bits within the bitmap word) occur first.
47642  */
47643 } wmi_pdev_set_custom_tx_power_per_mcs_cmd_fixed_param;
47644 
47645 
47646 typedef struct {
47647     A_UINT32 tlv_header;      /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_vdev_get_link_info_cmd_fixed_param */
47648     A_UINT32 vdev_id;
47649     wmi_mac_addr mld_macaddr; /* MLD MAC address */
47650 } wmi_mlo_vdev_get_link_info_cmd_fixed_param;
47651 
47652 typedef enum {
47653     WMI_LINK_INFO_EVENT_SUCCESS = 0,
47654 
47655     /* reject due to common failure reason */
47656     WMI_LINK_INFO_EVENT_REJECT_FAILURE,
47657 
47658     /* reject as vdev is not up */
47659     WMI_LINK_INFO_EVENT_REJECT_VDEV_NOT_UP,
47660 
47661     /* reject as roaming is in progress */
47662     WMI_LINK_INFO_EVENT_REJECT_ROAMING_IN_PROGRESS,
47663 
47664     /* reject as it's not MLO connection */
47665     WMI_LINK_INFO_EVENT_REJECT_NON_MLO_CONNECTION,
47666 } wmi_mlo_vdev_link_info_event_status_type;
47667 
47668 typedef struct {
47669     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_vdev_link_info_event_fixed_param */
47670 
47671     /* status:
47672      * enum wmi_mlo_vdev_link_info_event_status_type to indicate the status
47673      */
47674     A_UINT32 status;
47675 
47676     /* vdev_id:
47677      * unique id identifying the VDEV, generated by the caller
47678      */
47679     A_UINT32 vdev_id;
47680 
47681     wmi_mac_addr mld_macaddr; /* MLD MAC address */
47682 
47683     /* hw_mode_index:
47684      * current hardware mode index, see soc_hw_mode_t for values
47685      */
47686     A_UINT32 hw_mode_index;
47687 } wmi_mlo_vdev_link_info_event_fixed_param;
47688 
47689 #define WMI_MLO_VDEV_LINK_INFO_GET_VDEVID(link_info)             WMI_GET_BITS(link_info, 0, 8)
47690 #define WMI_MLO_VDEV_LINK_INFO_SET_VDEVID(link_info, value)      WMI_SET_BITS(link_info, 0, 8, value)
47691 #define WMI_MLO_VDEV_LINK_INFO_GET_LINKID(link_info)             WMI_GET_BITS(link_info, 8, 8)
47692 #define WMI_MLO_VDEV_LINK_INFO_SET_LINKID(link_info, value)      WMI_SET_BITS(link_info, 8, 8, value)
47693 #define WMI_MLO_VDEV_LINK_INFO_GET_LINK_STATUS(link_info)        WMI_GET_BITS(link_info, 16, 2)
47694 #define WMI_MLO_VDEV_LINK_INFO_SET_LINK_STATUS(link_info, value) WMI_SET_BITS(link_info, 16, 2, value)
47695 
47696 typedef struct {
47697     A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_vdev_link_info */
47698     union {
47699         struct {
47700             A_UINT32 vdev_id:8,     /* vdev id for this link */
47701                      link_id:8,     /* link id defined as in 802.11 BE spec. */
47702                      link_status:2, /* link_status - 0: inactive, 1: active  */
47703                      reserved:14;
47704         };
47705         A_UINT32 link_info;
47706     };
47707     A_UINT32 chan_freq;             /* Channel frequency in MHz */
47708 } wmi_mlo_vdev_link_info;
47709 
47710 /* Manual UL OFDMA trigger frame data structures */
47711 
47712 typedef enum {
47713     WMI_UL_OFDMA_MANUAL_TRIG_TXERR_NONE,
47714     WMI_UL_OFDMA_MANUAL_TRIG_TXERR_RESP,    /* response timeout, mismatch,
47715                                              * BW mismatch, mimo ctrl mismatch,
47716                                              * CRC error.. */
47717     WMI_UL_OFDMA_MANUAL_TRIG_TXERR_FILT,    /* blocked by tx filtering */
47718     WMI_UL_OFDMA_MANUAL_TRIG_TXERR_FIFO,    /* fifo, misc errors in HW */
47719     WMI_UL_OFDMA_MANUAL_TRIG_TXERR_SWABORT, /* software initiated abort
47720                                              * (TX_ABORT) */
47721 
47722     WMI_UL_OFDMA_MANUAL_TRIG_TXERR_MAX     = 0xff,
47723     WMI_UL_OFDMA_MANUAL_TRIG_TXERR_INVALID =
47724         WMI_UL_OFDMA_MANUAL_TRIG_TXERR_MAX
47725 } wmi_ul_ofdma_manual_trig_txerr_t;
47726 
47727 typedef struct {
47728     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_manual_ul_ofdma_trig_feedback_evt_fixed_param  */
47729     A_UINT32 tlv_header;
47730 
47731     /* VDEV identifier */
47732     A_UINT32 vdev_id;
47733 
47734     /* To indicate whether feedback event is for SU (0) or MU trigger (1) */
47735     A_UINT32 feedback_trig_type;
47736 
47737     /* Feedback Params */
47738     A_UINT32 curr_su_manual_trig_count;
47739     A_UINT32 remaining_su_manual_trig;
47740     A_UINT32 remaining_mu_trig_peers;
47741     A_UINT32 manual_trig_status;  /* holds a wmi_ul_ofdma_manual_trig_txerr_t */
47742 
47743     /**
47744      * This TLV is followed by TLVs below:
47745      *    wmi_mac_addr peer_macaddr[];
47746      *        Array length corresponds to the number of triggered peers
47747      */
47748 } wmi_manual_ul_ofdma_trig_feedback_evt_fixed_param;
47749 
47750 typedef struct {
47751     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_manual_mu_trig_cmd_fixed_param  */
47752     A_UINT32 tlv_header;
47753 
47754     /* VDEV identifier */
47755     A_UINT32 vdev_id;
47756 
47757     /* Configurable Parameters for manual UL OFDMA Multi-User Trigger frame */
47758     A_UINT32 manual_trig_preferred_ac;
47759     /**
47760      * This TLV is followed by TLVs below:
47761      *    wmi_mac_addr peer_macaddr[];
47762      *        The array has one element for each peer to be included in the
47763      *        manually-triggered UL MU transmission.
47764      */
47765 } wmi_vdev_set_manual_mu_trig_cmd_fixed_param;
47766 
47767 typedef struct {
47768    /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_manual_su_trig_cmd_fixed_param  */
47769     A_UINT32 tlv_header;
47770 
47771     /* VDEV identifier */
47772     A_UINT32 vdev_id;
47773 
47774     /* Configurable Parameters for manual UL OFDMA Single-User Trigger frame */
47775     wmi_mac_addr peer_macaddr;
47776     A_UINT32 manual_trig_preferred_ac;
47777     A_UINT32 num_su_manual_trig;
47778     A_UINT32 manual_trig_length;
47779     A_UINT32 manual_trig_mcs;
47780     A_UINT32 manual_trig_nss;
47781     A_INT32  manual_trig_target_rssi; /* units = dBm */
47782 } wmi_vdev_set_manual_su_trig_cmd_fixed_param;
47783 
47784 
47785 #define CQI_UPLOAD_META_DATA_NC_IDX(idx) \
47786     (MAX_NUM_CQI_USERS_IN_STANDALONE_SND + (idx * 2))
47787 
47788 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_ASNR_LENGTH(asnr_params, value) \
47789         WMI_SET_BITS(asnr_params, 0, 16, value)
47790 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_ASNR_LENGTH(asnr_params) \
47791         WMI_GET_BITS(asnr_params, 0, 16)
47792 
47793 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_ASNR_OFFSET(asnr_params, value) \
47794         WMI_SET_BITS(asnr_params, 16, 16, value)
47795 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_ASNR_OFFSET(asnr_params) \
47796         WMI_GET_BITS(asnr_params, 16, 16)
47797 
47798 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_DSNR_LENGTH(dsnr_params, value) \
47799         WMI_SET_BITS(dsnr_params, 0, 16, value)
47800 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_DSNR_LENGTH(dsnr_params) \
47801         WMI_GET_BITS(dsnr_params, 0, 16)
47802 
47803 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_DSNR_OFFSET(dsnr_params, value) \
47804         WMI_SET_BITS(dsnr_params, 16, 16, value)
47805 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_DSNR_OFFSET(dsnr_params) \
47806         WMI_GET_BITS(dsnr_params, 16, 16)
47807 
47808 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_FB_PARAMS_NC(fb_params, value) \
47809         WMI_SET_BITS(fb_params, 0, 2, value)
47810 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_FB_PARAMS_NC(fb_params) \
47811         WMI_GET_BITS(fb_params, 0, 2)
47812 
47813 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_FB_PARAMS_NSS_NUM(fb_params, value) \
47814         WMI_SET_BITS(fb_params, 2, 2, value)
47815 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_FB_PARAMS_NSS_NUM(fb_params) \
47816         WMI_GET_BITS(fb_params, 2, 2)
47817 
47818 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_SET_DDR_BUF_IDX(ddr_buffer_idx, value) \
47819         WMI_SET_BITS(ddr_buffer_idx, 4, 2, value)
47820 #define WMI_DMA_BUF_RELEASE_CV_UPLOAD_GET_DDR_BUF_IDX(ddr_buffer_idx) \
47821         WMI_GET_BITS(ddr_buffer_idx, 4, 2)
47822 
47823 
47824 #define WMI_SET_STANDALONE_SOUND_PARAMS_FB_TYPE(snd_params, value) \
47825         WMI_SET_BITS(snd_params, 0, 2, value)
47826 #define WMI_GET_STANDALONE_SOUND_PARAMS_FB_TYPE(snd_params) \
47827         WMI_GET_BITS(snd_params, 0, 2)
47828 
47829 #define WMI_SET_STANDALONE_SOUND_PARAMS_NG(snd_params, value) \
47830         WMI_SET_BITS(snd_params, 2, 2, value)
47831 #define WMI_GET_STANDALONE_SOUND_PARAMS_NG(snd_params) \
47832         WMI_GET_BITS(snd_params, 2, 2)
47833 
47834 #define WMI_SET_STANDALONE_SOUND_PARAMS_CB(snd_params, value) \
47835         WMI_SET_BITS(snd_params, 4, 1, value)
47836 #define WMI_GET_STANDALONE_SOUND_PARAMS_CB(snd_params) \
47837         WMI_GET_BITS(snd_params, 4, 1)
47838 
47839 #define WMI_SET_STANDALONE_SOUND_PARAMS_BW(snd_params, value) \
47840         WMI_SET_BITS(snd_params, 5, 3, value)
47841 #define WMI_GET_STANDALONE_SOUND_PARAMS_BW(snd_params) \
47842         WMI_GET_BITS(snd_params, 5, 3)
47843 
47844 #define WMI_SET_STANDALONE_SOUND_PARAMS_CQI_TYPE(snd_params, value) \
47845         WMI_SET_BITS(snd_params, 8, 1, value)
47846 #define WMI_GET_STANDALONE_SOUND_PARAMS_CQI_TYPE(snd_params) \
47847         WMI_GET_BITS(snd_params, 8, 1)
47848 
47849 #define WMI_DMA_BUF_RELEASE_CQI_UPLOAD_SET_FB_PARAMS_IS_VALID(fb_params_cqi, value, idx) \
47850         WMI_SET_BITS(fb_params_cqi, idx, 1, value)
47851 #define WMI_DMA_BUF_RELEASE_CQI_UPLOAD_GET_FB_PARAMS_IS_VALID(fb_params_cqi, idx) \
47852         WMI_GET_BITS(fb_params_cqi, idx, 1)
47853 
47854 #define WMI_DMA_BUF_RELEASE_CQI_UPLOAD_SET_FB_PARAMS_NC(fb_params_cqi, value, idx) \
47855         WMI_SET_BITS(fb_params_cqi, CQI_UPLOAD_META_DATA_NC_IDX(idx), 2, value)
47856 #define WMI_DMA_BUF_RELEASE_CQI_UPLOAD_GET_FB_PARAMS_NC(fb_params_cqi, idx) \
47857         WMI_GET_BITS(fb_params_cqi, CQI_UPLOAD_META_DATA_NC_IDX(idx), 2)
47858 
47859 
47860 typedef enum _WMI_STANDALONE_SOUND_STATUS_T {
47861     WMI_STANDALONE_SOUND_STATUS_OK,
47862     WMI_STANDALONE_SOUND_STATUS_ERR_NUM_PEERS_EXCEEDED,
47863     WMI_STANDALONE_SOUND_STATUS_ERR_NG_INVALID,
47864     WMI_STANDALONE_SOUND_STATUS_ERR_NUM_REPEAT_EXCEEDED,
47865     WMI_STANDALONE_SOUND_STATUS_ERR_PEER_DOESNOT_SUPPORT_BW,
47866     WMI_STANDALONE_SOUND_STATUS_ERR_INVALID_PEER,
47867     WMI_STANDALONE_SOUND_STATUS_ERR_INVALID_VDEV,
47868     WMI_STANDALONE_SOUND_STATUS_ERR_PEER_DOES_NOT_SUPPORT_MU_FB,
47869     WMI_STANDALONE_SOUND_STATUS_ERR_DMA_NOT_CONFIGURED,
47870     WMI_STANDALONE_SOUND_STATUS_ERR_COMPLETE_FAILURE,
47871 } WMI_STANDALONE_SOUND_STATUS_T;
47872 
47873 typedef struct {
47874     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_cv_upload_meta_data */
47875     /** Set if the CV is valid */
47876     A_UINT32 is_valid;
47877      /** Feedback type */
47878     A_UINT32 fb_type;
47879     /**
47880     * [15:0] ASNR length
47881     * [31:16] ASNR offset
47882     */
47883     A_UINT32 asnr_params;
47884     /**
47885     * [15:0] DSNR length
47886     * [31:16] DSNR offset
47887     */
47888     A_UINT32 dsnr_params;
47889     /** Peer mac address */
47890     wmi_mac_addr peer_mac_address;
47891     /** fb_params:
47892     * [1:0] Nc
47893     *       Refer to WMI_DMA_BUF_RELEASE_CV_UPLOAD_[SET,GET]_FB_PARAMS_NC
47894     * [3:2] nss_num
47895     *       Refer to WMI_DMA_BUF_RELEASE_CV_UPLOAD_[SET,GET]_FB_PARAMS_NSS_NUM
47896     * [5:4] ddr_buffer_idx
47897     *       Refer to WMI_DMA_BUF_RELEASE_CV_UPLOAD_[SET,GET]_DDR_BUF_IDX
47898     */
47899     A_UINT32 fb_params;
47900 } wmi_dma_buf_release_cv_upload_meta_data;
47901 
47902 typedef struct {
47903     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_radar_meta_data */
47904     /* timestamp at the time of the capture */
47905     A_UINT32 timestamp_us;
47906     /* phy mode WLAN_PHY_MODE of the channel defined in wlan_defs.h */
47907     A_UINT32 phy_mode;
47908     /* frequency (in MHz) of the primary 20 MHz channel */
47909     A_UINT32 chan_mhz;
47910     /* Center frequency 1 in MHz */
47911     A_UINT32 band_center_freq1;
47912     /* Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode */
47913     A_UINT32 band_center_freq2;
47914     /* tx chain mask */
47915     A_UINT32 tx_chain_mask;
47916     /* rx chain mask */
47917     A_UINT32 rx_chain_mask;
47918     /* number of LTFs sent for capture */
47919     A_UINT32 num_ltf_tx;
47920     /* number of LTFs skipped in rx */
47921     A_UINT32 num_skip_ltf_rx;
47922     /* number of LTFs used for accumulation */
47923     A_UINT32 num_ltf_accumulation;
47924 } wmi_dma_buf_release_wifi_radar_meta_data;
47925 
47926 typedef struct {
47927     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_cqi_upload_meta_data */
47928     A_UINT32 tlv_header;
47929 
47930     /**
47931      * [15:0] ASNR length
47932      * [31:16] ASNR offset
47933      */
47934     A_UINT32 asnr_params;
47935 
47936     /** Peer mac address */
47937     wmi_mac_addr peer_mac_address[MAX_NUM_CQI_USERS_IN_STANDALONE_SND];
47938 
47939     /**
47940      * [0] is_user0_valid
47941      * [1] is_user1_valid
47942      * [2] is_user2_valid
47943      * [4:3] User0_Nc
47944      * [6:5] User1_Nc
47945      * [8:7] User2_Nc
47946      */
47947     A_UINT32 fb_params_cqi         : 9,
47948              reserved              : 23;
47949 } wmi_dma_buf_release_cqi_upload_meta_data;
47950 
47951 typedef struct {
47952     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_standalone_sounding_cmd_fixed_param */
47953     /** vdev identifier */
47954     A_UINT32 vdev_id;
47955     /** sounding_params:
47956      * [1:0] Feedback type
47957      * [3:2] Ng
47958      * [4] Codebook
47959      * [7:5] BW
47960      *     0 = 20 MHz
47961      *     1 = 40 MHz
47962      *     2 = 80 MHz
47963      *     3 = 160 MHz
47964      *     4 = 320 MHz
47965      * [8] Triggered/Non-Triggered CQI
47966      * [31:9] Reserved
47967      */
47968     A_UINT32 sounding_params;
47969     /** The number of sounding repeats */
47970     A_UINT32 num_sounding_repeats;
47971     /**
47972      * TLV (tag length value) parameters follow the
47973      * structure. The TLV's are:
47974      * wmi_mac_addr peer_list[num_peers];
47975      */
47976 } wmi_standalone_sounding_cmd_fixed_param;
47977 
47978 typedef struct {
47979     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_standalone_sounding_evt_fixed_param */
47980     /** vdev identifier */
47981     A_UINT32 vdev_id;
47982     /** status:
47983      * standalone sounding command status -
47984      * refer to WMI_STANDALONE_SOUND_STATUS_T
47985      */
47986     A_UINT32 status;
47987     /** number of CV buffers uploaded */
47988     A_UINT32 buffer_uploaded;
47989     /** TLV (tag length value) parameters follow the
47990     * structure. The TLV's are:
47991     * A_UINT32 snd_failed[num_sounding_repeats];
47992     *     snd_failed[] array's elements hold the number of failures
47993     *     for each sounding.
47994     */
47995 } wmi_standalone_sounding_evt_fixed_param;
47996 
47997 typedef struct {
47998     /*
47999      * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rf_path_cmd_fixed_param
48000      */
48001     A_UINT32 tlv_header;
48002     /* pdev_id for identifying the MAC */
48003     A_UINT32 pdev_id;
48004     /*
48005      * rf_path :
48006      * 0 - primary RF path
48007      * 1 - secondary RF path
48008      */
48009     A_UINT32 rf_path;
48010 } wmi_pdev_set_rf_path_cmd_fixed_param;
48011 
48012 typedef struct {
48013     /*
48014      * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rf_path_event_fixed_param
48015      */
48016     A_UINT32 tlv_header;
48017     /* pdev_id for identifying the MAC */
48018     A_UINT32 pdev_id;
48019     /*
48020      * rf_path :
48021      * 0 - primary RF path
48022      * 1 - secondary RF path
48023      */
48024     A_UINT32 rf_path;
48025     /*
48026      * status :
48027      * TRUE (0) - for recieved and cache the value in FW
48028      * FALSE (1) :
48029      *      a. pdev_id for which secondary RF path is not available
48030      *      b. caching of the rf_path got failed in FW
48031      */
48032     A_UINT32 status;
48033 } wmi_pdev_set_rf_path_event_fixed_param;
48034 
48035 #define WMI_SET_RX_PEER_STATS_RESP_TYPE(rx_params, value) \
48036         WMI_SET_BITS(rx_params, 0, 1, value)
48037 #define WMI_GET_RX_PEER_STATS_RESP_TYPE(rx_params) \
48038         WMI_GET_BITS(rx_params, 0, 1)
48039 
48040 #define WMI_SET_RX_PEER_STATS_MCS(rx_params, value) \
48041         WMI_SET_BITS(rx_params, 1, 5, value)
48042 #define WMI_GET_RX_PEER_STATS_MCS(rx_params) \
48043         WMI_GET_BITS(rx_params, 1, 5)
48044 
48045 #define WMI_SET_RX_PEER_STATS_NSS(rx_params, value) \
48046         WMI_SET_BITS(rx_params, 6, 4, value)
48047 #define WMI_GET_RX_PEER_STATS_NSS(rx_params) \
48048         WMI_GET_BITS(rx_params, 6, 4)
48049 
48050 #define WMI_SET_RX_PEER_STATS_GI_LTF_TYPE(rx_params, value) \
48051         WMI_SET_BITS(rx_params, 10, 4, value)
48052 #define WMI_GET_RX_PEER_STATS_GI_LTF_TYPE(rx_params) \
48053         WMI_GET_BITS(rx_params, 10, 4)
48054 
48055 typedef enum {
48056     WMI_PEER_RX_RESP_SU    = 0,
48057     WMI_PEER_RX_RESP_MIMO  = 1,
48058     WMI_PEER_RX_RESP_OFDMA = 2,
48059 } WMI_PEER_RX_RESP_TYPE;
48060 
48061 typedef struct {
48062     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_manual_ul_ofdma_trig_rx_peer_userinfo  */
48063     A_UINT32        tlv_header;
48064 
48065     /* Peer mac address */
48066     wmi_mac_addr    peer_macaddr;
48067 
48068     /* Per peer RX parameters */
48069     /* [0] - Flag to indicate if peer responded with QoS Data or QoS NULL.
48070      *  0 -> indicates QoS NULL, 1-> indicates QoS Data response
48071      * [5:1] - MCS - Peer response MCS
48072      * [9:6] - NSS - Peer response NSS
48073      * [13:10] - GI LTF Type - Peer response GI/LTF type
48074      *     0 => gi == GI_1600 && ltf == 1x LTF
48075      *     1 => gi == GI_1600 && ltf == 2x LTF
48076      *     2 => gi == GI_3200 && ltf == 4x LTF
48077      * [31:14] - Reserved
48078      */
48079     A_UINT32        rx_peer_stats;
48080 
48081     /* Peer response per chain RSSI */
48082     A_INT32         peer_per_chain_rssi[WMI_MAX_CHAINS];
48083 } wmi_manual_ul_ofdma_trig_rx_peer_userinfo;
48084 
48085 typedef struct {
48086     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_manual_ul_ofdma_trig_rx_peer_userinfo_evt_fixed_param  */
48087     A_UINT32 tlv_header;
48088 
48089     A_UINT32 vdev_id; /* VDEV identifier */
48090 
48091     /* combined_rssi:
48092      * RX Combined RSSI in dBm
48093      * Value indicates the average RSSI per 20MHz by averaging the total RSSI
48094      * across entire BW for each OFDMA STA
48095      */
48096     A_INT32 combined_rssi;
48097 
48098     /* rx_ppdu_resp_type:
48099      * RX PPDU Response Type
48100      * Refer WMI_PEER_RX_RESP_TYPE for possible values
48101      */
48102     A_UINT32 rx_ppdu_resp_type;
48103 
48104     /* rx_resp_bw:
48105      * RX response bandwidth
48106      *     0 = 20 MHz
48107      *     1 = 40 MHz
48108      *     2 = 80 MHz
48109      *     3 = 160 MHz
48110      *     4 = 320 MHz
48111      */
48112     A_UINT32 rx_resp_bw;
48113 
48114     /**
48115      * This TLV is followed by TLVs below:
48116      *     wmi_manual_ul_ofdma_trig_rx_peer_userinfo rx_peer_userinfo[]
48117      *         TLV length specified by number of peer responses for manual
48118      *         UL OFDMA trigger
48119      */
48120 } wmi_manual_ul_ofdma_trig_rx_peer_userinfo_evt_fixed_param;
48121 
48122 typedef enum _WMI_VDEV_PAUSE_TYPE
48123 {
48124     WMI_VDEV_PAUSE_TYPE_UNKNOWN = 0,
48125     WMI_VDEV_PAUSE_TYPE_MLO_LINK = 1,
48126     WMI_VDEV_PAUSE_TYPE_TX = 2,
48127 } WMI_VDEV_PAUSE_TYPE;
48128 
48129 typedef struct {
48130     /** TLV tag and len; tag equals
48131      * WMITLV_TAG_STRUC_wmi_vdev_pause_cmd_fixed_param */
48132     A_UINT32 tlv_header;
48133     /* VDEV identifier */
48134     A_UINT32 vdev_id;
48135     /** type of pause, refer to WMI_VDEV_PAUSE_TYPE */
48136     A_UINT32 pause_type;
48137     /** duration of pause, in unit of ms */
48138     A_UINT32 pause_dur_ms;
48139 } wmi_vdev_pause_cmd_fixed_param;
48140 
48141 typedef struct {
48142     A_UINT32 tlv_header;
48143     A_UINT32 ieee_link_id; /* key to identify a link */
48144     wmi_channel wmi_chan;
48145 } wmi_mlo_link_bss_param;
48146 
48147 typedef struct {
48148     A_UINT32 tlv_header;
48149     wmi_mac_addr ap_mld_macaddr;
48150 
48151     /* max num of active links recommended by AP or applications */
48152     A_UINT32 recommended_max_num_simultaneous_links;
48153 
48154     /*
48155      * The TLVs listed below follow this fixed_param TLV:
48156      * wmi_mlo_link_bss_param link_bss_params[]:
48157      *     an array of links to be updated
48158      */
48159 } wmi_mlo_set_link_bss_params_cmd_fixed_param;
48160 
48161 typedef enum _WMI_LINK_SWITCH_REASON {
48162     WMI_MLO_LINK_SWITCH_REASON_RSSI_CHANGE          = 1,
48163     WMI_MLO_LINK_SWITCH_REASON_LOW_QUALITY          = 2,
48164     WMI_MLO_LINK_SWITCH_REASON_C2_CHANGE            = 3,
48165     WMI_MLO_LINK_SWITCH_REASON_HOST_FORCE           = 4,
48166     WMI_MLO_LINK_SWITCH_REASON_T2LM                 = 5,
48167     WMI_MLO_LINK_SWITCH_REASON_WLM                  = 6,
48168     WMI_MLO_LINK_SWITCH_REASON_HOST_FORCE_FOLLOWUP  = 7,
48169     WMI_MLO_LINK_SWITCH_REASON_MAX,
48170 } WMI_LINK_SWITCH_REASON;
48171 
48172 typedef struct {
48173     A_UINT32 tlv_header;
48174 
48175     A_UINT32 vdev_id;   /*the vdev id assigned to curr_ieee_link_id*/
48176     A_UINT32 curr_ieee_link_id; /*current link id on above vdev_id*/
48177     A_UINT32 new_ieee_link_id; /*new link id on above vdev_id*/
48178     A_UINT32 new_primary_freq; /*primay_freq for the new link on the vdev, in units of MHZ*/
48179     A_UINT32 new_phymode; /*phymode for the new link on the vdev, see WLAN_PHY_MODE for definitions*/
48180     A_UINT32 reason;      /*see WMI_LINK_SWITCH_REASON for definition*/
48181 } wmi_mlo_link_switch_req_evt_fixed_param;
48182 
48183 typedef enum _WMI_LINK_SWITCH_CNF_REASON{
48184     WMI_MLO_LINK_SWITCH_CNF_REASON_BSS_PARAMS_CHANGED = 1,
48185     WMI_MLO_LINK_SWITCH_CNF_REASON_CONCURRECNY_CONFLICT = 2,
48186     WMI_MLO_LINK_SWITCH_CNF_REASON_HOST_INTERNAL_ERROR = 3,
48187     WMI_MLO_LINK_SWITCH_CNF_REASON_HOST_RESTORE_FORCE = 4,
48188     WMI_MLO_LINK_SWITCH_CNF_REASON_MAX,
48189 } WMI_LINK_SWITCH_CNF_REASON;
48190 
48191 typedef enum _WMI_LINK_SWITCH_CNF_STATUS{
48192     WMI_MLO_LINK_SWITCH_CNF_STATUS_ACCEPT = 0,
48193     WMI_MLO_LINK_SWITCH_CNF_STATUS_REJECT = 1,
48194 } WMI_LINK_SWITCH_CNF_STATUS;
48195 
48196 typedef struct {
48197     A_UINT32 tlv_header;
48198 
48199     A_UINT32 vdev_id;
48200     A_UINT32 status;  /* see definition of WMI_LINK_SWITCH_CNF_STATUS */
48201     A_UINT32 reason;  /* see definition of WMI_LINK_SWITCH_CNF_REASON */
48202 
48203 /*
48204  * The following optional TLVs may follow this fixed_praam TLV,
48205  * depending on the value of the reason field.
48206  *
48207  * wmi_mlo_link_set_active_cmd_fixed_param set_link_params[];
48208  *     The set_link_params array has one element when reason is
48209  *     WMI_MLO_LINK_SWITCH_CNF_REASON_HOST_RESTORE_FORCE and
48210  *     use_ieee_link_id_bitmap should always be filled with 1.
48211  *     In other cases the length of the set_link_params array shall be 0.
48212  *
48213  * wmi_mlo_set_active_link_number_param link_number_param[];
48214  *     Link number parameters, optional TLV.
48215  *     Present when force type is WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
48216  *     WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM.
48217  *     In other cases the length of array shall be 0.
48218  *
48219  * A_UINT32 ieee_link_id_bitmap[];
48220  *     present for  WMI_MLO_LINK_FORCE_ACTIVE
48221  *     or WMI_MLO_LINK_FORCE_INACTIVE or WMI_MLO_LINK_NO_FORCE
48222  *     or WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or
48223  *     WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM
48224  *     In other cases the length of array shall be 0.
48225  *
48226  * A_UINT32 ieee_link_id_bitmap2[];
48227  *     For force mode WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE ieee_link_id_bitmap2[]
48228  *     carries the inactive linkid bitmap.
48229  *     In other cases the length of the array shall be 0.
48230  */
48231 } wmi_mlo_link_switch_cnf_fixed_param;
48232 
48233 typedef struct {
48234     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_state_switch_req_evt_fixed_param */
48235     A_UINT32 link_state_switch_count; /* Number of link state switch event pending, MAX 5 iteration */
48236 } wmi_mlo_link_state_switch_req_evt_fixed_param;
48237 
48238 typedef struct {
48239     A_UINT32 tlv_header;               /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_state_switch_trigger_reason_tlv_param */
48240     A_UINT32 cur_active_ieee_bitmap;   /* current active ieee linkbitmap */
48241     A_UINT32 prev_active_ieee_bitmap;  /* previous active iee linkbitmap */
48242     A_UINT32 host_ref_fw_timestamp_ms; /* fw time stamp on refrence of TIME_STAMP_SYNC_CMD */
48243     A_UINT32 reason_code;              /* reason for link state switch trigger -
48244                                         * refer to WMI_LINK_STATE_SWITCH_REASON
48245                                         */
48246     wmi_mac_addr  ml_bssid;  /* mac address of mld device */
48247 } wmi_mlo_link_state_switch_trigger_reason;
48248 
48249 typedef enum _WMI_LINK_STATE_SWITCH_REASON {
48250     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_VDEV_READY = 0,
48251     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_ULL_MODE = 1,
48252     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_T2LM_ENABLED = 2,
48253     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_T2LM_DISABLED = 3,
48254     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_FORCE_ENABLED = 4,
48255     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_FORCE_DISABLED = 5,
48256     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_LINK_QUALITY = 6,
48257     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_LINK_CAPACITY = 7,
48258     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_RSSI = 8,
48259     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_BMISS = 9,
48260     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_BT_STATUS = 10,
48261 
48262     WMI_MLO_PS_LINK_STATE_SWITCH_REASON_MAX,
48263 } WMI_LINK_STATE_SWITCH_REASON;
48264 
48265 #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_ML_PEER_ID_GET(new_link_info) WMI_GET_BITS(new_link_info, 0, 16)
48266 #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_ML_PEER_ID_SET(new_link_info, value) WMI_SET_BITS(new_link_info, 0, 16, value)
48267 
48268 #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_HW_LINK_ID_GET(new_link_info) WMI_GET_BITS(new_link_info, 16, 16)
48269 #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_HW_LINK_ID_SET(new_link_info, value) WMI_SET_BITS(new_link_info, 16, 16, value)
48270 
48271 typedef struct {
48272     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_new_primary_link_peer_info */
48273     A_UINT32 tlv_header;
48274 
48275     union {
48276         A_UINT32 new_link_info;
48277         struct {
48278             A_UINT32 ml_peer_id :16,
48279                      hw_link_id :16;
48280         };
48281     };
48282 } wmi_mlo_new_primary_link_peer_info;
48283 
48284 typedef struct {
48285     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_fixed_param */
48286     A_UINT32 tlv_header;
48287 
48288     A_UINT32 vdev_id;
48289 
48290     /**
48291      * Following this structure is
48292      * the array of "wmi_mlo_new_primary_link_peer_info" TLVs.
48293      */
48294 } wmi_mlo_primary_link_peer_migration_fixed_param;
48295 
48296 #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_ML_PEER_ID_GET(status_info) WMI_GET_BITS(status_info, 0, 16)
48297 #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_ML_PEER_ID_SET(status_info, value) WMI_SET_BITS(status_info, 0, 16, value)
48298 
48299 #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_STATUS_GET(status_info) WMI_GET_BITS(status_info, 16, 8)
48300 #define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_STATUS_SET(status_info, value) WMI_SET_BITS(status_info, 16, 8, value)
48301 
48302 typedef enum {
48303     WMI_PRIMARY_LINK_PEER_MIGRATION_SUCCESS,
48304     WMI_PRIMARY_LINK_PEER_MIGRATION_IN_PROGRESS,
48305     WMI_PRIMARY_LINK_PEER_MIGRATION_DELETE_IN_PROGRESS,
48306     WMI_PRIMARY_LINK_PEER_MIGRATION_DELETED,
48307     WMI_PRIMARY_LINK_PEER_MIGRATION_TX_PIPES_FAILED,
48308     WMI_PRIMARY_LINK_PEER_MIGRATION_RX_PIPES_FAILED,
48309 
48310     /* Add any new status above this line */
48311     WMI_PRIMARY_LINK_PEER_MIGRATION_FAIL = 255,
48312 } WMI_PRIMARY_LINK_PEER_MIGRATION_STATUS;
48313 
48314 typedef struct {
48315     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_status */
48316     A_UINT32 tlv_header;
48317 
48318     union {
48319         A_UINT32 status_info;
48320         struct {
48321             A_UINT32 ml_peer_id :16,
48322                      status     :8, /* WMI_PRIMARY_LINK_PEER_MIGRATION_STATUS */
48323                      reserved   :8;
48324         };
48325     };
48326 } wmi_mlo_primary_link_peer_migration_status;
48327 
48328 typedef struct {
48329     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_compl_fixed_param */
48330     A_UINT32 tlv_header;
48331     A_UINT32 vdev_id;
48332 
48333     /**
48334      * Following the fixed param is
48335      * the array of TLVs "wmi_mlo_primary_link_peer_migration_status".
48336      */
48337 } wmi_mlo_primary_link_peer_migration_compl_fixed_param;
48338 
48339 /* WMI_AUX_DEV_CAPS_SUPPORTED_MODE:
48340  * How many bits to shift for each supported mode.
48341  * This works just like Linux file permission bits
48342  * (i.e. user|group|other values for each rwx perms).
48343  */
48344 typedef enum _WMI_AUX_DEV_CAPS_SUPPORTED_MODE {
48345     WMI_AUX_DEV_SUPPORTED_MODE_SCAN = 0,
48346     WMI_AUX_DEV_SUPPORTED_MODE_LISTEN = 1,
48347     WMI_AUX_DEV_SUPPORTED_MODE_EMLSR = 2,
48348 } WMI_AUX_DEV_CAPS_SUPPORTED_MODE;
48349 
48350 /* wmi_aux_dev_capabilities:
48351  * TLV representing AUX mode capabilities
48352  * A one-dimensional "flattened" array of these structs shall represent
48353  * all AUX capabilities regardless of the actual AUX count.
48354  *
48355  * For example, if 2x AUX are present, then the array is expected to look
48356  * something like this:
48357  *     wmi_aux_dev_capabilities caps[] = {
48358  *         // 4 elements for AUX_0 - one element for each HW mode:
48359  *         AUX_0_single_mac,
48360  *         AUX_0_dual_mac,
48361  *         AUX_0_single_mac_emlsr,
48362  *         AUX_0_split_emlsr,
48363  *         // 4 elements for AUX_1:
48364  *         AUX_1_single_mac,
48365  *         AUX_1_dual_mac,
48366  *         AUX_1_single_mac_emlsr,
48367  *         AUX_1_split_emlsr,
48368  *     };
48369  * In effect, indexes 0 to 3 (inclusive) represent the first AUX,
48370  * 4 to 7 (inclusive) represent the second, and so on.
48371  * Note that each element explicitly identifies which AUX and HW mode it
48372  * corresponds to, via the aux_index and hw_mode_id fields respectively.
48373  * So the receiver should not assume the ordering will be as shown above
48374  * (AUX0 single, AUX0 dual, AUX0 single emlsr, AUX0 split emlsr,
48375  *  AUX1 single, AUX1 dual, AUX1 single emlsr, AUX1 split emlsr)
48376  * but instead should directly check each element's aux_index and hw_mode_id
48377  * fields.
48378  */
48379 typedef struct {
48380     /* tlv_header -- WMITLV_TAG_STRUC_wmi_aux_dev_capabilities */
48381     A_UINT32 tlv_header;
48382 
48383     /* aux_index -- Which AUX this TLV applies to.
48384     Ex: aux_index=0 is first AUX, aux_index=1 is second AUX, etc */
48385     A_UINT32 aux_index;
48386 
48387     /*
48388      * This TLV represents which AUX capabilities are supported by
48389      * which MAC for the given HW mode.
48390      * pdev ID value of 0x0 denotes that the AUX mode is not applicable
48391      * for the given HW mode.
48392      *
48393      *  hw_mode_id         |  Single  DBS_OR_SBS  AUX eMLSR  AUX eMLSR
48394      *                     |  Phy                 single     split
48395      *  --------------------------------------------------------------
48396      *  supported_modes    |  SCAN/   SCAN/       EMLSR      EMLSR
48397      *                     |  LISTEN  LISTEN
48398      *  listen_pdev_id_map |  0x1     0x2         0x0        0x0
48399      *  emlsr_pdev_id_map  |  0x0     0x0         0x1        0x2
48400      */
48401 
48402     /* hw_mode_id:
48403      * Which HW mode this TLV applies to.
48404      * HW mode values are defined in WMI_HW_MODE_CONFIG_TYPE.
48405      */
48406     A_UINT32 hw_mode_id;
48407 
48408     /* supported_modes:
48409      * Which mode this AUX supports for the HW mode defined in hw_mode_id.
48410      * Shift amounts are defined in WMI_AUX_DEV_CAPS_SUPPORTED_MODE.
48411      * This works just like user|group|other bits for Linux file permissions:
48412      *  0x1 = SCAN          (0 0 1)
48413      *  0x2 = LISTEN        (0 1 0)
48414      *  0x3 = SCAN+LISTEN   (0 1 1)
48415      *  0x4 = EMLSR         (1 0 0)
48416      */
48417     A_UINT32 supported_modes_bitmap;
48418 
48419     /* listen_pdev_id_map:
48420      * Which AUX MAC can listen/scan for the HW mode described in hw_mode_id.
48421      * 0x0 - AUX cannot be used for listen mode.
48422      * 0x1 - AUX can be attached to MAC-0 in AUX listen mode.
48423      * 0x2 - AUX can be attached to MAC-1 in AUX listen mode.
48424      */
48425     A_UINT32 listen_pdev_id_map;
48426 
48427     /* emlsr_pdev_id_map:
48428      * Which AUX MAC can perform eMLSR for the HW mode described in hw_mode_id.
48429      * 0x0 - AUX cannot be used for eMLSR mode.
48430      * 0x1 - AUX can be attached to MAC-0 in AUX eMLSR mode.
48431      * 0x2 - AUX can be attached to MAC-1 in AUX eMLSR mode.
48432      */
48433     A_UINT32 emlsr_pdev_id_map;
48434 } wmi_aux_dev_capabilities;
48435 
48436 typedef struct {
48437     /** TLV tag and len; tag equals
48438       * WMITLV_TAG_STRUC_wmi_pdev_wsi_stats_info_cmd_fixed_param
48439       */
48440     A_UINT32 tlv_header;
48441     A_UINT32 pdev_id; /* for identifying the MAC */
48442     A_UINT32 wsi_ingress_load_info;
48443     A_UINT32 wsi_egress_load_info;
48444 } wmi_pdev_wsi_stats_info_cmd_fixed_param;
48445 
48446 typedef struct {
48447     /** TLV tag and len; tag equals
48448      * WMITLV_TAG_STRUC_wmi_csa_event_status_ind_fixed_param
48449      */
48450     A_UINT32 tlv_header;
48451     A_UINT32 vdev_id;
48452     A_UINT32 status; /* accept: 1 reject : 0 */
48453 } wmi_csa_event_status_ind_fixed_param;
48454 
48455 typedef struct {
48456     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_utf_cmd_fixed_param */
48457     A_UINT32 tlv_header;
48458     A_UINT32 pdev_id;
48459 } wmi_pdev_utf_cmd_fixed_param;
48460 
48461 typedef struct {
48462     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_utf_event_fixed_param */
48463     A_UINT32 tlv_header;
48464     A_UINT32 pdev_id;
48465 } wmi_pdev_utf_event_fixed_param;
48466 
48467 typedef struct {
48468     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_led_blink_rate_table */
48469     A_UINT32 tlv_header;
48470 
48471     A_UINT32 on_time;  /* units = milliseconds */
48472     A_UINT32 off_time; /* units = milliseconds */
48473 } wmi_led_blink_rate_table;
48474 
48475 typedef struct {
48476     /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enable_led_blink_download_rate_table_fixed_param */
48477     A_UINT32 tlv_header;
48478     /* Pdev Id 0 or 1 based on split phy */
48479     A_UINT32 pdev_id;
48480     /* Feature enable or disable flag 0-disable 1-enable  */
48481     A_UINT32 blink_enable_flag;
48482     /* Bandwidth (Mbps) of each index in the blink rate table.
48483      * This quantum specification tells the FW which of the blink rate table
48484      * elements to use; the FW will divide the data rate by this bw_per_index
48485      * and round down, to obtain the index into the rate table for the blink
48486      * rate corresponding to the data rate.
48487      */
48488     A_UINT32 bw_per_index;
48489 
48490     /**
48491      * Following this fixed_param TLV are the following additional TLVs:
48492      *   - wmi_led_blink_rate_table led_blink_rate_table[]
48493      *     The led_blink_rate_table[] elements need to be ordered by
48494      *     increasing data rate, so that by dividing the data rate by
48495      *     bw_per_index, the FW can find which index/element of the
48496      *     led_blink_rate_table[] array to use.
48497      */
48498 } wmi_enable_led_blink_download_rate_table_fixed_param;
48499 
48500 typedef enum {
48501     /* Used when peer attempts connection with vdev */
48502     VDEV_OOB_CONNECT_REQUEST = 0,
48503 
48504     /* Used when upper layers wanted to cancel the connect request */
48505     VDEV_OOB_CONNECT_CANCEL = 1,
48506 
48507     /* Used as a response from FW that start request is accepted */
48508     VDEV_OOB_CONNECT_STARTED = 2,
48509 
48510     /*
48511      * Used as a response when connection is complete, or as a response
48512      * to cancel command.
48513      */
48514     VDEV_OOB_CONNECT_COMPLETED = 3,
48515 
48516     /* Used as a response if connect request can not be honored in FW */
48517     VDEV_OOB_CONNECT_CANCELLED = 4,
48518 
48519     VDEV_OOB_CONNECT_INVALID = 255,
48520 } VDEV_OOB_CONNECT_REQ_RESP_TYPE;
48521 
48522 typedef struct {
48523     /** TLV tag and len; tag equals
48524      * WMITLV_TAG_STRUC_wmi_vdev_oob_connection_req_cmd_fixed_param */
48525     A_UINT32 tlv_header;
48526     /* VDEV identifier */
48527     A_UINT32 vdev_id;
48528     /* OOB connection request type based on VDEV_OOB_CONNECT_REQ_RESP_TYPE */
48529     A_UINT32 connect_req_type;
48530     /* vdev_available_duration:
48531      * specifies duration in msecs for which device needs to be available
48532      * on vdev chan
48533      */
48534     A_UINT32 vdev_available_duration;
48535 } wmi_vdev_oob_connection_req_cmd_fixed_param;
48536 
48537 typedef struct {
48538     /** TLV tag and len; tag equals
48539      * WMITLV_TAG_STRUC_wmi_vdev_oob_connection_resp_event_fixed_param */
48540     A_UINT32 tlv_header;
48541     /* VDEV identifier */
48542     A_UINT32 vdev_id;
48543     /* OOB connection response type based on VDEV_OOB_CONNECT_REQ_RESP_TYPE */
48544     A_UINT32 connect_resp_type;
48545 } wmi_vdev_oob_connection_resp_event_fixed_param;
48546 
48547 typedef enum {
48548     WMI_AUDIO_TRANSPORT_SWITCH_STATUS_FAIL = 0,
48549     WMI_AUDIO_TRANSPORT_SWITCH_STATUS_SUCCESS,
48550     WMI_AUDIO_TRANSPORT_SWITCH_STATUS_TIMEOUT,
48551 } WMI_AUDIO_TRANSPORT_SWITCH_RESPONSE_STATUS;
48552 
48553 typedef enum {
48554     WMI_AUDIO_TRANSPORT_SWITCH_TYPE_NON_WLAN = 0,
48555     WMI_AUDIO_TRANSPORT_SWITCH_TYPE_WLAN = 1,
48556 } WMI_AUDIO_TRANSPORT_SWITCH_TYPE;
48557 
48558 typedef struct {
48559     /** TLV tag and len; tag equals
48560     * WMITLV_TAG_STRUC_wmi_audio_transport_switch_type_event_fixed_param */
48561     A_UINT32 tlv_header;
48562     /** This indicates whether FW is requesting for switch to WLAN(XPAN) or non-WLAN(BLE) */
48563     A_UINT32 switch_type;  /*see definition of WMI_AUDIO_TRANSPORT_SWITCH_TYPE */
48564 } wmi_audio_transport_switch_type_event_fixed_param;
48565 
48566 typedef struct {
48567     /** TLV tag and len; tag equals
48568     * WMITLV_TAG_STRUC_wmi_audio_transport_switch_resp_status_cmd_fixed_param */
48569     A_UINT32 tlv_header;
48570     /** This indicates whether switch response status is success, fail, timeout */
48571     A_UINT32 switch_response_status;  /* see definition of WMI_AUDIO_TRANSPORT_SWITCH_RESPONSE_STATUS */
48572     /** This indicates for which switch type (WLAN(XPAN) or non-WLAN(BLE)) the switch response status is intended to */
48573     A_UINT32 switch_type;  /* see definition of WMI_AUDIO_TRANSPORT_SWITCH_TYPE */
48574 } wmi_audio_transport_switch_resp_status_cmd_fixed_param;
48575 
48576 enum wmi_wifi_radar_cmd {
48577     wmi_wifi_radar_capture_disable,
48578     wmi_wifi_radar_capture_enable,
48579     wmi_wifi_radar_rx_cal,
48580     wmi_wifi_radar_tx_cal,
48581 
48582     wmi_wifi_radar_cmd_max = 0xff
48583 };
48584 
48585 typedef struct {
48586     /** TLV tag and len; tag equals
48587      * WMITLV_TAG_STRUC_wmi_pdev_enable_wifi_radar_cmd_fixed_param
48588      */
48589     A_UINT32 tlv_header;
48590     /* host pdev id */
48591     A_UINT32 pdev_id;
48592     /* tx_chain_mask:
48593      * tx chain mask to use for wifi radar tx.
48594      * Only one chain is supposed to be set.
48595      */
48596     A_UINT32 tx_chain_mask;
48597     /* rx chain mask for wifi radar capture. Can have multiple bits set. */
48598     A_UINT32 rx_chain_mask;
48599     /* number of LTFs to send for capture */
48600     A_UINT32 num_ltf_tx;
48601     /* number of extra LTFs that are to be skipped for accumulation */
48602     A_UINT32 num_skip_ltf_rx;
48603     /* number of LTFs to use for accumulation. Must be power of 2. */
48604     A_UINT32 num_ltf_accumulation;
48605     /* bandwidth to use for capture
48606      *     0 = 20 MHz
48607      *     1 = 40 MHz
48608      *     2 = 80 MHz
48609      *     3 = 160 MHz
48610      *     4 = 320 MHz
48611      */
48612     A_UINT32 bw;
48613     /* enum wmi_wifi_radar_cmd */
48614     A_UINT32 capture_calibrate;
48615     /* periodicity of capture in milliseconds */
48616     A_UINT32 capture_interval_ms;
48617 } wmi_pdev_enable_wifi_radar_cmd_fixed_param;
48618 
48619 #define WMI_PDEV_WIFI_RADAR_CAL_COMPLETION_STATUS_GET(cal_status_array, txchnIdx, rxchnIdx)         WMI_GET_BITS(*(cal_status_array + txchnIdx), rxchnIdx, 1)
48620 #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)
48621 
48622 typedef struct {
48623     /** TLV tag and len; tag equals
48624      * WMITLV_TAG_STRUC_wmi_wifi_radar_cal_configuration
48625      */
48626     A_UINT32 tlv_header;
48627     /* ID of pdev for which the calibration is completed */
48628     A_UINT32 pdev_id;
48629     /* Packet bandwidth of WiFi Radar packet used for calibration
48630      *     0 = 20 MHz
48631      *     1 = 40 MHz
48632      *     2 = 80 MHz
48633      *     3 = 160 MHz
48634      *     4 = 320 MHz
48635      */
48636     A_UINT32 wifi_radar_pkt_bw;
48637     /* Channel bandwidth
48638      *     0 = 20 MHz
48639      *     1 = 40 MHz
48640      *     2 = 80 MHz
48641      *     3 = 160 MHz
48642      *     4 = 320 MHz
48643      */
48644     A_UINT32 channel_bw;
48645     /* Channel Center frequency in MHz */
48646     A_UINT32 band_center_freq;
48647     /* Number of LTF configured in the WiFi Radar Tx packet during calibration */
48648     A_UINT32 num_ltf_tx;
48649     /* Number of LTF skipped during Rx of the calibration packet */
48650     A_UINT32 num_skip_ltf_rx;
48651     /* Number of LTF accumulated during Rx of the calibration packet */
48652     A_UINT32 num_ltf_accumulation;
48653     /* Calibration status for each chain combination
48654      * Word 0: tx chain 0 cal statuses:
48655      *     Bit 0: rx chain 0 cal status
48656      *     Bit 1: rx chain 1 cal status
48657      *     etc.
48658      * Word 1: tx chain 1 cal statuses:
48659      *     Bit 0: rx chain 0 cal status
48660      *     Bit 1: rx chain 1 cal status
48661      *     etc.
48662      * etc.
48663      * Cal status values: success = 1, Failure = 0
48664      */
48665     A_UINT32 per_chain_cal_status[WMI_MAX_CHAINS];
48666 } wmi_pdev_wifi_radar_cal_completion_status_event_param;
48667 
48668 typedef struct {
48669     /* WMITLV_TAG_STRUC_wmi_pdev_enable_xlna_cmd_fixed_param */
48670     A_UINT32 tlv_header;
48671     /* ID of pdev for which the xLNA needs to be configured */
48672     A_UINT32 pdev_id;
48673     /* 1 - Enable, 0 - Disable */
48674     A_UINT32 xLNA_enable;
48675 } wmi_pdev_enable_xlna_cmd_fixed_param;
48676 
48677 typedef struct {
48678     /* WMITLV_TAG_STRUC_wmi_pdev_enable_xlna_event_fixed_param */
48679     A_UINT32 tlv_header;
48680     /* to identify for which pdev the response is received */
48681     A_UINT32 pdev_id;
48682     /* Return status: 0 - Success, else - Failure */
48683     A_UINT32 status;
48684 } wmi_pdev_enable_xlna_event_fixed_param;
48685 
48686 /**
48687   * bits 0-15 are used for non interative traffic types like video streaming,
48688   *     or ping
48689   * bit 16-31 are reserved for interactive traffic types like gaming, VoIP,
48690   *     or video conferencing
48691   */
48692 #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_STREAMING_M  0x00000001
48693 #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_STREAMING_S  0
48694 #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_PING_M       0x00000002
48695 #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_PING_S       1
48696 #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_BACKGROUND_M 0x00000004
48697 #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_BACKGROUND_S 2
48698 /* bits 3-15 are reserved for new non-interactive traffic types */
48699 
48700 #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_GAMING_M     0x00010000
48701 #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_GAMING_S     16
48702 #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_VOIP_M       0x00020000
48703 #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_VOIP_S       17
48704 #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_VIDEO_CONF_M 0x00040000
48705 #define WMI_PEER_ACTIVE_TRAFFIC_TYPE_VIDEO_CONF_S 18
48706 /* bits 19-31 are reserved for new interactive traffic types */
48707 
48708 typedef struct {
48709     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_active_traffic_map_cmd_fixed_param */
48710     A_UINT32 vdev_id;
48711     wmi_mac_addr peer_macaddr; /* peer MAC address */
48712     /* active_traffic_map:
48713      * This field is a bitmap showing traffic types known to be currently
48714      * present within the vdev.
48715      * Refer to the WMI_PEER_ACTIVE_TRAFFIC_ definitions that specify which
48716      * bits within the bitmap correspond to which traffic types.
48717      */
48718     A_UINT32 active_traffic_map;
48719 } wmi_peer_active_traffic_map_cmd_fixed_param;
48720 
48721 
48722 /*
48723  * WMI_REQUEST_OPM_STATS_CMDID triggered by host to collect OPM stats for trafic types identified by STC
48724  * in respose this FW will send OEM_respose_event_id WMI_OEM_DATA_CMD_OPM_STATS
48725  *
48726  */
48727  typedef struct {
48728     A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_opm_stats_cmd_fixed_param */
48729     A_UINT32 pdev_id; /** pdev_id for identifying the MAC */
48730 } wmi_request_opm_stats_cmd_fixed_param;
48731 
48732 /* wmi command to suspend SAP vdev */
48733 typedef struct {
48734     /** TLV tag and len; tag equals
48735      * WMITLV_TAG_STRUC_wmi_set_ap_suspend_resume_cmd_fixed_param */
48736     A_UINT32 tlv_header;
48737     /* VDEV identifier */
48738     A_UINT32 vdev_id; /* If 0xFF, find vdevs corresponding to MLD MAC address */
48739     wmi_mac_addr mld_mac_address; /* MLD MAC address */
48740     A_UINT32 is_ap_suspend; /* 1 = suspend, 0 = resume */
48741 } wmi_set_ap_suspend_resume_fixed_param;
48742 
48743 typedef struct {
48744     /** TLV tag and len; tag equals
48745      * WMITLV_TAG_STRUC_wmi_mgmt_srng_reap_event_fixed_param */
48746     A_UINT32 tlv_header;
48747     /** timestamp_tp_update_ms:
48748      * This indicates the last time the tail pointer was updated by FW
48749      * after filling MGMT SRNG entry.
48750      * The timestamp is from the FW CPU's internal clock, in milliseconds units.
48751      */
48752     A_UINT32 timestamp_tp_update_ms;
48753     /** This indicates the position of the tail pointer as last updated by FW */
48754     A_UINT32 tail_pointer;
48755 } wmi_mgmt_srng_reap_event_fixed_param;
48756 
48757 
48758 
48759 /* ADD NEW DEFS HERE */
48760 
48761 
48762 // {
48763 /*****************************************************************************
48764  * The following structures are deprecated. DO NOT USE THEM!
48765  */
48766 /** Max number of channels in the schedule. */
48767 #define OCB_CHANNEL_MAX (5)
48768 
48769 /* NOTE: Make sure these data structures are identical to those
48770 * defined in sirApi.h */
48771 
48772 typedef struct
48773 {
48774     /** Arbitration Inter-Frame Spacing. Range: 2-15 */
48775     A_UINT32 aifsn;
48776     /** Contention Window minimum. Range: 1 - 10 */
48777     A_UINT32 cwmin;
48778     /** Contention Window maximum. Range: 1 - 10 */
48779     A_UINT32 cwmax;
48780 } wmi_qos_params_t;
48781 
48782 typedef struct {
48783     A_UINT32 tlv_header;
48784     A_UINT32 vdev_id;
48785     A_UINT32 tidmap; /* Bitmap specifying the TIDs for which prohibit would be set/unset */
48786     A_UINT32 prohibit_enable; /* 0 for Disable, 1 for Enable */
48787 } wmi_vdev_param_enable_sr_prohibit_fixed_param;
48788 
48789 typedef struct
48790 {
48791     /** Channel frequency in MHz */
48792     A_UINT32 chan_freq;
48793     /** Channel duration in ms */
48794     A_UINT32 duration;
48795     /** Start guard interval in ms */
48796     A_UINT32 start_guard_interval;
48797     /** End guard interval in ms */
48798     A_UINT32 end_guard_interval;
48799     /** Transmit power in dBm, range 0 - 23 */
48800     A_UINT32 tx_power;
48801     /** Transmit datarate in Mbps */
48802     A_UINT32 tx_rate;
48803     /** QoS parameters for each AC */
48804     wmi_qos_params_t qos_params[WLAN_MAX_AC];
48805     /** 1 to enable RX stats for this channel, 0 otherwise */
48806     A_UINT32 rx_stats;
48807 } wmi_ocb_channel_t;
48808 
48809 typedef struct {
48810     /** TLV tag and len; tag equals
48811     * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
48812     A_UINT32 tlv_header;
48813     /* VDEV identifier */
48814     A_UINT32 vdev_id;
48815     /** Number of valid channels in the channels array */
48816     A_UINT32 num_channels;
48817     /** The array of channels */
48818     wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
48819     /** 1 to allow off-channel tx, 0 otherwise */
48820     A_UINT32 off_channel_tx; /* Not supported */
48821 } wmi_ocb_set_sched_cmd_fixed_param;
48822 
48823 typedef struct {
48824     /** Return status. 0 for success, non-zero otherwise */
48825     A_UINT32 status;
48826 } wmi_ocb_set_sched_event_fixed_param;
48827 
48828 /*****************************************************************************
48829  * END DEPRECATED
48830  */
48831 // }
48832 /* ADD NEW DEFS ABOVE THIS DEPRECATED SECTION */
48833 
48834 
48835 #ifdef __cplusplus
48836 }
48837 #endif
48838 
48839 #endif /*_WMI_UNIFIED_H_*/
48840 
48841 /**@}*/
48842