xref: /linux/drivers/net/ethernet/intel/iavf/iavf_types.h (revision 1a9239bb4253f9076b5b4b2a1a4e8d7defd77a95)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright(c) 2024 Intel Corporation. */
3 
4 #ifndef _IAVF_TYPES_H_
5 #define _IAVF_TYPES_H_
6 
7 #include "iavf_types.h"
8 
9 #include <linux/avf/virtchnl.h>
10 #include <linux/ptp_clock_kernel.h>
11 
12 /* structure used to queue PTP commands for processing */
13 struct iavf_ptp_aq_cmd {
14 	struct list_head list;
15 	enum virtchnl_ops v_opcode:16;
16 	u16 msglen;
17 	u8 msg[] __counted_by(msglen);
18 };
19 
20 struct iavf_ptp {
21 	wait_queue_head_t phc_time_waitqueue;
22 	struct virtchnl_ptp_caps hw_caps;
23 	struct ptp_clock_info info;
24 	struct ptp_clock *clock;
25 	struct list_head aq_cmds;
26 	u64 cached_phc_time;
27 	unsigned long cached_phc_updated;
28 	/* Lock protecting access to the AQ command list */
29 	struct mutex aq_cmd_lock;
30 	struct kernel_hwtstamp_config hwtstamp_config;
31 	bool phc_time_ready:1;
32 };
33 
34 #endif /* _IAVF_TYPES_H_ */
35