Commit abe9fd57 authored by Julian Wiedmann's avatar Julian Wiedmann Committed by David S. Miller

net: dummy: 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: default avatarJulian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e0a092eb
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/rtnetlink.h> #include <linux/rtnetlink.h>
...@@ -131,21 +132,9 @@ static void dummy_get_drvinfo(struct net_device *dev, ...@@ -131,21 +132,9 @@ static void dummy_get_drvinfo(struct net_device *dev,
strlcpy(info->version, DRV_VERSION, sizeof(info->version)); strlcpy(info->version, DRV_VERSION, sizeof(info->version));
} }
static int dummy_get_ts_info(struct net_device *dev,
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 dummy_ethtool_ops = { static const struct ethtool_ops dummy_ethtool_ops = {
.get_drvinfo = dummy_get_drvinfo, .get_drvinfo = dummy_get_drvinfo,
.get_ts_info = dummy_get_ts_info, .get_ts_info = ethtool_op_get_ts_info,
}; };
static void dummy_setup(struct net_device *dev) static void dummy_setup(struct net_device *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment