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 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 	 * @STORED_BEACON_NTF: &struct iwl_stored_beacon_notif
17 	 */
18 	STORED_BEACON_NTF = 0xFF,
19 };
20 
21 #define MAX_STORED_BEACON_SIZE 600
22 
23 /**
24  * struct iwl_stored_beacon_notif_common - Stored beacon notif common fields
25  *
26  * @system_time: system time on air rise
27  * @tsf: TSF on air rise
28  * @beacon_timestamp: beacon on air rise
29  * @band: band, matches &RX_RES_PHY_FLAGS_BAND_24 definition
30  * @channel: channel this beacon was received on
31  * @rates: rate in ucode internal format
32  * @byte_count: frame's byte count
33  */
34 struct iwl_stored_beacon_notif_common {
35 	__le32 system_time;
36 	__le64 tsf;
37 	__le32 beacon_timestamp;
38 	__le16 band;
39 	__le16 channel;
40 	__le32 rates;
41 	__le32 byte_count;
42 } __packed;
43 
44 /**
45  * struct iwl_stored_beacon_notif - Stored beacon notification
46  *
47  * @common: fields common for all versions
48  * @data: beacon data, length in @byte_count
49  */
50 struct iwl_stored_beacon_notif_v2 {
51 	struct iwl_stored_beacon_notif_common common;
52 	u8 data[MAX_STORED_BEACON_SIZE];
53 } __packed; /* WOWLAN_STROED_BEACON_INFO_S_VER_2 */
54 
55 /**
56  * struct iwl_stored_beacon_notif_v3 - Stored beacon notification
57  *
58  * @common: fields common for all versions
59  * @sta_id: station for which the beacon was received
60  * @reserved: reserved for alignment
61  * @data: beacon data, length in @byte_count
62  */
63 struct iwl_stored_beacon_notif_v3 {
64 	struct iwl_stored_beacon_notif_common common;
65 	u8 sta_id;
66 	u8 reserved[3];
67 	u8 data[MAX_STORED_BEACON_SIZE];
68 } __packed; /* WOWLAN_STROED_BEACON_INFO_S_VER_3 */
69 
70 #endif /* __iwl_fw_api_offload_h__ */
71