1 /* SPDX-License-Identifier: GPL-2.0 */
3 #ifndef _LINUX_NET_TIMESTAMPING_H_
4 #define _LINUX_NET_TIMESTAMPING_H_
6 #include <uapi/linux/net_tstamp.h>
9 * struct kernel_hwtstamp_config - Kernel copy of struct hwtstamp_config
11 * @flags: see struct hwtstamp_config
12 * @tx_type: see struct hwtstamp_config
13 * @rx_filter: see struct hwtstamp_config
15 * Prefer using this structure for in-kernel processing of hardware
16 * timestamping configuration, over the inextensible struct hwtstamp_config
17 * exposed to the %SIOCGHWTSTAMP and %SIOCSHWTSTAMP ioctl UAPI.
19 struct kernel_hwtstamp_config {
25 static inline void hwtstamp_config_to_kernel(struct kernel_hwtstamp_config *kernel_cfg,
26 const struct hwtstamp_config *cfg)
28 kernel_cfg->flags = cfg->flags;
29 kernel_cfg->tx_type = cfg->tx_type;
30 kernel_cfg->rx_filter = cfg->rx_filter;
33 #endif /* _LINUX_NET_TIMESTAMPING_H_ */