1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef _LINUX_ETHTOOL_NETLINK_H_
4 #define _LINUX_ETHTOOL_NETLINK_H_
6 #include <uapi/linux/ethtool_netlink.h>
7 #include <linux/ethtool.h>
8 #include <linux/netdevice.h>
10 #define __ETHTOOL_LINK_MODE_MASK_NWORDS \
11 DIV_ROUND_UP(__ETHTOOL_LINK_MODE_MASK_NBITS, 32)
13 enum ethtool_multicast_groups {
19 #if IS_ENABLED(CONFIG_ETHTOOL_NETLINK)
20 int ethnl_cable_test_alloc(struct phy_device *phydev, u8 cmd);
21 void ethnl_cable_test_free(struct phy_device *phydev);
22 void ethnl_cable_test_finished(struct phy_device *phydev);
23 int ethnl_cable_test_result(struct phy_device *phydev, u8 pair, u8 result);
24 int ethnl_cable_test_fault_length(struct phy_device *phydev, u8 pair, u32 cm);
25 int ethnl_cable_test_amplitude(struct phy_device *phydev, u8 pair, s16 mV);
26 int ethnl_cable_test_pulse(struct phy_device *phydev, u16 mV);
27 int ethnl_cable_test_step(struct phy_device *phydev, u32 first, u32 last,
30 static inline int ethnl_cable_test_alloc(struct phy_device *phydev, u8 cmd)
35 static inline void ethnl_cable_test_free(struct phy_device *phydev)
39 static inline void ethnl_cable_test_finished(struct phy_device *phydev)
42 static inline int ethnl_cable_test_result(struct phy_device *phydev, u8 pair,
48 static inline int ethnl_cable_test_fault_length(struct phy_device *phydev,
54 static inline int ethnl_cable_test_amplitude(struct phy_device *phydev,
60 static inline int ethnl_cable_test_pulse(struct phy_device *phydev, u16 mV)
65 static inline int ethnl_cable_test_step(struct phy_device *phydev, u32 first,
70 #endif /* IS_ENABLED(CONFIG_ETHTOOL_NETLINK) */
71 #endif /* _LINUX_ETHTOOL_NETLINK_H_ */