summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJulian Wiedmann <jwi@linux.ibm.com>2019-04-12 14:06:14 +0300
committerDavid S. Miller <davem@davemloft.net>2019-04-13 02:26:37 +0300
commitaf730342ec3b0096bca913a963b34884b28a810d (patch)
tree431b9af88f2a61864c6bb69eaaffd25b19034da0 /drivers
parentabe9fd5726e0f56b6954788f525973545d3ec94e (diff)
downloadlinux-af730342ec3b0096bca913a963b34884b28a810d.tar.xz
net: loopback: use generic helper to report timestamping info
For reporting the common set of SW timestamping capabilities, use ethtool_op_get_ts_info() instead of re-implementing it. Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/loopback.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index 2df7f60fe052..857e4bf99883 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -128,21 +128,9 @@ static u32 always_on(struct net_device *dev)
return 1;
}
-static int loopback_get_ts_info(struct net_device *netdev,
- struct ethtool_ts_info *ts_info)
-{
- ts_info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
- SOF_TIMESTAMPING_RX_SOFTWARE |
- SOF_TIMESTAMPING_SOFTWARE;
-
- ts_info->phc_index = -1;
-
- return 0;
-};
-
static const struct ethtool_ops loopback_ethtool_ops = {
.get_link = always_on,
- .get_ts_info = loopback_get_ts_info,
+ .get_ts_info = ethtool_op_get_ts_info,
};
static int loopback_dev_init(struct net_device *dev)