xref: /freebsd/sys/contrib/dev/iwlwifi/fw/api/offload.h (revision a4128aad8503277614f2d214011ef60a19447b83)
1bfcc09ddSBjoern A. Zeeb /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2bfcc09ddSBjoern A. Zeeb /*
3bfcc09ddSBjoern A. Zeeb  * Copyright (C) 2012-2014 Intel Corporation
4bfcc09ddSBjoern A. Zeeb  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
5bfcc09ddSBjoern A. Zeeb  * Copyright (C) 2016-2017 Intel Deutschland GmbH
6*a4128aadSBjoern A. Zeeb  * Copyright (C) 2021-2024 Intel Corporation
7bfcc09ddSBjoern A. Zeeb  */
8bfcc09ddSBjoern A. Zeeb #ifndef __iwl_fw_api_offload_h__
9bfcc09ddSBjoern A. Zeeb #define __iwl_fw_api_offload_h__
10bfcc09ddSBjoern A. Zeeb 
11bfcc09ddSBjoern A. Zeeb /**
12bfcc09ddSBjoern A. Zeeb  * enum iwl_prot_offload_subcmd_ids - protocol offload commands
13bfcc09ddSBjoern A. Zeeb  */
14bfcc09ddSBjoern A. Zeeb enum iwl_prot_offload_subcmd_ids {
15bfcc09ddSBjoern A. Zeeb 	/**
169af1bba4SBjoern A. Zeeb 	 * @WOWLAN_WAKE_PKT_NOTIFICATION: Notification in &struct iwl_wowlan_wake_pkt_notif
179af1bba4SBjoern A. Zeeb 	 */
189af1bba4SBjoern A. Zeeb 	WOWLAN_WAKE_PKT_NOTIFICATION = 0xFC,
199af1bba4SBjoern A. Zeeb 
209af1bba4SBjoern A. Zeeb 	/**
21*a4128aadSBjoern A. Zeeb 	 * @WOWLAN_INFO_NOTIFICATION: Notification in
22*a4128aadSBjoern A. Zeeb 	 * &struct iwl_wowlan_info_notif_v1, &struct iwl_wowlan_info_notif_v2,
23*a4128aadSBjoern A. Zeeb 	 * or &struct iwl_wowlan_info_notif
249af1bba4SBjoern A. Zeeb 	 */
259af1bba4SBjoern A. Zeeb 	WOWLAN_INFO_NOTIFICATION = 0xFD,
269af1bba4SBjoern A. Zeeb 
279af1bba4SBjoern A. Zeeb 	/**
289af1bba4SBjoern A. Zeeb 	 * @D3_END_NOTIFICATION: End D3 state notification
299af1bba4SBjoern A. Zeeb 	 */
309af1bba4SBjoern A. Zeeb 	D3_END_NOTIFICATION = 0xFE,
319af1bba4SBjoern A. Zeeb 
329af1bba4SBjoern A. Zeeb 	/**
339af1bba4SBjoern A. Zeeb 	 * @STORED_BEACON_NTF: &struct iwl_stored_beacon_notif_v2 or
349af1bba4SBjoern A. Zeeb 	 *	&struct iwl_stored_beacon_notif_v3
35bfcc09ddSBjoern A. Zeeb 	 */
36bfcc09ddSBjoern A. Zeeb 	STORED_BEACON_NTF = 0xFF,
37bfcc09ddSBjoern A. Zeeb };
38bfcc09ddSBjoern A. Zeeb 
39bfcc09ddSBjoern A. Zeeb #define MAX_STORED_BEACON_SIZE 600
40bfcc09ddSBjoern A. Zeeb 
41bfcc09ddSBjoern A. Zeeb /**
42bfcc09ddSBjoern A. Zeeb  * struct iwl_stored_beacon_notif_common - Stored beacon notif common fields
43bfcc09ddSBjoern A. Zeeb  *
44bfcc09ddSBjoern A. Zeeb  * @system_time: system time on air rise
45bfcc09ddSBjoern A. Zeeb  * @tsf: TSF on air rise
46bfcc09ddSBjoern A. Zeeb  * @beacon_timestamp: beacon on air rise
47bfcc09ddSBjoern A. Zeeb  * @band: band, matches &RX_RES_PHY_FLAGS_BAND_24 definition
48bfcc09ddSBjoern A. Zeeb  * @channel: channel this beacon was received on
49bfcc09ddSBjoern A. Zeeb  * @rates: rate in ucode internal format
50bfcc09ddSBjoern A. Zeeb  * @byte_count: frame's byte count
51bfcc09ddSBjoern A. Zeeb  */
52bfcc09ddSBjoern A. Zeeb struct iwl_stored_beacon_notif_common {
53bfcc09ddSBjoern A. Zeeb 	__le32 system_time;
54bfcc09ddSBjoern A. Zeeb 	__le64 tsf;
55bfcc09ddSBjoern A. Zeeb 	__le32 beacon_timestamp;
56bfcc09ddSBjoern A. Zeeb 	__le16 band;
57bfcc09ddSBjoern A. Zeeb 	__le16 channel;
58bfcc09ddSBjoern A. Zeeb 	__le32 rates;
59bfcc09ddSBjoern A. Zeeb 	__le32 byte_count;
60bfcc09ddSBjoern A. Zeeb } __packed;
61bfcc09ddSBjoern A. Zeeb 
62bfcc09ddSBjoern A. Zeeb /**
63*a4128aadSBjoern A. Zeeb  * struct iwl_stored_beacon_notif_v2 - Stored beacon notification
64bfcc09ddSBjoern A. Zeeb  *
65bfcc09ddSBjoern A. Zeeb  * @common: fields common for all versions
66bfcc09ddSBjoern A. Zeeb  * @data: beacon data, length in @byte_count
67bfcc09ddSBjoern A. Zeeb  */
68bfcc09ddSBjoern A. Zeeb struct iwl_stored_beacon_notif_v2 {
69bfcc09ddSBjoern A. Zeeb 	struct iwl_stored_beacon_notif_common common;
70bfcc09ddSBjoern A. Zeeb 	u8 data[MAX_STORED_BEACON_SIZE];
71bfcc09ddSBjoern A. Zeeb } __packed; /* WOWLAN_STROED_BEACON_INFO_S_VER_2 */
72bfcc09ddSBjoern A. Zeeb 
73bfcc09ddSBjoern A. Zeeb /**
74bfcc09ddSBjoern A. Zeeb  * struct iwl_stored_beacon_notif_v3 - Stored beacon notification
75bfcc09ddSBjoern A. Zeeb  *
76bfcc09ddSBjoern A. Zeeb  * @common: fields common for all versions
77bfcc09ddSBjoern A. Zeeb  * @sta_id: station for which the beacon was received
78bfcc09ddSBjoern A. Zeeb  * @reserved: reserved for alignment
79bfcc09ddSBjoern A. Zeeb  * @data: beacon data, length in @byte_count
80bfcc09ddSBjoern A. Zeeb  */
81bfcc09ddSBjoern A. Zeeb struct iwl_stored_beacon_notif_v3 {
82bfcc09ddSBjoern A. Zeeb 	struct iwl_stored_beacon_notif_common common;
83bfcc09ddSBjoern A. Zeeb 	u8 sta_id;
84bfcc09ddSBjoern A. Zeeb 	u8 reserved[3];
85bfcc09ddSBjoern A. Zeeb 	u8 data[MAX_STORED_BEACON_SIZE];
86bfcc09ddSBjoern A. Zeeb } __packed; /* WOWLAN_STROED_BEACON_INFO_S_VER_3 */
87bfcc09ddSBjoern A. Zeeb 
88bfcc09ddSBjoern A. Zeeb #endif /* __iwl_fw_api_offload_h__ */
89