]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - include/linux/ethtool_netlink.h
UBUNTU: Ubuntu-5.15.0-39.42
[mirror_ubuntu-jammy-kernel.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
39edf4a5
JK
13#define ETHTOOL_PAUSE_STAT_CNT (__ETHTOOL_A_PAUSE_STAT_CNT - \
14 ETHTOOL_A_PAUSE_STAT_TX_FRAMES)
15
6b08d6c1
MK
16enum ethtool_multicast_groups {
17 ETHNL_MCGRP_MONITOR,
18};
2b4a8990 19
1dd3f212
AL
20struct phy_device;
21
22#if IS_ENABLED(CONFIG_ETHTOOL_NETLINK)
1a644de2 23int ethnl_cable_test_alloc(struct phy_device *phydev, u8 cmd);
1dd3f212
AL
24void ethnl_cable_test_free(struct phy_device *phydev);
25void ethnl_cable_test_finished(struct phy_device *phydev);
1e2dc145
AL
26int ethnl_cable_test_result(struct phy_device *phydev, u8 pair, u8 result);
27int ethnl_cable_test_fault_length(struct phy_device *phydev, u8 pair, u32 cm);
6b4a0fc1
AL
28int ethnl_cable_test_amplitude(struct phy_device *phydev, u8 pair, s16 mV);
29int ethnl_cable_test_pulse(struct phy_device *phydev, u16 mV);
30int ethnl_cable_test_step(struct phy_device *phydev, u32 first, u32 last,
31 u32 step);
1dd3f212 32#else
1a644de2 33static inline int ethnl_cable_test_alloc(struct phy_device *phydev, u8 cmd)
1dd3f212 34{
1e2dc145 35 return -EOPNOTSUPP;
1dd3f212
AL
36}
37
38static inline void ethnl_cable_test_free(struct phy_device *phydev)
39{
40}
41
42static inline void ethnl_cable_test_finished(struct phy_device *phydev)
43{
44}
1e2dc145
AL
45static inline int ethnl_cable_test_result(struct phy_device *phydev, u8 pair,
46 u8 result)
47{
48 return -EOPNOTSUPP;
49}
50
51static inline int ethnl_cable_test_fault_length(struct phy_device *phydev,
52 u8 pair, u32 cm)
53{
54 return -EOPNOTSUPP;
55}
6b4a0fc1
AL
56
57static inline int ethnl_cable_test_amplitude(struct phy_device *phydev,
58 u8 pair, s16 mV)
59{
60 return -EOPNOTSUPP;
61}
62
63static inline int ethnl_cable_test_pulse(struct phy_device *phydev, u16 mV)
64{
65 return -EOPNOTSUPP;
66}
67
68static inline int ethnl_cable_test_step(struct phy_device *phydev, u32 first,
69 u32 last, u32 step)
70{
71 return -EOPNOTSUPP;
72}
90c56b38 73#endif /* IS_ENABLED(CONFIG_ETHTOOL_NETLINK) */
2b4a8990 74#endif /* _LINUX_ETHTOOL_NETLINK_H_ */