1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2 /*
3  * Copyright (C) 2018-2021 Intel Corporation
4  */
5 #ifndef __iwl_fw_dbg_tlv_h__
6 #define __iwl_fw_dbg_tlv_h__
7 
8 #include <linux/bitops.h>
9 
10 #define IWL_FW_INI_MAX_REGION_ID		64
11 #define IWL_FW_INI_MAX_NAME			32
12 #define IWL_FW_INI_MAX_CFG_NAME			64
13 #define IWL_FW_INI_DOMAIN_ALWAYS_ON		0
14 #define IWL_FW_INI_REGION_V2_MASK		0x0000FFFF
15 
16 /**
17  * struct iwl_fw_ini_hcmd
18  *
19  * @id: the debug configuration command type for instance: 0xf6 / 0xf5 / DHC
20  * @group: the desired cmd group
21  * @reserved: to align to FW struct
22  * @data: all of the relevant command data to be sent
23  */
24 struct iwl_fw_ini_hcmd {
25 	u8 id;
26 	u8 group;
27 	__le16 reserved;
28 	u8 data[0];
29 } __packed; /* FW_DEBUG_TLV_HCMD_DATA_API_S_VER_1 */
30 
31 /**
32  * struct iwl_fw_ini_header - Common Header for all ini debug TLV's structures
33  *
34  * @version: TLV version
35  * @domain: domain of the TLV. One of &enum iwl_fw_ini_dbg_domain
36  */
37 struct iwl_fw_ini_header {
38 	__le32 version;
39 	__le32 domain;
40 	/* followed by the data */
41 } __packed; /* FW_TLV_DEBUG_HEADER_S_VER_1 */
42 
43 /**
44  * struct iwl_fw_ini_region_dev_addr - Configuration to read device addresses
45  *
46  * @size: size of each memory chunk
47  * @offset: offset to add to the base address of each chunk
48  */
49 struct iwl_fw_ini_region_dev_addr {
50 	__le32 size;
51 	__le32 offset;
52 } __packed; /* FW_TLV_DEBUG_DEVICE_ADDR_API_S_VER_1 */
53 
54 /**
55  * struct iwl_fw_ini_region_fifos - Configuration to read Tx/Rx fifos
56  *
57  * @fid: fifos ids array. Used to determine what fifos to collect
58  * @hdr_only: if non zero, collect only the registers
59  * @offset: offset to add to the registers addresses
60  */
61 struct iwl_fw_ini_region_fifos {
62 	__le32 fid[2];
63 	__le32 hdr_only;
64 	__le32 offset;
65 } __packed; /* FW_TLV_DEBUG_REGION_FIFOS_API_S_VER_1 */
66 
67 /**
68  * struct iwl_fw_ini_region_err_table - error table region data
69  *
70  * Configuration to read Umac/Lmac error table
71  *
72  * @version: version of the error table
73  * @base_addr: base address of the error table
74  * @size: size of the error table
75  * @offset: offset to add to &base_addr
76  */
77 struct iwl_fw_ini_region_err_table {
78 	__le32 version;
79 	__le32 base_addr;
80 	__le32 size;
81 	__le32 offset;
82 } __packed; /* FW_TLV_DEBUG_REGION_ERROR_TABLE_API_S_VER_1 */
83 
84 /**
85  * struct iwl_fw_ini_region_special_device_memory - special device memory
86  *
87  * Configuration to read a special memory
88  *
89  * @type: type of the special memory
90  * @version: version of the special memory
91  * @base_addr: base address of the error table
92  * @size: size of the error table
93  * @offset: offset to add to &base_addr
94  */
95 struct iwl_fw_ini_region_special_device_memory {
96 	__le16 type;
97 	__le16 version;
98 	__le32 base_addr;
99 	__le32 size;
100 	__le32 offset;
101 } __packed; /* FW_TLV_DEBUG_REGION_SPECIAL_DEVICE_ADDR_API_S_VER_1 */
102 
103 /**
104  * struct iwl_fw_ini_region_internal_buffer - internal buffer region data
105  *
106  * Configuration to read internal monitor buffer
107  *
108  * @alloc_id: allocation id one of &enum iwl_fw_ini_allocation_id
109  * @base_addr: internal buffer base address
110  * @size: size internal buffer size
111  */
112 struct iwl_fw_ini_region_internal_buffer {
113 	__le32 alloc_id;
114 	__le32 base_addr;
115 	__le32 size;
116 } __packed; /* FW_TLV_DEBUG_REGION_INTERNAL_BUFFER_API_S_VER_1 */
117 
118 /**
119  * struct iwl_fw_ini_region_tlv - region TLV
120  *
121  * Configures parameters for region data collection
122  *
123  * @hdr: debug header
124  * @id: region id. Max id is &IWL_FW_INI_MAX_REGION_ID
125  * @type: region type. One of &enum iwl_fw_ini_region_type
126  * @sub_type: region sub type
127  * @sub_type_ver: region sub type version
128  * @reserved: not in use
129  * @name: region name
130  * @dev_addr: device address configuration. Used by
131  *	&IWL_FW_INI_REGION_DEVICE_MEMORY, &IWL_FW_INI_REGION_PERIPHERY_MAC,
132  *	&IWL_FW_INI_REGION_PERIPHERY_PHY, &IWL_FW_INI_REGION_PERIPHERY_AUX,
133  *	&IWL_FW_INI_REGION_PAGING, &IWL_FW_INI_REGION_CSR,
134  *	&IWL_FW_INI_REGION_DRAM_IMR and &IWL_FW_INI_REGION_PCI_IOSF_CONFIG
135  *	&IWL_FW_INI_REGION_DBGI_SRAM, &FW_TLV_DEBUG_REGION_TYPE_DBGI_SRAM,
136  * @fifos: fifos configuration. Used by &IWL_FW_INI_REGION_TXF and
137  *	&IWL_FW_INI_REGION_RXF
138  * @err_table: error table configuration. Used by
139  *	IWL_FW_INI_REGION_LMAC_ERROR_TABLE and
140  *	IWL_FW_INI_REGION_UMAC_ERROR_TABLE
141  * @internal_buffer: internal monitor buffer configuration. Used by
142  *	&IWL_FW_INI_REGION_INTERNAL_BUFFER
143  * @dram_alloc_id: dram allocation id. One of &enum iwl_fw_ini_allocation_id.
144  *	Used by &IWL_FW_INI_REGION_DRAM_BUFFER
145  * @tlv_mask: tlv collection mask. Used by &IWL_FW_INI_REGION_TLV
146  * @addrs: array of addresses attached to the end of the region tlv
147  */
148 struct iwl_fw_ini_region_tlv {
149 	struct iwl_fw_ini_header hdr;
150 	__le32 id;
151 	u8 type;
152 	u8 sub_type;
153 	u8 sub_type_ver;
154 	u8 reserved;
155 	u8 name[IWL_FW_INI_MAX_NAME];
156 	union {
157 		struct iwl_fw_ini_region_dev_addr dev_addr;
158 		struct iwl_fw_ini_region_fifos fifos;
159 		struct iwl_fw_ini_region_err_table err_table;
160 		struct iwl_fw_ini_region_internal_buffer internal_buffer;
161 		struct iwl_fw_ini_region_special_device_memory special_mem;
162 		__le32 dram_alloc_id;
163 		__le32 tlv_mask;
164 	}; /* FW_TLV_DEBUG_REGION_CONF_PARAMS_API_U_VER_1 */
165 	__le32 addrs[];
166 } __packed; /* FW_TLV_DEBUG_REGION_API_S_VER_1 */
167 
168 /**
169  * struct iwl_fw_ini_debug_info_tlv
170  *
171  * debug configuration name for a specific image
172  *
173  * @hdr: debug header
174  * @image_type: image type
175  * @debug_cfg_name: debug configuration name
176  */
177 struct iwl_fw_ini_debug_info_tlv {
178 	struct iwl_fw_ini_header hdr;
179 	__le32 image_type;
180 	u8 debug_cfg_name[IWL_FW_INI_MAX_CFG_NAME];
181 } __packed; /* FW_TLV_DEBUG_INFO_API_S_VER_1 */
182 
183 /**
184  * struct iwl_fw_ini_allocation_tlv - Allocates DRAM buffers
185  *
186  * @hdr: debug header
187  * @alloc_id: allocation id. One of &enum iwl_fw_ini_allocation_id
188  * @buf_location: buffer location. One of &enum iwl_fw_ini_buffer_location
189  * @req_size: requested buffer size
190  * @max_frags_num: maximum number of fragments
191  * @min_size: minimum buffer size
192  */
193 struct iwl_fw_ini_allocation_tlv {
194 	struct iwl_fw_ini_header hdr;
195 	__le32 alloc_id;
196 	__le32 buf_location;
197 	__le32 req_size;
198 	__le32 max_frags_num;
199 	__le32 min_size;
200 } __packed; /* FW_TLV_DEBUG_BUFFER_ALLOCATION_API_S_VER_1 */
201 
202 /**
203  * struct iwl_fw_ini_trigger_tlv - trigger TLV
204  *
205  * Trigger that upon firing, determines what regions to collect
206  *
207  * @hdr: debug header
208  * @time_point: time point. One of &enum iwl_fw_ini_time_point
209  * @trigger_reason: trigger reason
210  * @apply_policy: uses &enum iwl_fw_ini_trigger_apply_policy
211  * @dump_delay: delay from trigger fire to dump, in usec
212  * @occurrences: max trigger fire occurrences allowed
213  * @reserved: unused
214  * @ignore_consec: ignore consecutive triggers, in usec
215  * @reset_fw: if non zero, will reset and reload the FW
216  * @multi_dut: initiate debug dump data on several DUTs
217  * @regions_mask: mask of regions to collect
218  * @data: trigger data
219  */
220 struct iwl_fw_ini_trigger_tlv {
221 	struct iwl_fw_ini_header hdr;
222 	__le32 time_point;
223 	__le32 trigger_reason;
224 	__le32 apply_policy;
225 	__le32 dump_delay;
226 	__le32 occurrences;
227 	__le32 reserved;
228 	__le32 ignore_consec;
229 	__le32 reset_fw;
230 	__le32 multi_dut;
231 	__le64 regions_mask;
232 	__le32 data[];
233 } __packed; /* FW_TLV_DEBUG_TRIGGER_API_S_VER_1 */
234 
235 /**
236  * struct iwl_fw_ini_hcmd_tlv - Generic Host command pass through TLV
237  *
238  * @hdr: debug header
239  * @time_point: time point. One of &enum iwl_fw_ini_time_point
240  * @period_msec: interval at which the hcmd will be sent to the FW.
241  *	Measured in msec (0 = one time command)
242  * @hcmd: a variable length host-command to be sent to apply the configuration
243  */
244 struct iwl_fw_ini_hcmd_tlv {
245 	struct iwl_fw_ini_header hdr;
246 	__le32 time_point;
247 	__le32 period_msec;
248 	struct iwl_fw_ini_hcmd hcmd;
249 } __packed; /* FW_TLV_DEBUG_HCMD_API_S_VER_1 */
250 
251 /**
252 * struct iwl_fw_ini_conf_tlv - preset configuration TLV
253 *
254 * @address: the base address
255 * @value: value to set at address
256 
257 */
258 struct iwl_fw_ini_addr_val {
259 	__le32 address;
260 	__le32 value;
261 } __packed; /* FW_TLV_DEBUG_ADDR_VALUE_VER_1 */
262 
263 /**
264  * struct iwl_fw_ini_conf_tlv - configuration TLV to set register/memory.
265  *
266  * @hdr: debug header
267  * @time_point: time point to apply config. One of &enum iwl_fw_ini_time_point
268  * @set_type: write access type preset token for time point.
269  *  one of &enum iwl_fw_ini_config_set_type
270  * @addr_offset: the offset to add to any item in address[0] field
271  * @addr_val: address value pair
272  */
273 struct iwl_fw_ini_conf_set_tlv {
274 	struct iwl_fw_ini_header hdr;
275 	__le32 time_point;
276 	__le32 set_type;
277 	__le32 addr_offset;
278 	struct iwl_fw_ini_addr_val addr_val[0];
279 } __packed; /* FW_TLV_DEBUG_CONFIG_SET_API_S_VER_1 */
280 
281 /**
282  * enum iwl_fw_ini_config_set_type
283  *
284  * @IWL_FW_INI_CONFIG_SET_TYPE_INVALID: invalid config set
285  * @IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_MAC: for PERIPHERY MAC configuration
286  * @IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_PHY: for PERIPHERY PHY configuration
287  * @IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_AUX: for PERIPHERY AUX configuration
288  * @IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_MEMORY: for DEVICE MEMORY configuration
289  * @IWL_FW_INI_CONFIG_SET_TYPE_CSR: for CSR configuration
290  * @IWL_FW_INI_CONFIG_SET_TYPE_DBGC_DRAM_ADDR: for DBGC_DRAM_ADDR configuration
291  * @IWL_FW_INI_CONFIG_SET_TYPE_PERIPH_SCRATCH_HWM: for PERIPH SCRATCH HWM configuration
292  * @IWL_FW_INI_ALLOCATION_NUM: max number of configuration supported
293 */
294 
295 enum iwl_fw_ini_config_set_type {
296 	IWL_FW_INI_CONFIG_SET_TYPE_INVALID = 0,
297 	IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_MAC,
298 	IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_PHY,
299 	IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_PERIPHERY_AUX,
300 	IWL_FW_INI_CONFIG_SET_TYPE_DEVICE_MEMORY,
301 	IWL_FW_INI_CONFIG_SET_TYPE_CSR,
302 	IWL_FW_INI_CONFIG_SET_TYPE_DBGC_DRAM_ADDR,
303 	IWL_FW_INI_CONFIG_SET_TYPE_PERIPH_SCRATCH_HWM,
304 	IWL_FW_INI_CONFIG_SET_TYPE_MAX_NUM,
305 } __packed;
306 
307 /**
308  * enum iwl_fw_ini_allocation_id
309  *
310  * @IWL_FW_INI_ALLOCATION_INVALID: invalid
311  * @IWL_FW_INI_ALLOCATION_ID_DBGC1: allocation meant for DBGC1 configuration
312  * @IWL_FW_INI_ALLOCATION_ID_DBGC2: allocation meant for DBGC2 configuration
313  * @IWL_FW_INI_ALLOCATION_ID_DBGC3: allocation meant for DBGC3 configuration
314  * @IWL_FW_INI_ALLOCATION_ID_DBGC4: allocation meant for DBGC4 configuration
315  * @IWL_FW_INI_ALLOCATION_NUM: number of allocation ids
316 */
317 enum iwl_fw_ini_allocation_id {
318 	IWL_FW_INI_ALLOCATION_INVALID,
319 	IWL_FW_INI_ALLOCATION_ID_DBGC1,
320 	IWL_FW_INI_ALLOCATION_ID_DBGC2,
321 	IWL_FW_INI_ALLOCATION_ID_DBGC3,
322 	IWL_FW_INI_ALLOCATION_ID_DBGC4,
323 	IWL_FW_INI_ALLOCATION_NUM,
324 }; /* FW_DEBUG_TLV_ALLOCATION_ID_E_VER_1 */
325 
326 /**
327  * enum iwl_fw_ini_buffer_location
328  *
329  * @IWL_FW_INI_LOCATION_INVALID: invalid
330  * @IWL_FW_INI_LOCATION_SRAM_PATH: SRAM location
331  * @IWL_FW_INI_LOCATION_DRAM_PATH: DRAM location
332  * @IWL_FW_INI_LOCATION_NPK_PATH: NPK location
333  */
334 enum iwl_fw_ini_buffer_location {
335 	IWL_FW_INI_LOCATION_INVALID,
336 	IWL_FW_INI_LOCATION_SRAM_PATH,
337 	IWL_FW_INI_LOCATION_DRAM_PATH,
338 	IWL_FW_INI_LOCATION_NPK_PATH,
339 	IWL_FW_INI_LOCATION_NUM,
340 }; /* FW_DEBUG_TLV_BUFFER_LOCATION_E_VER_1 */
341 
342 /**
343  * enum iwl_fw_ini_region_type
344  *
345  * @IWL_FW_INI_REGION_INVALID: invalid
346  * @IWL_FW_INI_REGION_TLV: uCode and debug TLVs
347  * @IWL_FW_INI_REGION_INTERNAL_BUFFER: monitor SMEM buffer
348  * @IWL_FW_INI_REGION_DRAM_BUFFER: monitor DRAM buffer
349  * @IWL_FW_INI_REGION_TXF: TX fifos
350  * @IWL_FW_INI_REGION_RXF: RX fifo
351  * @IWL_FW_INI_REGION_LMAC_ERROR_TABLE: lmac error table
352  * @IWL_FW_INI_REGION_UMAC_ERROR_TABLE: umac error table
353  * @IWL_FW_INI_REGION_RSP_OR_NOTIF: FW response or notification data
354  * @IWL_FW_INI_REGION_DEVICE_MEMORY: device internal memory
355  * @IWL_FW_INI_REGION_PERIPHERY_MAC: periphery registers of MAC
356  * @IWL_FW_INI_REGION_PERIPHERY_PHY: periphery registers of PHY
357  * @IWL_FW_INI_REGION_PERIPHERY_AUX: periphery registers of AUX
358  * @IWL_FW_INI_REGION_PAGING: paging memory
359  * @IWL_FW_INI_REGION_CSR: CSR registers
360  * @IWL_FW_INI_REGION_DRAM_IMR: IMR memory
361  * @IWL_FW_INI_REGION_PCI_IOSF_CONFIG: PCI/IOSF config
362  * @IWL_FW_INI_REGION_SPECIAL_DEVICE_MEMORY: special device memory
363  * @IWL_FW_INI_REGION_DBGI_SRAM: periphery registers of DBGI SRAM
364  * @IWL_FW_INI_REGION_NUM: number of region types
365  */
366 enum iwl_fw_ini_region_type {
367 	IWL_FW_INI_REGION_INVALID,
368 	IWL_FW_INI_REGION_TLV,
369 	IWL_FW_INI_REGION_INTERNAL_BUFFER,
370 	IWL_FW_INI_REGION_DRAM_BUFFER,
371 	IWL_FW_INI_REGION_TXF,
372 	IWL_FW_INI_REGION_RXF,
373 	IWL_FW_INI_REGION_LMAC_ERROR_TABLE,
374 	IWL_FW_INI_REGION_UMAC_ERROR_TABLE,
375 	IWL_FW_INI_REGION_RSP_OR_NOTIF,
376 	IWL_FW_INI_REGION_DEVICE_MEMORY,
377 	IWL_FW_INI_REGION_PERIPHERY_MAC,
378 	IWL_FW_INI_REGION_PERIPHERY_PHY,
379 	IWL_FW_INI_REGION_PERIPHERY_AUX,
380 	IWL_FW_INI_REGION_PAGING,
381 	IWL_FW_INI_REGION_CSR,
382 	IWL_FW_INI_REGION_DRAM_IMR,
383 	IWL_FW_INI_REGION_PCI_IOSF_CONFIG,
384 	IWL_FW_INI_REGION_SPECIAL_DEVICE_MEMORY,
385 	IWL_FW_INI_REGION_DBGI_SRAM,
386 	IWL_FW_INI_REGION_NUM
387 }; /* FW_TLV_DEBUG_REGION_TYPE_API_E */
388 
389 enum iwl_fw_ini_region_device_memory_subtype {
390 	IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_HW_SMEM = 1,
391 	IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_UMAC_ERROR_TABLE = 5,
392 	IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_LMAC_1_ERROR_TABLE = 7,
393 	IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_LMAC_2_ERROR_TABLE = 10,
394 	IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_TCM_1_ERROR_TABLE = 14,
395 	IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_TCM_2_ERROR_TABLE = 16,
396 	IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_RCM_1_ERROR_TABLE = 18,
397 	IWL_FW_INI_REGION_DEVICE_MEMORY_SUBTYPE_RCM_2_ERROR_TABLE = 20,
398 }; /* FW_TLV_DEBUG_REGION_DEVICE_MEMORY_SUBTYPE_API_E */
399 
400 /**
401  * enum iwl_fw_ini_time_point
402  *
403  * Hard coded time points in which the driver can send hcmd or perform dump
404  * collection
405  *
406  * @IWL_FW_INI_TIME_POINT_EARLY: pre loading the FW
407  * @IWL_FW_INI_TIME_POINT_AFTER_ALIVE: first cmd from host after alive notif
408  * @IWL_FW_INI_TIME_POINT_POST_INIT: last cmd in series of init sequence
409  * @IWL_FW_INI_TIME_POINT_FW_ASSERT: FW assert
410  * @IWL_FW_INI_TIME_POINT_FW_HW_ERROR: FW HW error
411  * @IWL_FW_INI_TIME_POINT_FW_TFD_Q_HANG: TFD queue hang
412  * @IWL_FW_INI_TIME_POINT_FW_DHC_NOTIFICATION: DHC cmd response and notif
413  * @IWL_FW_INI_TIME_POINT_FW_RSP_OR_NOTIF: FW response or notification.
414  *	data field holds id and group
415  * @IWL_FW_INI_TIME_POINT_USER_TRIGGER: user trigger time point
416  * @IWL_FW_INI_TIME_POINT_PERIODIC: periodic timepoint that fires in constant
417  *	intervals. data field holds the interval time in msec
418  * @IWL_FW_INI_TIME_POINT_RESERVED: reserved
419  * @IWL_FW_INI_TIME_POINT_HOST_ASSERT: Unused
420  * @IWL_FW_INI_TIME_POINT_HOST_ALIVE_TIMEOUT: alive timeout
421  * @IWL_FW_INI_TIME_POINT_HOST_DEVICE_ENABLE: device enable
422  * @IWL_FW_INI_TIME_POINT_HOST_DEVICE_DISABLE: device disable
423  * @IWL_FW_INI_TIME_POINT_HOST_D3_START: D3 start
424  * @IWL_FW_INI_TIME_POINT_HOST_D3_END: D3 end
425  * @IWL_FW_INI_TIME_POINT_MISSED_BEACONS: missed beacons
426  * @IWL_FW_INI_TIME_POINT_ASSOC_FAILED: association failure
427  * @IWL_FW_INI_TIME_POINT_TX_FAILED: Tx frame failed
428  * @IWL_FW_INI_TIME_POINT_TX_WFD_ACTION_FRAME_FAILED: wifi direct action
429  *	frame failed
430  * @IWL_FW_INI_TIME_POINT_TX_LATENCY_THRESHOLD: Tx latency threshold
431  * @IWL_FW_INI_TIME_POINT_HANG_OCCURRED: hang occurred
432  * @IWL_FW_INI_TIME_POINT_EAPOL_FAILED: EAPOL failed
433  * @IWL_FW_INI_TIME_POINT_FAKE_TX: fake Tx
434  * @IWL_FW_INI_TIME_POINT_DEASSOC: de association
435  * @IWL_FW_INI_TIME_POINT_NUM: number of time points
436  */
437 enum iwl_fw_ini_time_point {
438 	IWL_FW_INI_TIME_POINT_INVALID,
439 	IWL_FW_INI_TIME_POINT_EARLY,
440 	IWL_FW_INI_TIME_POINT_AFTER_ALIVE,
441 	IWL_FW_INI_TIME_POINT_POST_INIT,
442 	IWL_FW_INI_TIME_POINT_FW_ASSERT,
443 	IWL_FW_INI_TIME_POINT_FW_HW_ERROR,
444 	IWL_FW_INI_TIME_POINT_FW_TFD_Q_HANG,
445 	IWL_FW_INI_TIME_POINT_FW_DHC_NOTIFICATION,
446 	IWL_FW_INI_TIME_POINT_FW_RSP_OR_NOTIF,
447 	IWL_FW_INI_TIME_POINT_USER_TRIGGER,
448 	IWL_FW_INI_TIME_POINT_PERIODIC,
449 	IWL_FW_INI_TIME_POINT_RESERVED,
450 	IWL_FW_INI_TIME_POINT_HOST_ASSERT,
451 	IWL_FW_INI_TIME_POINT_HOST_ALIVE_TIMEOUT,
452 	IWL_FW_INI_TIME_POINT_HOST_DEVICE_ENABLE,
453 	IWL_FW_INI_TIME_POINT_HOST_DEVICE_DISABLE,
454 	IWL_FW_INI_TIME_POINT_HOST_D3_START,
455 	IWL_FW_INI_TIME_POINT_HOST_D3_END,
456 	IWL_FW_INI_TIME_POINT_MISSED_BEACONS,
457 	IWL_FW_INI_TIME_POINT_ASSOC_FAILED,
458 	IWL_FW_INI_TIME_POINT_TX_FAILED,
459 	IWL_FW_INI_TIME_POINT_TX_WFD_ACTION_FRAME_FAILED,
460 	IWL_FW_INI_TIME_POINT_TX_LATENCY_THRESHOLD,
461 	IWL_FW_INI_TIME_POINT_HANG_OCCURRED,
462 	IWL_FW_INI_TIME_POINT_EAPOL_FAILED,
463 	IWL_FW_INI_TIME_POINT_FAKE_TX,
464 	IWL_FW_INI_TIME_POINT_DEASSOC,
465 	IWL_FW_INI_TIME_POINT_NUM,
466 }; /* FW_TLV_DEBUG_TIME_POINT_API_E */
467 
468 /**
469  * enum iwl_fw_ini_trigger_apply_policy - Determines how to apply triggers
470  *
471  * @IWL_FW_INI_APPLY_POLICY_MATCH_TIME_POINT: match by time point
472  * @IWL_FW_INI_APPLY_POLICY_MATCH_DATA: match by trigger data
473  * @IWL_FW_INI_APPLY_POLICY_OVERRIDE_REGIONS: override regions mask.
474  *	Append otherwise
475  * @IWL_FW_INI_APPLY_POLICY_OVERRIDE_CFG: override trigger configuration
476  * @IWL_FW_INI_APPLY_POLICY_OVERRIDE_DATA: override trigger data.
477  *	Append otherwise
478  */
479 enum iwl_fw_ini_trigger_apply_policy {
480 	IWL_FW_INI_APPLY_POLICY_MATCH_TIME_POINT	= BIT(0),
481 	IWL_FW_INI_APPLY_POLICY_MATCH_DATA		= BIT(1),
482 	IWL_FW_INI_APPLY_POLICY_OVERRIDE_REGIONS	= BIT(8),
483 	IWL_FW_INI_APPLY_POLICY_OVERRIDE_CFG		= BIT(9),
484 	IWL_FW_INI_APPLY_POLICY_OVERRIDE_DATA		= BIT(10),
485 };
486 
487 /**
488  * enum iwl_fw_ini_trigger_reset_fw_policy - Determines how to handle reset
489  *
490  * @IWL_FW_INI_RESET_FW_MODE_NOTHING: do not stop FW and reload (default)
491  * @IWL_FW_INI_RESET_FW_MODE_STOP_FW_ONLY: stop FW without reload FW
492  * @IWL_FW_INI_RESET_FW_MODE_STOP_AND_RELOAD_FW: stop FW with reload FW
493  */
494 enum iwl_fw_ini_trigger_reset_fw_policy {
495 	IWL_FW_INI_RESET_FW_MODE_NOTHING = 0,
496 	IWL_FW_INI_RESET_FW_MODE_STOP_FW_ONLY,
497 	IWL_FW_INI_RESET_FW_MODE_STOP_AND_RELOAD_FW
498 };
499 #endif
500