d3.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  1. /******************************************************************************
  2. *
  3. * This file is provided under a dual BSD/GPLv2 license. When using or
  4. * redistributing this file, you may do so under either license.
  5. *
  6. * GPL LICENSE SUMMARY
  7. *
  8. * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
  9. * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
  10. * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
  11. *
  12. * This program is free software; you can redistribute it and/or modify
  13. * it under the terms of version 2 of the GNU General Public License as
  14. * published by the Free Software Foundation.
  15. *
  16. * This program is distributed in the hope that it will be useful, but
  17. * WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  19. * General Public License for more details.
  20. *
  21. * The full GNU General Public License is included in this distribution
  22. * in the file called COPYING.
  23. *
  24. * Contact Information:
  25. * Intel Linux Wireless <linuxwifi@intel.com>
  26. * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  27. *
  28. * BSD LICENSE
  29. *
  30. * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
  31. * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
  32. * Copyright(c) 2015 - 2017 Intel Deutschland GmbH
  33. * All rights reserved.
  34. *
  35. * Redistribution and use in source and binary forms, with or without
  36. * modification, are permitted provided that the following conditions
  37. * are met:
  38. *
  39. * * Redistributions of source code must retain the above copyright
  40. * notice, this list of conditions and the following disclaimer.
  41. * * Redistributions in binary form must reproduce the above copyright
  42. * notice, this list of conditions and the following disclaimer in
  43. * the documentation and/or other materials provided with the
  44. * distribution.
  45. * * Neither the name Intel Corporation nor the names of its
  46. * contributors may be used to endorse or promote products derived
  47. * from this software without specific prior written permission.
  48. *
  49. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  50. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  51. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  52. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  53. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  54. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  55. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  56. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  57. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  58. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  59. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  60. *****************************************************************************/
  61. #ifndef __iwl_fw_api_d3_h__
  62. #define __iwl_fw_api_d3_h__
  63. /**
  64. * enum iwl_d3_wakeup_flags - D3 manager wakeup flags
  65. * @IWL_WAKEUP_D3_CONFIG_FW_ERROR: wake up on firmware sysassert
  66. */
  67. enum iwl_d3_wakeup_flags {
  68. IWL_WAKEUP_D3_CONFIG_FW_ERROR = BIT(0),
  69. }; /* D3_MANAGER_WAKEUP_CONFIG_API_E_VER_3 */
  70. /**
  71. * struct iwl_d3_manager_config - D3 manager configuration command
  72. * @min_sleep_time: minimum sleep time (in usec)
  73. * @wakeup_flags: wakeup flags, see &enum iwl_d3_wakeup_flags
  74. * @wakeup_host_timer: force wakeup after this many seconds
  75. *
  76. * The structure is used for the D3_CONFIG_CMD command.
  77. */
  78. struct iwl_d3_manager_config {
  79. __le32 min_sleep_time;
  80. __le32 wakeup_flags;
  81. __le32 wakeup_host_timer;
  82. } __packed; /* D3_MANAGER_CONFIG_CMD_S_VER_4 */
  83. /* TODO: OFFLOADS_QUERY_API_S_VER_1 */
  84. /**
  85. * enum iwl_d3_proto_offloads - enabled protocol offloads
  86. * @IWL_D3_PROTO_OFFLOAD_ARP: ARP data is enabled
  87. * @IWL_D3_PROTO_OFFLOAD_NS: NS (Neighbor Solicitation) is enabled
  88. * @IWL_D3_PROTO_IPV4_VALID: IPv4 data is valid
  89. * @IWL_D3_PROTO_IPV6_VALID: IPv6 data is valid
  90. */
  91. enum iwl_proto_offloads {
  92. IWL_D3_PROTO_OFFLOAD_ARP = BIT(0),
  93. IWL_D3_PROTO_OFFLOAD_NS = BIT(1),
  94. IWL_D3_PROTO_IPV4_VALID = BIT(2),
  95. IWL_D3_PROTO_IPV6_VALID = BIT(3),
  96. };
  97. #define IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_V1 2
  98. #define IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_V2 6
  99. #define IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_V3L 12
  100. #define IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_V3S 4
  101. #define IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_MAX 12
  102. #define IWL_PROTO_OFFLOAD_NUM_NS_CONFIG_V3L 4
  103. #define IWL_PROTO_OFFLOAD_NUM_NS_CONFIG_V3S 2
  104. /**
  105. * struct iwl_proto_offload_cmd_common - ARP/NS offload common part
  106. * @enabled: enable flags
  107. * @remote_ipv4_addr: remote address to answer to (or zero if all)
  108. * @host_ipv4_addr: our IPv4 address to respond to queries for
  109. * @arp_mac_addr: our MAC address for ARP responses
  110. * @reserved: unused
  111. */
  112. struct iwl_proto_offload_cmd_common {
  113. __le32 enabled;
  114. __be32 remote_ipv4_addr;
  115. __be32 host_ipv4_addr;
  116. u8 arp_mac_addr[ETH_ALEN];
  117. __le16 reserved;
  118. } __packed;
  119. /**
  120. * struct iwl_proto_offload_cmd_v1 - ARP/NS offload configuration
  121. * @common: common/IPv4 configuration
  122. * @remote_ipv6_addr: remote address to answer to (or zero if all)
  123. * @solicited_node_ipv6_addr: broken -- solicited node address exists
  124. * for each target address
  125. * @target_ipv6_addr: our target addresses
  126. * @ndp_mac_addr: neighbor solicitation response MAC address
  127. * @reserved2: reserved
  128. */
  129. struct iwl_proto_offload_cmd_v1 {
  130. struct iwl_proto_offload_cmd_common common;
  131. u8 remote_ipv6_addr[16];
  132. u8 solicited_node_ipv6_addr[16];
  133. u8 target_ipv6_addr[IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_V1][16];
  134. u8 ndp_mac_addr[ETH_ALEN];
  135. __le16 reserved2;
  136. } __packed; /* PROT_OFFLOAD_CONFIG_CMD_DB_S_VER_1 */
  137. /**
  138. * struct iwl_proto_offload_cmd_v2 - ARP/NS offload configuration
  139. * @common: common/IPv4 configuration
  140. * @remote_ipv6_addr: remote address to answer to (or zero if all)
  141. * @solicited_node_ipv6_addr: broken -- solicited node address exists
  142. * for each target address
  143. * @target_ipv6_addr: our target addresses
  144. * @ndp_mac_addr: neighbor solicitation response MAC address
  145. * @num_valid_ipv6_addrs: number of valid IPv6 addresses
  146. * @reserved2: reserved
  147. */
  148. struct iwl_proto_offload_cmd_v2 {
  149. struct iwl_proto_offload_cmd_common common;
  150. u8 remote_ipv6_addr[16];
  151. u8 solicited_node_ipv6_addr[16];
  152. u8 target_ipv6_addr[IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_V2][16];
  153. u8 ndp_mac_addr[ETH_ALEN];
  154. u8 num_valid_ipv6_addrs;
  155. u8 reserved2[3];
  156. } __packed; /* PROT_OFFLOAD_CONFIG_CMD_DB_S_VER_2 */
  157. struct iwl_ns_config {
  158. struct in6_addr source_ipv6_addr;
  159. struct in6_addr dest_ipv6_addr;
  160. u8 target_mac_addr[ETH_ALEN];
  161. __le16 reserved;
  162. } __packed; /* NS_OFFLOAD_CONFIG */
  163. struct iwl_targ_addr {
  164. struct in6_addr addr;
  165. __le32 config_num;
  166. } __packed; /* TARGET_IPV6_ADDRESS */
  167. /**
  168. * struct iwl_proto_offload_cmd_v3_small - ARP/NS offload configuration
  169. * @common: common/IPv4 configuration
  170. * @num_valid_ipv6_addrs: number of valid IPv6 addresses
  171. * @targ_addrs: target IPv6 addresses
  172. * @ns_config: NS offload configurations
  173. */
  174. struct iwl_proto_offload_cmd_v3_small {
  175. struct iwl_proto_offload_cmd_common common;
  176. __le32 num_valid_ipv6_addrs;
  177. struct iwl_targ_addr targ_addrs[IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_V3S];
  178. struct iwl_ns_config ns_config[IWL_PROTO_OFFLOAD_NUM_NS_CONFIG_V3S];
  179. } __packed; /* PROT_OFFLOAD_CONFIG_CMD_DB_S_VER_3 */
  180. /**
  181. * struct iwl_proto_offload_cmd_v3_large - ARP/NS offload configuration
  182. * @common: common/IPv4 configuration
  183. * @num_valid_ipv6_addrs: number of valid IPv6 addresses
  184. * @targ_addrs: target IPv6 addresses
  185. * @ns_config: NS offload configurations
  186. */
  187. struct iwl_proto_offload_cmd_v3_large {
  188. struct iwl_proto_offload_cmd_common common;
  189. __le32 num_valid_ipv6_addrs;
  190. struct iwl_targ_addr targ_addrs[IWL_PROTO_OFFLOAD_NUM_IPV6_ADDRS_V3L];
  191. struct iwl_ns_config ns_config[IWL_PROTO_OFFLOAD_NUM_NS_CONFIG_V3L];
  192. } __packed; /* PROT_OFFLOAD_CONFIG_CMD_DB_S_VER_3 */
  193. /*
  194. * WOWLAN_PATTERNS
  195. */
  196. #define IWL_WOWLAN_MIN_PATTERN_LEN 16
  197. #define IWL_WOWLAN_MAX_PATTERN_LEN 128
  198. struct iwl_wowlan_pattern {
  199. u8 mask[IWL_WOWLAN_MAX_PATTERN_LEN / 8];
  200. u8 pattern[IWL_WOWLAN_MAX_PATTERN_LEN];
  201. u8 mask_size;
  202. u8 pattern_size;
  203. __le16 reserved;
  204. } __packed; /* WOWLAN_PATTERN_API_S_VER_1 */
  205. #define IWL_WOWLAN_MAX_PATTERNS 20
  206. struct iwl_wowlan_patterns_cmd {
  207. __le32 n_patterns;
  208. struct iwl_wowlan_pattern patterns[];
  209. } __packed; /* WOWLAN_PATTERN_ARRAY_API_S_VER_1 */
  210. enum iwl_wowlan_wakeup_filters {
  211. IWL_WOWLAN_WAKEUP_MAGIC_PACKET = BIT(0),
  212. IWL_WOWLAN_WAKEUP_PATTERN_MATCH = BIT(1),
  213. IWL_WOWLAN_WAKEUP_BEACON_MISS = BIT(2),
  214. IWL_WOWLAN_WAKEUP_LINK_CHANGE = BIT(3),
  215. IWL_WOWLAN_WAKEUP_GTK_REKEY_FAIL = BIT(4),
  216. IWL_WOWLAN_WAKEUP_EAP_IDENT_REQ = BIT(5),
  217. IWL_WOWLAN_WAKEUP_4WAY_HANDSHAKE = BIT(6),
  218. IWL_WOWLAN_WAKEUP_ENABLE_NET_DETECT = BIT(7),
  219. IWL_WOWLAN_WAKEUP_RF_KILL_DEASSERT = BIT(8),
  220. IWL_WOWLAN_WAKEUP_REMOTE_LINK_LOSS = BIT(9),
  221. IWL_WOWLAN_WAKEUP_REMOTE_SIGNATURE_TABLE = BIT(10),
  222. IWL_WOWLAN_WAKEUP_REMOTE_TCP_EXTERNAL = BIT(11),
  223. IWL_WOWLAN_WAKEUP_REMOTE_WAKEUP_PACKET = BIT(12),
  224. IWL_WOWLAN_WAKEUP_IOAC_MAGIC_PACKET = BIT(13),
  225. IWL_WOWLAN_WAKEUP_HOST_TIMER = BIT(14),
  226. IWL_WOWLAN_WAKEUP_RX_FRAME = BIT(15),
  227. IWL_WOWLAN_WAKEUP_BCN_FILTERING = BIT(16),
  228. }; /* WOWLAN_WAKEUP_FILTER_API_E_VER_4 */
  229. enum iwl_wowlan_flags {
  230. IS_11W_ASSOC = BIT(0),
  231. ENABLE_L3_FILTERING = BIT(1),
  232. ENABLE_NBNS_FILTERING = BIT(2),
  233. ENABLE_DHCP_FILTERING = BIT(3),
  234. ENABLE_STORE_BEACON = BIT(4),
  235. };
  236. /**
  237. * struct iwl_wowlan_config_cmd - WoWLAN configuration
  238. * @wakeup_filter: filter from &enum iwl_wowlan_wakeup_filters
  239. * @non_qos_seq: non-QoS sequence counter to use next
  240. * @qos_seq: QoS sequence counters to use next
  241. * @wowlan_ba_teardown_tids: bitmap of BA sessions to tear down
  242. * @is_11n_connection: indicates HT connection
  243. * @offloading_tid: TID reserved for firmware use
  244. * @flags: extra flags, see &enum iwl_wowlan_flags
  245. * @reserved: reserved
  246. */
  247. struct iwl_wowlan_config_cmd {
  248. __le32 wakeup_filter;
  249. __le16 non_qos_seq;
  250. __le16 qos_seq[8];
  251. u8 wowlan_ba_teardown_tids;
  252. u8 is_11n_connection;
  253. u8 offloading_tid;
  254. u8 flags;
  255. u8 reserved[2];
  256. } __packed; /* WOWLAN_CONFIG_API_S_VER_4 */
  257. /*
  258. * WOWLAN_TSC_RSC_PARAMS
  259. */
  260. #define IWL_NUM_RSC 16
  261. struct tkip_sc {
  262. __le16 iv16;
  263. __le16 pad;
  264. __le32 iv32;
  265. } __packed; /* TKIP_SC_API_U_VER_1 */
  266. struct iwl_tkip_rsc_tsc {
  267. struct tkip_sc unicast_rsc[IWL_NUM_RSC];
  268. struct tkip_sc multicast_rsc[IWL_NUM_RSC];
  269. struct tkip_sc tsc;
  270. } __packed; /* TKIP_TSC_RSC_API_S_VER_1 */
  271. struct aes_sc {
  272. __le64 pn;
  273. } __packed; /* TKIP_AES_SC_API_U_VER_1 */
  274. struct iwl_aes_rsc_tsc {
  275. struct aes_sc unicast_rsc[IWL_NUM_RSC];
  276. struct aes_sc multicast_rsc[IWL_NUM_RSC];
  277. struct aes_sc tsc;
  278. } __packed; /* AES_TSC_RSC_API_S_VER_1 */
  279. union iwl_all_tsc_rsc {
  280. struct iwl_tkip_rsc_tsc tkip;
  281. struct iwl_aes_rsc_tsc aes;
  282. }; /* ALL_TSC_RSC_API_S_VER_2 */
  283. struct iwl_wowlan_rsc_tsc_params_cmd {
  284. union iwl_all_tsc_rsc all_tsc_rsc;
  285. } __packed; /* ALL_TSC_RSC_API_S_VER_2 */
  286. #define IWL_MIC_KEY_SIZE 8
  287. struct iwl_mic_keys {
  288. u8 tx[IWL_MIC_KEY_SIZE];
  289. u8 rx_unicast[IWL_MIC_KEY_SIZE];
  290. u8 rx_mcast[IWL_MIC_KEY_SIZE];
  291. } __packed; /* MIC_KEYS_API_S_VER_1 */
  292. #define IWL_P1K_SIZE 5
  293. struct iwl_p1k_cache {
  294. __le16 p1k[IWL_P1K_SIZE];
  295. } __packed;
  296. #define IWL_NUM_RX_P1K_CACHE 2
  297. struct iwl_wowlan_tkip_params_cmd {
  298. struct iwl_mic_keys mic_keys;
  299. struct iwl_p1k_cache tx;
  300. struct iwl_p1k_cache rx_uni[IWL_NUM_RX_P1K_CACHE];
  301. struct iwl_p1k_cache rx_multi[IWL_NUM_RX_P1K_CACHE];
  302. } __packed; /* WOWLAN_TKIP_SETTING_API_S_VER_1 */
  303. #define IWL_KCK_MAX_SIZE 32
  304. #define IWL_KEK_MAX_SIZE 32
  305. struct iwl_wowlan_kek_kck_material_cmd {
  306. u8 kck[IWL_KCK_MAX_SIZE];
  307. u8 kek[IWL_KEK_MAX_SIZE];
  308. __le16 kck_len;
  309. __le16 kek_len;
  310. __le64 replay_ctr;
  311. } __packed; /* KEK_KCK_MATERIAL_API_S_VER_2 */
  312. #define RF_KILL_INDICATOR_FOR_WOWLAN 0x87
  313. enum iwl_wowlan_rekey_status {
  314. IWL_WOWLAN_REKEY_POST_REKEY = 0,
  315. IWL_WOWLAN_REKEY_WHILE_REKEY = 1,
  316. }; /* WOWLAN_REKEY_STATUS_API_E_VER_1 */
  317. enum iwl_wowlan_wakeup_reason {
  318. IWL_WOWLAN_WAKEUP_BY_NON_WIRELESS = 0,
  319. IWL_WOWLAN_WAKEUP_BY_MAGIC_PACKET = BIT(0),
  320. IWL_WOWLAN_WAKEUP_BY_PATTERN = BIT(1),
  321. IWL_WOWLAN_WAKEUP_BY_DISCONNECTION_ON_MISSED_BEACON = BIT(2),
  322. IWL_WOWLAN_WAKEUP_BY_DISCONNECTION_ON_DEAUTH = BIT(3),
  323. IWL_WOWLAN_WAKEUP_BY_GTK_REKEY_FAILURE = BIT(4),
  324. IWL_WOWLAN_WAKEUP_BY_RFKILL_DEASSERTED = BIT(5),
  325. IWL_WOWLAN_WAKEUP_BY_UCODE_ERROR = BIT(6),
  326. IWL_WOWLAN_WAKEUP_BY_EAPOL_REQUEST = BIT(7),
  327. IWL_WOWLAN_WAKEUP_BY_FOUR_WAY_HANDSHAKE = BIT(8),
  328. IWL_WOWLAN_WAKEUP_BY_REM_WAKE_LINK_LOSS = BIT(9),
  329. IWL_WOWLAN_WAKEUP_BY_REM_WAKE_SIGNATURE_TABLE = BIT(10),
  330. IWL_WOWLAN_WAKEUP_BY_REM_WAKE_TCP_EXTERNAL = BIT(11),
  331. IWL_WOWLAN_WAKEUP_BY_REM_WAKE_WAKEUP_PACKET = BIT(12),
  332. IWL_WOWLAN_WAKEUP_BY_IOAC_MAGIC_PACKET = BIT(13),
  333. IWL_WOWLAN_WAKEUP_BY_D3_WAKEUP_HOST_TIMER = BIT(14),
  334. IWL_WOWLAN_WAKEUP_BY_RXFRAME_FILTERED_IN = BIT(15),
  335. IWL_WOWLAN_WAKEUP_BY_BEACON_FILTERED_IN = BIT(16),
  336. }; /* WOWLAN_WAKE_UP_REASON_API_E_VER_2 */
  337. struct iwl_wowlan_gtk_status {
  338. u8 key_index;
  339. u8 reserved[3];
  340. u8 decrypt_key[16];
  341. u8 tkip_mic_key[8];
  342. struct iwl_wowlan_rsc_tsc_params_cmd rsc;
  343. } __packed; /* WOWLAN_GTK_MATERIAL_VER_1 */
  344. /**
  345. * struct iwl_wowlan_status - WoWLAN status
  346. * @gtk: GTK data
  347. * @replay_ctr: GTK rekey replay counter
  348. * @pattern_number: number of the matched pattern
  349. * @non_qos_seq_ctr: non-QoS sequence counter to use next
  350. * @qos_seq_ctr: QoS sequence counters to use next
  351. * @wakeup_reasons: wakeup reasons, see &enum iwl_wowlan_wakeup_reason
  352. * @num_of_gtk_rekeys: number of GTK rekeys
  353. * @transmitted_ndps: number of transmitted neighbor discovery packets
  354. * @received_beacons: number of received beacons
  355. * @wake_packet_length: wakeup packet length
  356. * @wake_packet_bufsize: wakeup packet buffer size
  357. * @wake_packet: wakeup packet
  358. */
  359. struct iwl_wowlan_status {
  360. struct iwl_wowlan_gtk_status gtk;
  361. __le64 replay_ctr;
  362. __le16 pattern_number;
  363. __le16 non_qos_seq_ctr;
  364. __le16 qos_seq_ctr[8];
  365. __le32 wakeup_reasons;
  366. __le32 num_of_gtk_rekeys;
  367. __le32 transmitted_ndps;
  368. __le32 received_beacons;
  369. __le32 wake_packet_length;
  370. __le32 wake_packet_bufsize;
  371. u8 wake_packet[]; /* can be truncated from _length to _bufsize */
  372. } __packed; /* WOWLAN_STATUSES_API_S_VER_6 */
  373. #define IWL_WOWLAN_TCP_MAX_PACKET_LEN 64
  374. #define IWL_WOWLAN_REMOTE_WAKE_MAX_PACKET_LEN 128
  375. #define IWL_WOWLAN_REMOTE_WAKE_MAX_TOKENS 2048
  376. struct iwl_tcp_packet_info {
  377. __le16 tcp_pseudo_header_checksum;
  378. __le16 tcp_payload_length;
  379. } __packed; /* TCP_PACKET_INFO_API_S_VER_2 */
  380. struct iwl_tcp_packet {
  381. struct iwl_tcp_packet_info info;
  382. u8 rx_mask[IWL_WOWLAN_MAX_PATTERN_LEN / 8];
  383. u8 data[IWL_WOWLAN_TCP_MAX_PACKET_LEN];
  384. } __packed; /* TCP_PROTOCOL_PACKET_API_S_VER_1 */
  385. struct iwl_remote_wake_packet {
  386. struct iwl_tcp_packet_info info;
  387. u8 rx_mask[IWL_WOWLAN_MAX_PATTERN_LEN / 8];
  388. u8 data[IWL_WOWLAN_REMOTE_WAKE_MAX_PACKET_LEN];
  389. } __packed; /* TCP_PROTOCOL_PACKET_API_S_VER_1 */
  390. struct iwl_wowlan_remote_wake_config {
  391. __le32 connection_max_time; /* unused */
  392. /* TCP_PROTOCOL_CONFIG_API_S_VER_1 */
  393. u8 max_syn_retries;
  394. u8 max_data_retries;
  395. u8 tcp_syn_ack_timeout;
  396. u8 tcp_ack_timeout;
  397. struct iwl_tcp_packet syn_tx;
  398. struct iwl_tcp_packet synack_rx;
  399. struct iwl_tcp_packet keepalive_ack_rx;
  400. struct iwl_tcp_packet fin_tx;
  401. struct iwl_remote_wake_packet keepalive_tx;
  402. struct iwl_remote_wake_packet wake_rx;
  403. /* REMOTE_WAKE_OFFSET_INFO_API_S_VER_1 */
  404. u8 sequence_number_offset;
  405. u8 sequence_number_length;
  406. u8 token_offset;
  407. u8 token_length;
  408. /* REMOTE_WAKE_PROTOCOL_PARAMS_API_S_VER_1 */
  409. __le32 initial_sequence_number;
  410. __le16 keepalive_interval;
  411. __le16 num_tokens;
  412. u8 tokens[IWL_WOWLAN_REMOTE_WAKE_MAX_TOKENS];
  413. } __packed; /* REMOTE_WAKE_CONFIG_API_S_VER_2 */
  414. /* TODO: NetDetect API */
  415. #endif /* __iwl_fw_api_d3_h__ */