xref: /linux/drivers/net/wireless/intel/iwlwifi/fw/api/offload.h (revision 2d7eaeb05ae265bd64270376e6a2c0d80244771f)
1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2 /*
3  * Copyright (C) 2012-2014 Intel Corporation
4  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
5  * Copyright (C) 2016-2017 Intel Deutschland GmbH
6  * Copyright (C) 2021-2026 Intel Corporation
7  */
8 #ifndef __iwl_fw_api_offload_h__
9 #define __iwl_fw_api_offload_h__
10 
11 /**
12  * enum iwl_prot_offload_subcmd_ids - protocol offload commands
13  */
14 enum iwl_prot_offload_subcmd_ids {
15 	/**
16 	 * @WOWLAN_WAKE_PKT_NOTIFICATION: Notification in &struct iwl_wowlan_wake_pkt_notif
17 	 */
18 	WOWLAN_WAKE_PKT_NOTIFICATION = 0xFC,
19 
20 	/**
21 	 * @WOWLAN_INFO_NOTIFICATION: Notification in
22 	 * &struct iwl_wowlan_info_notif_v1, iwl_wowlan_info_notif_v3,
23 	 * &struct iwl_wowlan_info_notif_v5, &struct iwl_wowlan_info_notif_v6
24 	 * or &struct iwl_wowlan_info_notif
25 	 */
26 	WOWLAN_INFO_NOTIFICATION = 0xFD,
27 
28 	/**
29 	 * @D3_END_NOTIFICATION: End D3 state notification
30 	 */
31 	D3_END_NOTIFICATION = 0xFE,
32 
33 	/**
34 	 * @STORED_BEACON_NTF: &struct iwl_stored_beacon_notif_v2 or
35 	 *	&struct iwl_stored_beacon_notif
36 	 */
37 	STORED_BEACON_NTF = 0xFF,
38 };
39 
40 #define MAX_STORED_BEACON_SIZE 600
41 
42 /**
43  * struct iwl_stored_beacon_notif_common - Stored beacon notif common fields
44  *
45  * @system_time: system time on air rise
46  * @tsf: TSF on air rise
47  * @beacon_timestamp: beacon on air rise
48  * @band: band, matches &RX_RES_PHY_FLAGS_BAND_24 definition
49  * @channel: channel this beacon was received on
50  * @rates: rate in ucode internal format
51  * @byte_count: frame's byte count
52  */
53 struct iwl_stored_beacon_notif_common {
54 	__le32 system_time;
55 	__le64 tsf;
56 	__le32 beacon_timestamp;
57 	__le16 band;
58 	__le16 channel;
59 	__le32 rates;
60 	__le32 byte_count;
61 } __packed;
62 
63 /**
64  * struct iwl_stored_beacon_notif_v2 - Stored beacon notification
65  *
66  * @common: fields common for all versions
67  * @data: beacon data, length in @byte_count
68  */
69 struct iwl_stored_beacon_notif_v2 {
70 	struct iwl_stored_beacon_notif_common common;
71 	u8 data[MAX_STORED_BEACON_SIZE];
72 } __packed; /* WOWLAN_STROED_BEACON_INFO_S_VER_2 */
73 
74 /**
75  * struct iwl_stored_beacon_notif - Stored beacon notification
76  *
77  * @common: fields common for all versions
78  * @sta_id: station for which the beacon was received
79  * @reserved: reserved for alignment
80  * @data: beacon data, length in @byte_count
81  */
82 struct iwl_stored_beacon_notif {
83 	struct iwl_stored_beacon_notif_common common;
84 	u8 sta_id;
85 	u8 reserved[3];
86 	u8 data[MAX_STORED_BEACON_SIZE];
87 } __packed; /* WOWLAN_STROED_BEACON_INFO_S_VER_3, _VER_4 */
88 
89 #endif /* __iwl_fw_api_offload_h__ */
90