xref: /linux/drivers/net/wireless/intel/iwlwifi/fw/api/d3.h (revision f7c595c9d9f4cce9ec335f0d3c5d875bb547f9d5)
1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2 /*
3  * Copyright (C) 2012-2014, 2018-2025 Intel Corporation
4  * Copyright (C) 2013-2014 Intel Mobile Communications GmbH
5  * Copyright (C) 2015-2017 Intel Deutschland GmbH
6  */
7 #ifndef __iwl_fw_api_d3_h__
8 #define __iwl_fw_api_d3_h__
9 #include <iwl-trans.h>
10 
11 /**
12  * enum iwl_d0i3_flags - d0i3 flags
13  * @IWL_D0I3_RESET_REQUIRE: FW require reset upon resume
14  */
15 enum iwl_d0i3_flags {
16 	IWL_D0I3_RESET_REQUIRE = BIT(0),
17 };
18 
19 /**
20  * enum iwl_d3_wakeup_flags - D3 manager wakeup flags
21  * @IWL_WAKEUP_D3_CONFIG_FW_ERROR: wake up on firmware sysassert
22  * @IWL_WAKEUP_D3_HOST_TIMER: wake up on host timer expiry
23  */
24 enum iwl_d3_wakeup_flags {
25 	IWL_WAKEUP_D3_CONFIG_FW_ERROR	= BIT(0),
26 	IWL_WAKEUP_D3_HOST_TIMER	= BIT(1),
27 }; /* D3_MANAGER_WAKEUP_CONFIG_API_E_VER_3 */
28 
29 /**
30  * struct iwl_d3_manager_config - D3 manager configuration command
31  * @min_sleep_time: minimum sleep time (in usec)
32  * @wakeup_flags: wakeup flags, see &enum iwl_d3_wakeup_flags
33  * @wakeup_host_timer: force wakeup after this many seconds
34  *
35  * The structure is used for the D3_CONFIG_CMD command.
36  */
37 struct iwl_d3_manager_config {
38 	__le32 min_sleep_time;
39 	__le32 wakeup_flags;
40 	__le32 wakeup_host_timer;
41 } __packed; /* D3_MANAGER_CONFIG_CMD_S_VER_4 */
42 
43 
44 /* TODO: OFFLOADS_QUERY_API_S_VER_1 */
45 
46 /**
47  * enum iwl_proto_offloads - enabled protocol offloads
48  * @IWL_D3_PROTO_OFFLOAD_ARP: ARP data is enabled
49  * @IWL_D3_PROTO_OFFLOAD_NS: NS (Neighbor Solicitation) is enabled
50  * @IWL_D3_PROTO_IPV4_VALID: IPv4 data is valid
51  * @IWL_D3_PROTO_IPV6_VALID: IPv6 data is valid
52  * @IWL_D3_PROTO_OFFLOAD_BTM: BTM offload is enabled
53  */
54 enum iwl_proto_offloads {
55 	IWL_D3_PROTO_OFFLOAD_ARP = BIT(0),
56 	IWL_D3_PROTO_OFFLOAD_NS = BIT(1),
57 	IWL_D3_PROTO_IPV4_VALID = BIT(2),
58 	IWL_D3_PROTO_IPV6_VALID = BIT(3),
59 	IWL_D3_PROTO_OFFLOAD_BTM = BIT(4),
60 };
61 
62 #define IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_V1	2
63 #define IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_V2	6
64 #define IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_V3L	12
65 #define IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_V3S	4
66 #define IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_MAX	12
67 
68 #define IWL_PROTO_OFFLOAD_NUM_NS_CONFIG_V3L	4
69 #define IWL_PROTO_OFFLOAD_NUM_NS_CONFIG_V3S	2
70 
71 /**
72  * struct iwl_proto_offload_cmd_common - ARP/NS offload common part
73  * @enabled: enable flags
74  * @remote_ipv4_addr: remote address to answer to (or zero if all)
75  * @host_ipv4_addr: our IPv4 address to respond to queries for
76  * @arp_mac_addr: our MAC address for ARP responses
77  * @reserved: unused
78  */
79 struct iwl_proto_offload_cmd_common {
80 	__le32 enabled;
81 	__be32 remote_ipv4_addr;
82 	__be32 host_ipv4_addr;
83 	u8 arp_mac_addr[ETH_ALEN];
84 	__le16 reserved;
85 } __packed;
86 
87 /**
88  * struct iwl_proto_offload_cmd_v1 - ARP/NS offload configuration
89  * @common: common/IPv4 configuration
90  * @remote_ipv6_addr: remote address to answer to (or zero if all)
91  * @solicited_node_ipv6_addr: broken -- solicited node address exists
92  *	for each target address
93  * @target_ipv6_addr: our target addresses
94  * @ndp_mac_addr: neighbor solicitation response MAC address
95  * @reserved2: reserved
96  */
97 struct iwl_proto_offload_cmd_v1 {
98 	struct iwl_proto_offload_cmd_common common;
99 	u8 remote_ipv6_addr[16];
100 	u8 solicited_node_ipv6_addr[16];
101 	u8 target_ipv6_addr[IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_V1][16];
102 	u8 ndp_mac_addr[ETH_ALEN];
103 	__le16 reserved2;
104 } __packed; /* PROT_OFFLOAD_CONFIG_CMD_DB_S_VER_1 */
105 
106 /**
107  * struct iwl_proto_offload_cmd_v2 - ARP/NS offload configuration
108  * @common: common/IPv4 configuration
109  * @remote_ipv6_addr: remote address to answer to (or zero if all)
110  * @solicited_node_ipv6_addr: broken -- solicited node address exists
111  *	for each target address
112  * @target_ipv6_addr: our target addresses
113  * @ndp_mac_addr: neighbor solicitation response MAC address
114  * @num_valid_ipv6_addrs: number of valid IPv6 addresses
115  * @reserved2: reserved
116  */
117 struct iwl_proto_offload_cmd_v2 {
118 	struct iwl_proto_offload_cmd_common common;
119 	u8 remote_ipv6_addr[16];
120 	u8 solicited_node_ipv6_addr[16];
121 	u8 target_ipv6_addr[IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_V2][16];
122 	u8 ndp_mac_addr[ETH_ALEN];
123 	u8 num_valid_ipv6_addrs;
124 	u8 reserved2[3];
125 } __packed; /* PROT_OFFLOAD_CONFIG_CMD_DB_S_VER_2 */
126 
127 struct iwl_ns_config {
128 	struct in6_addr source_ipv6_addr;
129 	struct in6_addr dest_ipv6_addr;
130 	u8 target_mac_addr[ETH_ALEN];
131 	__le16 reserved;
132 } __packed; /* NS_OFFLOAD_CONFIG */
133 
134 struct iwl_targ_addr {
135 	struct in6_addr addr;
136 	__le32 config_num;
137 } __packed; /* TARGET_IPV6_ADDRESS */
138 
139 /**
140  * struct iwl_proto_offload_cmd_v3_small - ARP/NS offload configuration
141  * @common: common/IPv4 configuration
142  * @num_valid_ipv6_addrs: number of valid IPv6 addresses
143  * @targ_addrs: target IPv6 addresses
144  * @ns_config: NS offload configurations
145  */
146 struct iwl_proto_offload_cmd_v3_small {
147 	struct iwl_proto_offload_cmd_common common;
148 	__le32 num_valid_ipv6_addrs;
149 	struct iwl_targ_addr targ_addrs[IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_V3S];
150 	struct iwl_ns_config ns_config[IWL_PROTO_OFFLOAD_NUM_NS_CONFIG_V3S];
151 } __packed; /* PROT_OFFLOAD_CONFIG_CMD_DB_S_VER_3 */
152 
153 /**
154  * struct iwl_proto_offload_cmd_v3_large - ARP/NS offload configuration
155  * @common: common/IPv4 configuration
156  * @num_valid_ipv6_addrs: number of valid IPv6 addresses
157  * @targ_addrs: target IPv6 addresses
158  * @ns_config: NS offload configurations
159  */
160 struct iwl_proto_offload_cmd_v3_large {
161 	struct iwl_proto_offload_cmd_common common;
162 	__le32 num_valid_ipv6_addrs;
163 	struct iwl_targ_addr targ_addrs[IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_V3L];
164 	struct iwl_ns_config ns_config[IWL_PROTO_OFFLOAD_NUM_NS_CONFIG_V3L];
165 } __packed; /* PROT_OFFLOAD_CONFIG_CMD_DB_S_VER_3 */
166 
167 /**
168  * struct iwl_proto_offload_cmd_v4 - ARP/NS offload configuration
169  * @sta_id: station id
170  * @common: common/IPv4 configuration
171  * @num_valid_ipv6_addrs: number of valid IPv6 addresses
172  * @targ_addrs: target IPv6 addresses
173  * @ns_config: NS offload configurations
174  */
175 struct iwl_proto_offload_cmd_v4 {
176 	__le32 sta_id;
177 	struct iwl_proto_offload_cmd_common common;
178 	__le32 num_valid_ipv6_addrs;
179 	struct iwl_targ_addr targ_addrs[IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_V3L];
180 	struct iwl_ns_config ns_config[IWL_PROTO_OFFLOAD_NUM_NS_CONFIG_V3L];
181 } __packed; /* PROT_OFFLOAD_CONFIG_CMD_DB_S_VER_4 */
182 
183 /*
184  * WOWLAN_PATTERNS
185  */
186 #define IWL_WOWLAN_MIN_PATTERN_LEN	16
187 #define IWL_WOWLAN_MAX_PATTERN_LEN	128
188 
189 struct iwl_wowlan_pattern_v1 {
190 	u8 mask[IWL_WOWLAN_MAX_PATTERN_LEN / 8];
191 	u8 pattern[IWL_WOWLAN_MAX_PATTERN_LEN];
192 	u8 mask_size;
193 	u8 pattern_size;
194 	__le16 reserved;
195 } __packed; /* WOWLAN_PATTERN_API_S_VER_1 */
196 
197 #define IWL_WOWLAN_MAX_PATTERNS	20
198 
199 /**
200  * struct iwl_wowlan_patterns_cmd_v1 - WoWLAN wakeup patterns
201  */
202 struct iwl_wowlan_patterns_cmd_v1 {
203 	/**
204 	 * @n_patterns: number of patterns
205 	 */
206 	__le32 n_patterns;
207 
208 	/**
209 	 * @patterns: the patterns, array length in @n_patterns
210 	 */
211 	struct iwl_wowlan_pattern_v1 patterns[];
212 } __packed; /* WOWLAN_PATTERN_ARRAY_API_S_VER_1 */
213 
214 #define IPV4_ADDR_SIZE	4
215 #define IPV6_ADDR_SIZE	16
216 
217 enum iwl_wowlan_pattern_type {
218 	WOWLAN_PATTERN_TYPE_BITMASK,
219 	WOWLAN_PATTERN_TYPE_IPV4_TCP_SYN,
220 	WOWLAN_PATTERN_TYPE_IPV6_TCP_SYN,
221 	WOWLAN_PATTERN_TYPE_IPV4_TCP_SYN_WILDCARD,
222 	WOWLAN_PATTERN_TYPE_IPV6_TCP_SYN_WILDCARD,
223 }; /* WOWLAN_PATTERN_TYPE_API_E_VER_1 */
224 
225 /**
226  * struct iwl_wowlan_ipv4_tcp_syn - WoWLAN IPv4 TCP SYN pattern data
227  */
228 struct iwl_wowlan_ipv4_tcp_syn {
229 	/**
230 	 * @src_addr: source IP address to match
231 	 */
232 	u8 src_addr[IPV4_ADDR_SIZE];
233 
234 	/**
235 	 * @dst_addr: destination IP address to match
236 	 */
237 	u8 dst_addr[IPV4_ADDR_SIZE];
238 
239 	/**
240 	 * @src_port: source TCP port to match
241 	 */
242 	__le16 src_port;
243 
244 	/**
245 	 * @dst_port: destination TCP port to match
246 	 */
247 	__le16 dst_port;
248 } __packed; /* WOWLAN_IPV4_TCP_SYN_API_S_VER_1 */
249 
250 /**
251  * struct iwl_wowlan_ipv6_tcp_syn - WoWLAN Ipv6 TCP SYN pattern data
252  */
253 struct iwl_wowlan_ipv6_tcp_syn {
254 	/**
255 	 * @src_addr: source IP address to match
256 	 */
257 	u8 src_addr[IPV6_ADDR_SIZE];
258 
259 	/**
260 	 * @dst_addr: destination IP address to match
261 	 */
262 	u8 dst_addr[IPV6_ADDR_SIZE];
263 
264 	/**
265 	 * @src_port: source TCP port to match
266 	 */
267 	__le16 src_port;
268 
269 	/**
270 	 * @dst_port: destination TCP port to match
271 	 */
272 	__le16 dst_port;
273 } __packed; /* WOWLAN_IPV6_TCP_SYN_API_S_VER_1 */
274 
275 /**
276  * union iwl_wowlan_pattern_data - Data for the different pattern types
277  *
278  * If wildcard addresses/ports are to be used, the union can be left
279  * undefined.
280  */
281 union iwl_wowlan_pattern_data {
282 	/**
283 	 * @bitmask: bitmask pattern data
284 	 */
285 	struct iwl_wowlan_pattern_v1 bitmask;
286 
287 	/**
288 	 * @ipv4_tcp_syn: IPv4 TCP SYN pattern data
289 	 */
290 	struct iwl_wowlan_ipv4_tcp_syn ipv4_tcp_syn;
291 
292 	/**
293 	 * @ipv6_tcp_syn: IPv6 TCP SYN pattern data
294 	 */
295 	struct iwl_wowlan_ipv6_tcp_syn ipv6_tcp_syn;
296 }; /* WOWLAN_PATTERN_API_U_VER_1 */
297 
298 /**
299  * struct iwl_wowlan_pattern_v2 - Pattern entry for the WoWLAN wakeup patterns
300  */
301 struct iwl_wowlan_pattern_v2 {
302 	/**
303 	 * @pattern_type: defines the struct type to be used in the union
304 	 */
305 	u8 pattern_type;
306 
307 	/**
308 	 * @reserved: reserved for alignment
309 	 */
310 	u8 reserved[3];
311 
312 	/**
313 	 * @u: the union containing the match data, or undefined for
314 	 *     wildcard matches
315 	 */
316 	union iwl_wowlan_pattern_data u;
317 } __packed; /* WOWLAN_PATTERN_API_S_VER_2 */
318 
319 /**
320  * struct iwl_wowlan_patterns_cmd - WoWLAN wakeup patterns command
321  */
322 struct iwl_wowlan_patterns_cmd {
323 	/**
324 	 * @n_patterns: number of patterns
325 	 */
326 	u8 n_patterns;
327 
328 	/**
329 	 * @sta_id: sta_id
330 	 */
331 	u8 sta_id;
332 
333 	/**
334 	 * @reserved: reserved for alignment
335 	 */
336 	__le16 reserved;
337 
338 	/**
339 	 * @patterns: the patterns, array length in @n_patterns
340 	 */
341 	struct iwl_wowlan_pattern_v2 patterns[];
342 } __packed; /* WOWLAN_PATTERN_ARRAY_API_S_VER_3 */
343 
344 enum iwl_wowlan_wakeup_filters {
345 	IWL_WOWLAN_WAKEUP_MAGIC_PACKET			= BIT(0),
346 	IWL_WOWLAN_WAKEUP_PATTERN_MATCH			= BIT(1),
347 	IWL_WOWLAN_WAKEUP_BEACON_MISS			= BIT(2),
348 	IWL_WOWLAN_WAKEUP_LINK_CHANGE			= BIT(3),
349 	IWL_WOWLAN_WAKEUP_GTK_REKEY_FAIL		= BIT(4),
350 	IWL_WOWLAN_WAKEUP_EAP_IDENT_REQ			= BIT(5),
351 	IWL_WOWLAN_WAKEUP_4WAY_HANDSHAKE		= BIT(6),
352 	IWL_WOWLAN_WAKEUP_ENABLE_NET_DETECT		= BIT(7),
353 	IWL_WOWLAN_WAKEUP_RF_KILL_DEASSERT		= BIT(8),
354 	IWL_WOWLAN_WAKEUP_REMOTE_LINK_LOSS		= BIT(9),
355 	IWL_WOWLAN_WAKEUP_REMOTE_SIGNATURE_TABLE	= BIT(10),
356 	IWL_WOWLAN_WAKEUP_REMOTE_TCP_EXTERNAL		= BIT(11),
357 	IWL_WOWLAN_WAKEUP_REMOTE_WAKEUP_PACKET		= BIT(12),
358 	IWL_WOWLAN_WAKEUP_IOAC_MAGIC_PACKET		= BIT(13),
359 	IWL_WOWLAN_WAKEUP_HOST_TIMER			= BIT(14),
360 	IWL_WOWLAN_WAKEUP_RX_FRAME			= BIT(15),
361 	IWL_WOWLAN_WAKEUP_BCN_FILTERING			= BIT(16),
362 }; /* WOWLAN_WAKEUP_FILTER_API_E_VER_4 */
363 
364 enum iwl_wowlan_flags {
365 	IS_11W_ASSOC		= BIT(0),
366 	ENABLE_L3_FILTERING	= BIT(1),
367 	ENABLE_NBNS_FILTERING	= BIT(2),
368 	ENABLE_DHCP_FILTERING	= BIT(3),
369 	ENABLE_STORE_BEACON	= BIT(4),
370 };
371 
372 /**
373  * struct iwl_wowlan_config_cmd_v6 - WoWLAN configuration (versions 5 and 6)
374  * @wakeup_filter: filter from &enum iwl_wowlan_wakeup_filters
375  * @non_qos_seq: non-QoS sequence counter to use next.
376  *               Reserved if the struct has version >= 6.
377  * @qos_seq: QoS sequence counters to use next
378  * @wowlan_ba_teardown_tids: bitmap of BA sessions to tear down
379  * @is_11n_connection: indicates HT connection
380  * @offloading_tid: TID reserved for firmware use
381  * @flags: extra flags, see &enum iwl_wowlan_flags
382  * @sta_id: station ID for wowlan.
383  * @reserved: reserved
384  */
385 struct iwl_wowlan_config_cmd_v6 {
386 	__le32 wakeup_filter;
387 	__le16 non_qos_seq;
388 	__le16 qos_seq[8];
389 	u8 wowlan_ba_teardown_tids;
390 	u8 is_11n_connection;
391 	u8 offloading_tid;
392 	u8 flags;
393 	u8 sta_id;
394 	u8 reserved;
395 } __packed; /* WOWLAN_CONFIG_API_S_VER_6 */
396 
397 /**
398  * struct iwl_wowlan_config_cmd - WoWLAN configuration
399  * @wakeup_filter: filter from &enum iwl_wowlan_wakeup_filters
400  * @wowlan_ba_teardown_tids: bitmap of BA sessions to tear down
401  * @is_11n_connection: indicates HT connection
402  * @offloading_tid: TID reserved for firmware use
403  * @flags: extra flags, see &enum iwl_wowlan_flags
404  * @sta_id: station ID for wowlan.
405  * @reserved: reserved
406  */
407 struct iwl_wowlan_config_cmd {
408 	__le32 wakeup_filter;
409 	u8 wowlan_ba_teardown_tids;
410 	u8 is_11n_connection;
411 	u8 offloading_tid;
412 	u8 flags;
413 	u8 sta_id;
414 	u8 reserved[3];
415 } __packed; /* WOWLAN_CONFIG_API_S_VER_7 */
416 
417 #define IWL_NUM_RSC	16
418 #define WOWLAN_KEY_MAX_SIZE	32
419 #define WOWLAN_GTK_KEYS_NUM     2
420 #define WOWLAN_IGTK_KEYS_NUM	2
421 #define WOWLAN_IGTK_MIN_INDEX	4
422 #define WOWLAN_BIGTK_KEYS_NUM	2
423 #define WOWLAN_BIGTK_MIN_INDEX	6
424 
425 /*
426  * WOWLAN_TSC_RSC_PARAMS
427  */
428 struct tkip_sc {
429 	__le16 iv16;
430 	__le16 pad;
431 	__le32 iv32;
432 } __packed; /* TKIP_SC_API_U_VER_1 */
433 
434 struct iwl_tkip_rsc_tsc {
435 	struct tkip_sc unicast_rsc[IWL_NUM_RSC];
436 	struct tkip_sc multicast_rsc[IWL_NUM_RSC];
437 	struct tkip_sc tsc;
438 } __packed; /* TKIP_TSC_RSC_API_S_VER_1 */
439 
440 struct aes_sc {
441 	__le64 pn;
442 } __packed; /* TKIP_AES_SC_API_U_VER_1 */
443 
444 struct iwl_aes_rsc_tsc {
445 	struct aes_sc unicast_rsc[IWL_NUM_RSC];
446 	struct aes_sc multicast_rsc[IWL_NUM_RSC];
447 	struct aes_sc tsc;
448 } __packed; /* AES_TSC_RSC_API_S_VER_1 */
449 
450 union iwl_all_tsc_rsc {
451 	struct iwl_tkip_rsc_tsc tkip;
452 	struct iwl_aes_rsc_tsc aes;
453 }; /* ALL_TSC_RSC_API_S_VER_2 */
454 
455 struct iwl_wowlan_rsc_tsc_params_cmd_ver_2 {
456 	union iwl_all_tsc_rsc all_tsc_rsc;
457 } __packed; /* ALL_TSC_RSC_API_S_VER_2 */
458 
459 struct iwl_wowlan_rsc_tsc_params_cmd_v4 {
460 	struct iwl_wowlan_rsc_tsc_params_cmd_ver_2 params;
461 	__le32 sta_id;
462 } __packed; /* ALL_TSC_RSC_API_S_VER_4 */
463 
464 struct iwl_wowlan_rsc_tsc_params_cmd {
465 	__le64 ucast_rsc[IWL_MAX_TID_COUNT];
466 	__le64 mcast_rsc[WOWLAN_GTK_KEYS_NUM][IWL_MAX_TID_COUNT];
467 	__le32 sta_id;
468 #define IWL_MCAST_KEY_MAP_INVALID	0xff
469 	u8 mcast_key_id_map[4];
470 } __packed; /* ALL_TSC_RSC_API_S_VER_5 */
471 
472 #define IWL_MIC_KEY_SIZE	8
473 struct iwl_mic_keys {
474 	u8 tx[IWL_MIC_KEY_SIZE];
475 	u8 rx_unicast[IWL_MIC_KEY_SIZE];
476 	u8 rx_mcast[IWL_MIC_KEY_SIZE];
477 } __packed; /* MIC_KEYS_API_S_VER_1 */
478 
479 #define IWL_P1K_SIZE		5
480 struct iwl_p1k_cache {
481 	__le16 p1k[IWL_P1K_SIZE];
482 } __packed;
483 
484 #define IWL_NUM_RX_P1K_CACHE	2
485 
486 struct iwl_wowlan_tkip_params_cmd_ver_1 {
487 	struct iwl_mic_keys mic_keys;
488 	struct iwl_p1k_cache tx;
489 	struct iwl_p1k_cache rx_uni[IWL_NUM_RX_P1K_CACHE];
490 	struct iwl_p1k_cache rx_multi[IWL_NUM_RX_P1K_CACHE];
491 } __packed; /* WOWLAN_TKIP_SETTING_API_S_VER_1 */
492 
493 struct iwl_wowlan_tkip_params_cmd {
494 	struct iwl_mic_keys mic_keys;
495 	struct iwl_p1k_cache tx;
496 	struct iwl_p1k_cache rx_uni[IWL_NUM_RX_P1K_CACHE];
497 	struct iwl_p1k_cache rx_multi[IWL_NUM_RX_P1K_CACHE];
498 	u8     reversed[2];
499 	__le32 sta_id;
500 } __packed; /* WOWLAN_TKIP_SETTING_API_S_VER_2 */
501 
502 #define IWL_KCK_MAX_SIZE	32
503 #define IWL_KEK_MAX_SIZE	32
504 
505 struct iwl_wowlan_kek_kck_material_cmd_v2 {
506 	u8	kck[IWL_KCK_MAX_SIZE];
507 	u8	kek[IWL_KEK_MAX_SIZE];
508 	__le16	kck_len;
509 	__le16	kek_len;
510 	__le64	replay_ctr;
511 } __packed; /* KEK_KCK_MATERIAL_API_S_VER_2 */
512 
513 struct iwl_wowlan_kek_kck_material_cmd_v3 {
514 	u8	kck[IWL_KCK_MAX_SIZE];
515 	u8	kek[IWL_KEK_MAX_SIZE];
516 	__le16	kck_len;
517 	__le16	kek_len;
518 	__le64	replay_ctr;
519 	__le32  akm;
520 	__le32  gtk_cipher;
521 	__le32  igtk_cipher;
522 	__le32  bigtk_cipher;
523 } __packed; /* KEK_KCK_MATERIAL_API_S_VER_3 */
524 
525 struct iwl_wowlan_kek_kck_material_cmd_v4 {
526 	__le32  sta_id;
527 	u8	kck[IWL_KCK_MAX_SIZE];
528 	u8	kek[IWL_KEK_MAX_SIZE];
529 	__le16	kck_len;
530 	__le16	kek_len;
531 	__le64	replay_ctr;
532 	__le32  akm;
533 	__le32  gtk_cipher;
534 	__le32  igtk_cipher;
535 	__le32  bigtk_cipher;
536 } __packed; /* KEK_KCK_MATERIAL_API_S_VER_4 */
537 
538 struct iwl_wowlan_get_status_cmd {
539 	__le32  sta_id;
540 } __packed; /* WOWLAN_GET_STATUSES_CMD_API_S_VER_1 */
541 
542 #define RF_KILL_INDICATOR_FOR_WOWLAN	0x87
543 
544 enum iwl_wowlan_rekey_status {
545 	IWL_WOWLAN_REKEY_POST_REKEY = 0,
546 	IWL_WOWLAN_REKEY_WHILE_REKEY = 1,
547 }; /* WOWLAN_REKEY_STATUS_API_E_VER_1 */
548 
549 enum iwl_wowlan_wakeup_reason {
550 	IWL_WOWLAN_WAKEUP_BY_NON_WIRELESS			= 0,
551 	IWL_WOWLAN_WAKEUP_BY_MAGIC_PACKET			= BIT(0),
552 	IWL_WOWLAN_WAKEUP_BY_PATTERN				= BIT(1),
553 	IWL_WOWLAN_WAKEUP_BY_DISCONNECTION_ON_MISSED_BEACON	= BIT(2),
554 	IWL_WOWLAN_WAKEUP_BY_DISCONNECTION_ON_DEAUTH		= BIT(3),
555 	IWL_WOWLAN_WAKEUP_BY_GTK_REKEY_FAILURE			= BIT(4),
556 	IWL_WOWLAN_WAKEUP_BY_RFKILL_DEASSERTED			= BIT(5),
557 	IWL_WOWLAN_WAKEUP_BY_UCODE_ERROR			= BIT(6),
558 	IWL_WOWLAN_WAKEUP_BY_EAPOL_REQUEST			= BIT(7),
559 	IWL_WOWLAN_WAKEUP_BY_FOUR_WAY_HANDSHAKE			= BIT(8),
560 	IWL_WOWLAN_WAKEUP_BY_REM_WAKE_LINK_LOSS			= BIT(9),
561 	IWL_WOWLAN_WAKEUP_BY_REM_WAKE_SIGNATURE_TABLE		= BIT(10),
562 	IWL_WOWLAN_WAKEUP_BY_REM_WAKE_TCP_EXTERNAL		= BIT(11),
563 	IWL_WOWLAN_WAKEUP_BY_REM_WAKE_WAKEUP_PACKET		= BIT(12),
564 	IWL_WOWLAN_WAKEUP_BY_IOAC_MAGIC_PACKET			= BIT(13),
565 	IWL_WOWLAN_WAKEUP_BY_D3_WAKEUP_HOST_TIMER		= BIT(14),
566 	IWL_WOWLAN_WAKEUP_BY_RXFRAME_FILTERED_IN		= BIT(15),
567 	IWL_WOWLAN_WAKEUP_BY_BEACON_FILTERED_IN			= BIT(16),
568 	IWL_WAKEUP_BY_11W_UNPROTECTED_DEAUTH_OR_DISASSOC	= BIT(17),
569 	IWL_WAKEUP_BY_PATTERN_IPV4_TCP_SYN			= BIT(18),
570 	IWL_WAKEUP_BY_PATTERN_IPV4_TCP_SYN_WILDCARD		= BIT(19),
571 	IWL_WAKEUP_BY_PATTERN_IPV6_TCP_SYN			= BIT(20),
572 	IWL_WAKEUP_BY_PATTERN_IPV6_TCP_SYN_WILDCARD		= BIT(21),
573 }; /* WOWLAN_WAKE_UP_REASON_API_E_VER_2 */
574 
575 struct iwl_wowlan_gtk_status_v1 {
576 	u8 key_index;
577 	u8 reserved[3];
578 	u8 decrypt_key[16];
579 	u8 tkip_mic_key[8];
580 	struct iwl_wowlan_rsc_tsc_params_cmd_ver_2 rsc;
581 } __packed; /* WOWLAN_GTK_MATERIAL_VER_1 */
582 
583 /**
584  * struct iwl_wowlan_gtk_status_v2 - GTK status
585  * @key: GTK material
586  * @key_len: GTK legth, if set to 0, the key is not available
587  * @key_flags: information about the key:
588  *	bits[0:1]:  key index assigned by the AP
589  *	bits[2:6]:  GTK index of the key in the internal DB
590  *	bit[7]:     Set iff this is the currently used GTK
591  * @reserved: padding
592  * @tkip_mic_key: TKIP RX MIC key
593  * @rsc: TSC RSC counters
594  */
595 struct iwl_wowlan_gtk_status_v2 {
596 	u8 key[WOWLAN_KEY_MAX_SIZE];
597 	u8 key_len;
598 	u8 key_flags;
599 	u8 reserved[2];
600 	u8 tkip_mic_key[8];
601 	struct iwl_wowlan_rsc_tsc_params_cmd_ver_2 rsc;
602 } __packed; /* WOWLAN_GTK_MATERIAL_VER_2 */
603 
604 /**
605  * struct iwl_wowlan_all_rsc_tsc_v5 - key counters
606  * @ucast_rsc: unicast RSC values
607  * @mcast_rsc: multicast RSC values (per key map value)
608  * @sta_id: station ID
609  * @mcast_key_id_map: map of key id to @mcast_rsc entry
610  */
611 struct iwl_wowlan_all_rsc_tsc_v5 {
612 	__le64 ucast_rsc[IWL_MAX_TID_COUNT];
613 	__le64 mcast_rsc[2][IWL_MAX_TID_COUNT];
614 	__le32 sta_id;
615 	u8 mcast_key_id_map[4];
616 } __packed; /* ALL_TSC_RSC_API_S_VER_5 */
617 
618 /**
619  * struct iwl_wowlan_gtk_status_v3 - GTK status
620  * @key: GTK material
621  * @key_len: GTK length, if set to 0, the key is not available
622  * @key_flags: information about the key:
623  *	bits[0:1]:  key index assigned by the AP
624  *	bits[2:6]:  GTK index of the key in the internal DB
625  *	bit[7]:     Set iff this is the currently used GTK
626  * @reserved: padding
627  * @tkip_mic_key: TKIP RX MIC key
628  * @sc: RSC/TSC counters
629  */
630 struct iwl_wowlan_gtk_status_v3 {
631 	u8 key[WOWLAN_KEY_MAX_SIZE];
632 	u8 key_len;
633 	u8 key_flags;
634 	u8 reserved[2];
635 	u8 tkip_mic_key[IWL_MIC_KEY_SIZE];
636 	struct iwl_wowlan_all_rsc_tsc_v5 sc;
637 } __packed; /* WOWLAN_GTK_MATERIAL_VER_3 */
638 
639 #define IWL_WOWLAN_GTK_IDX_MASK		(BIT(0) | BIT(1))
640 #define IWL_WOWLAN_IGTK_BIGTK_IDX_MASK	(BIT(0))
641 
642 /**
643  * struct iwl_wowlan_igtk_status - IGTK status
644  * @key: IGTK material
645  * @ipn: the IGTK packet number (replay counter)
646  * @key_len: IGTK length, if set to 0, the key is not available
647  * @key_flags: information about the key:
648  *	bits[0]: key index assigned by the AP (0: index 4, 1: index 5)
649  *	(0: index 6, 1: index 7 with bigtk)
650  *	bits[1:5]: IGTK index of the key in the internal DB
651  *	bit[6]: Set iff this is the currently used IGTK
652  */
653 struct iwl_wowlan_igtk_status {
654 	u8 key[WOWLAN_KEY_MAX_SIZE];
655 	u8 ipn[6];
656 	u8 key_len;
657 	u8 key_flags;
658 } __packed; /* WOWLAN_IGTK_MATERIAL_VER_1 */
659 
660 /**
661  * struct iwl_wowlan_status_v6 - WoWLAN status
662  * @gtk: GTK data
663  * @replay_ctr: GTK rekey replay counter
664  * @pattern_number: number of the matched pattern
665  * @non_qos_seq_ctr: non-QoS sequence counter to use next
666  * @qos_seq_ctr: QoS sequence counters to use next
667  * @wakeup_reasons: wakeup reasons, see &enum iwl_wowlan_wakeup_reason
668  * @num_of_gtk_rekeys: number of GTK rekeys
669  * @transmitted_ndps: number of transmitted neighbor discovery packets
670  * @received_beacons: number of received beacons
671  * @wake_packet_length: wakeup packet length
672  * @wake_packet_bufsize: wakeup packet buffer size
673  * @wake_packet: wakeup packet
674  */
675 struct iwl_wowlan_status_v6 {
676 	struct iwl_wowlan_gtk_status_v1 gtk;
677 	__le64 replay_ctr;
678 	__le16 pattern_number;
679 	__le16 non_qos_seq_ctr;
680 	__le16 qos_seq_ctr[8];
681 	__le32 wakeup_reasons;
682 	__le32 num_of_gtk_rekeys;
683 	__le32 transmitted_ndps;
684 	__le32 received_beacons;
685 	__le32 wake_packet_length;
686 	__le32 wake_packet_bufsize;
687 	u8 wake_packet[]; /* can be truncated from _length to _bufsize */
688 } __packed; /* WOWLAN_STATUSES_API_S_VER_6 */
689 
690 /**
691  * struct iwl_wowlan_status_v7 - WoWLAN status
692  * @gtk: GTK data
693  * @igtk: IGTK data
694  * @replay_ctr: GTK rekey replay counter
695  * @pattern_number: number of the matched pattern
696  * @non_qos_seq_ctr: non-QoS sequence counter to use next
697  * @qos_seq_ctr: QoS sequence counters to use next
698  * @wakeup_reasons: wakeup reasons, see &enum iwl_wowlan_wakeup_reason
699  * @num_of_gtk_rekeys: number of GTK rekeys
700  * @transmitted_ndps: number of transmitted neighbor discovery packets
701  * @received_beacons: number of received beacons
702  * @wake_packet_length: wakeup packet length
703  * @wake_packet_bufsize: wakeup packet buffer size
704  * @wake_packet: wakeup packet
705  */
706 struct iwl_wowlan_status_v7 {
707 	struct iwl_wowlan_gtk_status_v2 gtk[WOWLAN_GTK_KEYS_NUM];
708 	struct iwl_wowlan_igtk_status igtk[WOWLAN_IGTK_KEYS_NUM];
709 	__le64 replay_ctr;
710 	__le16 pattern_number;
711 	__le16 non_qos_seq_ctr;
712 	__le16 qos_seq_ctr[8];
713 	__le32 wakeup_reasons;
714 	__le32 num_of_gtk_rekeys;
715 	__le32 transmitted_ndps;
716 	__le32 received_beacons;
717 	__le32 wake_packet_length;
718 	__le32 wake_packet_bufsize;
719 	u8 wake_packet[]; /* can be truncated from _length to _bufsize */
720 } __packed; /* WOWLAN_STATUSES_API_S_VER_7 */
721 
722 /**
723  * struct iwl_wowlan_status_v9 - WoWLAN status (versions 9 and 10)
724  * @gtk: GTK data
725  * @igtk: IGTK data
726  * @replay_ctr: GTK rekey replay counter
727  * @pattern_number: number of the matched pattern
728  * @non_qos_seq_ctr: non-QoS sequence counter to use next.
729  *                   Reserved if the struct has version >= 10.
730  * @qos_seq_ctr: QoS sequence counters to use next
731  * @wakeup_reasons: wakeup reasons, see &enum iwl_wowlan_wakeup_reason
732  * @num_of_gtk_rekeys: number of GTK rekeys
733  * @transmitted_ndps: number of transmitted neighbor discovery packets
734  * @received_beacons: number of received beacons
735  * @wake_packet_length: wakeup packet length
736  * @wake_packet_bufsize: wakeup packet buffer size
737  * @tid_tear_down: bit mask of tids whose BA sessions were closed
738  *		   in suspend state
739  * @reserved: unused
740  * @wake_packet: wakeup packet
741  */
742 struct iwl_wowlan_status_v9 {
743 	struct iwl_wowlan_gtk_status_v2 gtk[WOWLAN_GTK_KEYS_NUM];
744 	struct iwl_wowlan_igtk_status igtk[WOWLAN_IGTK_KEYS_NUM];
745 	__le64 replay_ctr;
746 	__le16 pattern_number;
747 	__le16 non_qos_seq_ctr;
748 	__le16 qos_seq_ctr[8];
749 	__le32 wakeup_reasons;
750 	__le32 num_of_gtk_rekeys;
751 	__le32 transmitted_ndps;
752 	__le32 received_beacons;
753 	__le32 wake_packet_length;
754 	__le32 wake_packet_bufsize;
755 	u8 tid_tear_down;
756 	u8 reserved[3];
757 	u8 wake_packet[]; /* can be truncated from _length to _bufsize */
758 } __packed; /* WOWLAN_STATUSES_RSP_API_S_VER_9 */
759 
760 /**
761  * struct iwl_wowlan_status_v12 - WoWLAN status
762  * @gtk: GTK data
763  * @igtk: IGTK data
764  * @replay_ctr: GTK rekey replay counter
765  * @pattern_number: number of the matched pattern
766  * @non_qos_seq_ctr: non-QoS sequence counter to use next.
767  *                   Reserved if the struct has version >= 10.
768  * @qos_seq_ctr: QoS sequence counters to use next
769  * @wakeup_reasons: wakeup reasons, see &enum iwl_wowlan_wakeup_reason
770  * @num_of_gtk_rekeys: number of GTK rekeys
771  * @transmitted_ndps: number of transmitted neighbor discovery packets
772  * @received_beacons: number of received beacons
773  * @wake_packet_length: wakeup packet length
774  * @wake_packet_bufsize: wakeup packet buffer size
775  * @tid_tear_down: bit mask of tids whose BA sessions were closed
776  *		   in suspend state
777  * @reserved: unused
778  * @wake_packet: wakeup packet
779  */
780 struct iwl_wowlan_status_v12 {
781 	struct iwl_wowlan_gtk_status_v3 gtk[WOWLAN_GTK_KEYS_NUM];
782 	struct iwl_wowlan_igtk_status igtk[WOWLAN_IGTK_KEYS_NUM];
783 	__le64 replay_ctr;
784 	__le16 pattern_number;
785 	__le16 non_qos_seq_ctr;
786 	__le16 qos_seq_ctr[8];
787 	__le32 wakeup_reasons;
788 	__le32 num_of_gtk_rekeys;
789 	__le32 transmitted_ndps;
790 	__le32 received_beacons;
791 	__le32 wake_packet_length;
792 	__le32 wake_packet_bufsize;
793 	u8 tid_tear_down;
794 	u8 reserved[3];
795 	u8 wake_packet[]; /* can be truncated from _length to _bufsize */
796 } __packed; /* WOWLAN_STATUSES_RSP_API_S_VER_12 */
797 
798 /**
799  * struct iwl_wowlan_info_notif_v1 - WoWLAN information notification
800  * @gtk: GTK data
801  * @igtk: IGTK data
802  * @replay_ctr: GTK rekey replay counter
803  * @pattern_number: number of the matched patterns
804  * @reserved1: reserved
805  * @qos_seq_ctr: QoS sequence counters to use next
806  * @wakeup_reasons: wakeup reasons, see &enum iwl_wowlan_wakeup_reason
807  * @num_of_gtk_rekeys: number of GTK rekeys
808  * @transmitted_ndps: number of transmitted neighbor discovery packets
809  * @received_beacons: number of received beacons
810  * @wake_packet_length: wakeup packet length
811  * @wake_packet_bufsize: wakeup packet buffer size
812  * @tid_tear_down: bit mask of tids whose BA sessions were closed
813  *	in suspend state
814  * @station_id: station id
815  * @reserved2: reserved
816  */
817 struct iwl_wowlan_info_notif_v1 {
818 	struct iwl_wowlan_gtk_status_v3 gtk[WOWLAN_GTK_KEYS_NUM];
819 	struct iwl_wowlan_igtk_status igtk[WOWLAN_IGTK_KEYS_NUM];
820 	__le64 replay_ctr;
821 	__le16 pattern_number;
822 	__le16 reserved1;
823 	__le16 qos_seq_ctr[8];
824 	__le32 wakeup_reasons;
825 	__le32 num_of_gtk_rekeys;
826 	__le32 transmitted_ndps;
827 	__le32 received_beacons;
828 	__le32 wake_packet_length;
829 	__le32 wake_packet_bufsize;
830 	u8 tid_tear_down;
831 	u8 station_id;
832 	u8 reserved2[2];
833 } __packed; /* WOWLAN_INFO_NTFY_API_S_VER_1 */
834 
835 /**
836  * struct iwl_wowlan_info_notif_v2 - WoWLAN information notification
837  * @gtk: GTK data
838  * @igtk: IGTK data
839  * @replay_ctr: GTK rekey replay counter
840  * @pattern_number: number of the matched patterns
841  * @reserved1: reserved
842  * @qos_seq_ctr: QoS sequence counters to use next
843  * @wakeup_reasons: wakeup reasons, see &enum iwl_wowlan_wakeup_reason
844  * @num_of_gtk_rekeys: number of GTK rekeys
845  * @transmitted_ndps: number of transmitted neighbor discovery packets
846  * @received_beacons: number of received beacons
847  * @tid_tear_down: bit mask of tids whose BA sessions were closed
848  *	in suspend state
849  * @station_id: station id
850  * @reserved2: reserved
851  */
852 struct iwl_wowlan_info_notif_v2 {
853 	struct iwl_wowlan_gtk_status_v3 gtk[WOWLAN_GTK_KEYS_NUM];
854 	struct iwl_wowlan_igtk_status igtk[WOWLAN_IGTK_KEYS_NUM];
855 	__le64 replay_ctr;
856 	__le16 pattern_number;
857 	__le16 reserved1;
858 	__le16 qos_seq_ctr[8];
859 	__le32 wakeup_reasons;
860 	__le32 num_of_gtk_rekeys;
861 	__le32 transmitted_ndps;
862 	__le32 received_beacons;
863 	u8 tid_tear_down;
864 	u8 station_id;
865 	u8 reserved2[2];
866 } __packed; /* WOWLAN_INFO_NTFY_API_S_VER_2 */
867 
868 /* MAX MLO keys of non-active links that can arrive in the notification */
869 #define WOWLAN_MAX_MLO_KEYS 18
870 
871 /**
872  * enum iwl_wowlan_mlo_gtk_type - GTK types
873  * @WOWLAN_MLO_GTK_KEY_TYPE_GTK: GTK
874  * @WOWLAN_MLO_GTK_KEY_TYPE_IGTK: IGTK
875  * @WOWLAN_MLO_GTK_KEY_TYPE_BIGTK: BIGTK
876  * @WOWLAN_MLO_GTK_KEY_NUM_TYPES: number of key types
877  */
878 enum iwl_wowlan_mlo_gtk_type {
879 	WOWLAN_MLO_GTK_KEY_TYPE_GTK,
880 	WOWLAN_MLO_GTK_KEY_TYPE_IGTK,
881 	WOWLAN_MLO_GTK_KEY_TYPE_BIGTK,
882 	WOWLAN_MLO_GTK_KEY_NUM_TYPES
883 }; /* WOWLAN_MLO_GTK_KEY_TYPE_API_E_VER_1 */
884 
885 /**
886  * enum iwl_wowlan_mlo_gtk_flag - MLO GTK flags
887  * @WOWLAN_MLO_GTK_FLAG_KEY_LEN_MSK: 0 for len 16, 1 for len 32
888  * @WOWLAN_MLO_GTK_FLAG_KEY_ID_MSK: key id (ranges from 0 to 7)
889  * @WOWLAN_MLO_GTK_FLAG_LINK_ID_MSK: spec link id of the key
890  * @WOWLAN_MLO_GTK_FLAG_KEY_TYPE_MSK: &enum iwl_wowlan_mlo_gtk_type
891  * @WOWLAN_MLO_GTK_FLAG_LAST_KEY_MSK: is this the last given key per
892  *	key-type / link-id - the currently used key
893  */
894 enum iwl_wowlan_mlo_gtk_flag {
895 	WOWLAN_MLO_GTK_FLAG_KEY_LEN_MSK = 0x0001,
896 	WOWLAN_MLO_GTK_FLAG_KEY_ID_MSK = 0x000E,
897 	WOWLAN_MLO_GTK_FLAG_LINK_ID_MSK = 0x00F0,
898 	WOWLAN_MLO_GTK_FLAG_KEY_TYPE_MSK = 0x0300,
899 	WOWLAN_MLO_GTK_FLAG_LAST_KEY_MSK = 0x0400
900 }; /* WOWLAN_MLO_GTK_FLAG_API_E_VER_1 */
901 
902 /**
903  * struct iwl_wowlan_mlo_gtk - MLO GTK info
904  * @key: key material
905  * @flags: &enum iwl_wowlan_mlo_gtk_flag
906  * @pn: packet number
907  */
908 struct iwl_wowlan_mlo_gtk {
909 	u8 key[WOWLAN_KEY_MAX_SIZE];
910 	__le16 flags;
911 	u8 pn[6];
912 } __packed; /* WOWLAN_MLO_GTK_KEY_API_S_VER_1 */
913 
914 /**
915  * struct iwl_wowlan_info_notif_v3 - WoWLAN information notification
916  * @gtk: GTK data
917  * @igtk: IGTK data
918  * @bigtk: BIGTK data
919  * @replay_ctr: GTK rekey replay counter
920  * @pattern_number: number of the matched patterns
921  * @reserved1: reserved
922  * @qos_seq_ctr: QoS sequence counters to use next
923  * @wakeup_reasons: wakeup reasons, see &enum iwl_wowlan_wakeup_reason
924  * @num_of_gtk_rekeys: number of GTK rekeys
925  * @transmitted_ndps: number of transmitted neighbor discovery packets
926  * @received_beacons: number of received beacons
927  * @tid_tear_down: bit mask of tids whose BA sessions were closed
928  *	in suspend state
929  * @station_id: station id
930  * @reserved2: reserved
931  */
932 struct iwl_wowlan_info_notif_v3 {
933 	struct iwl_wowlan_gtk_status_v3 gtk[WOWLAN_GTK_KEYS_NUM];
934 	struct iwl_wowlan_igtk_status igtk[WOWLAN_IGTK_KEYS_NUM];
935 	struct iwl_wowlan_igtk_status bigtk[WOWLAN_BIGTK_KEYS_NUM];
936 	__le64 replay_ctr;
937 	__le16 pattern_number;
938 	__le16 reserved1;
939 	__le16 qos_seq_ctr[8];
940 	__le32 wakeup_reasons;
941 	__le32 num_of_gtk_rekeys;
942 	__le32 transmitted_ndps;
943 	__le32 received_beacons;
944 	u8 tid_tear_down;
945 	u8 station_id;
946 	u8 reserved2[2];
947 } __packed; /* WOWLAN_INFO_NTFY_API_S_VER_3 */
948 
949 /**
950  * struct iwl_wowlan_info_notif - WoWLAN information notification
951  * @gtk: GTK data
952  * @igtk: IGTK data
953  * @bigtk: BIGTK data
954  * @replay_ctr: GTK rekey replay counter
955  * @pattern_number: number of the matched patterns
956  * @qos_seq_ctr: QoS sequence counters to use next
957  * @wakeup_reasons: wakeup reasons, see &enum iwl_wowlan_wakeup_reason
958  * @num_of_gtk_rekeys: number of GTK rekeys
959  * @transmitted_ndps: number of transmitted neighbor discovery packets
960  * @received_beacons: number of received beacons
961  * @tid_tear_down: bit mask of tids whose BA sessions were closed
962  *	in suspend state
963  * @station_id: station id
964  * @num_mlo_link_keys: number of &struct iwl_wowlan_mlo_gtk structs
965  *	following this notif
966  * @tid_offloaded_tx: tid used by the firmware to transmit data packets
967  *	while in wowlan
968  * @mlo_gtks: array of GTKs of size num_mlo_link_keys
969  */
970 struct iwl_wowlan_info_notif {
971 	struct iwl_wowlan_gtk_status_v3 gtk[WOWLAN_GTK_KEYS_NUM];
972 	struct iwl_wowlan_igtk_status igtk[WOWLAN_IGTK_KEYS_NUM];
973 	struct iwl_wowlan_igtk_status bigtk[WOWLAN_BIGTK_KEYS_NUM];
974 	__le64 replay_ctr;
975 	__le16 pattern_number;
976 	__le16 qos_seq_ctr;
977 	__le32 wakeup_reasons;
978 	__le32 num_of_gtk_rekeys;
979 	__le32 transmitted_ndps;
980 	__le32 received_beacons;
981 	u8 tid_tear_down;
982 	u8 station_id;
983 	u8 num_mlo_link_keys;
984 	u8 tid_offloaded_tx;
985 	struct iwl_wowlan_mlo_gtk mlo_gtks[];
986 } __packed; /* WOWLAN_INFO_NTFY_API_S_VER_5 */
987 
988 /**
989  * struct iwl_wowlan_wake_pkt_notif - WoWLAN wake packet notification
990  * @wake_packet_length: wakeup packet length
991  * @station_id: station id
992  * @reserved: unused
993  * @wake_packet: wakeup packet
994  */
995 struct iwl_wowlan_wake_pkt_notif {
996 	__le32 wake_packet_length;
997 	u8 station_id;
998 	u8 reserved[3];
999 	u8 wake_packet[1];
1000 } __packed; /* WOWLAN_WAKE_PKT_NTFY_API_S_VER_1 */
1001 
1002 /**
1003  * struct iwl_mvm_d3_end_notif -  d3 end notification
1004  * @flags: See &enum iwl_d0i3_flags
1005  */
1006 struct iwl_d3_end_notif {
1007 	__le32 flags;
1008 } __packed;
1009 
1010 /* TODO: NetDetect API */
1011 
1012 #endif /* __iwl_fw_api_d3_h__ */
1013