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