]> git.proxmox.com Git - mirror_ubuntu-kernels.git/blame - include/linux/ethtool_netlink.h
Merge tag 'powerpc-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[mirror_ubuntu-kernels.git] / include / linux / ethtool_netlink.h
CommitLineData
2b4a8990
MK
1/* SPDX-License-Identifier: GPL-2.0-only */
2
3#ifndef _LINUX_ETHTOOL_NETLINK_H_
4#define _LINUX_ETHTOOL_NETLINK_H_
5
6#include <uapi/linux/ethtool_netlink.h>
7#include <linux/ethtool.h>
6b08d6c1
MK
8#include <linux/netdevice.h>
9
f625aa9b
MK
10#define __ETHTOOL_LINK_MODE_MASK_NWORDS \
11 DIV_ROUND_UP(__ETHTOOL_LINK_MODE_MASK_NBITS, 32)
12
6b08d6c1
MK
13enum ethtool_multicast_groups {
14 ETHNL_MCGRP_MONITOR,
15};
2b4a8990 16
1dd3f212
AL
17struct phy_device;
18
19#if IS_ENABLED(CONFIG_ETHTOOL_NETLINK)
1a644de2 20int ethnl_cable_test_alloc(struct phy_device *phydev, u8 cmd);
1dd3f212
AL
21void ethnl_cable_test_free(struct phy_device *phydev);
22void ethnl_cable_test_finished(struct phy_device *phydev);
1e2dc145
AL
23int ethnl_cable_test_result(struct phy_device *phydev, u8 pair, u8 result);
24int ethnl_cable_test_fault_length(struct phy_device *phydev, u8 pair, u32 cm);
6b4a0fc1
AL
25int ethnl_cable_test_amplitude(struct phy_device *phydev, u8 pair, s16 mV);
26int ethnl_cable_test_pulse(struct phy_device *phydev, u16 mV);
27int ethnl_cable_test_step(struct phy_device *phydev, u32 first, u32 last,
28 u32 step);
1dd3f212 29#else
1a644de2 30static inline int ethnl_cable_test_alloc(struct phy_device *phydev, u8 cmd)
1dd3f212 31{
1e2dc145 32 return -EOPNOTSUPP;
1dd3f212
AL
33}
34
35static inline void ethnl_cable_test_free(struct phy_device *phydev)
36{
37}
38
39static inline void ethnl_cable_test_finished(struct phy_device *phydev)
40{
41}
1e2dc145
AL
42static inline int ethnl_cable_test_result(struct phy_device *phydev, u8 pair,
43 u8 result)
44{
45 return -EOPNOTSUPP;
46}
47
48static inline int ethnl_cable_test_fault_length(struct phy_device *phydev,
49 u8 pair, u32 cm)
50{
51 return -EOPNOTSUPP;
52}
6b4a0fc1
AL
53
54static inline int ethnl_cable_test_amplitude(struct phy_device *phydev,
55 u8 pair, s16 mV)
56{
57 return -EOPNOTSUPP;
58}
59
60static inline int ethnl_cable_test_pulse(struct phy_device *phydev, u16 mV)
61{
62 return -EOPNOTSUPP;
63}
64
65static inline int ethnl_cable_test_step(struct phy_device *phydev, u32 first,
66 u32 last, u32 step)
67{
68 return -EOPNOTSUPP;
69}
90c56b38 70#endif /* IS_ENABLED(CONFIG_ETHTOOL_NETLINK) */
2b4a8990 71#endif /* _LINUX_ETHTOOL_NETLINK_H_ */