netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: dummy: use generic helper to report timestamping info
@ 2019-04-12 11:06 Julian Wiedmann
  2019-04-12 23:27 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Julian Wiedmann @ 2019-04-12 11:06 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Julian Wiedmann

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>
---
 drivers/net/dummy.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c
index 0d15a12a4560..3568129fb7da 100644
--- a/drivers/net/dummy.c
+++ b/drivers/net/dummy.c
@@ -32,6 +32,7 @@
 #include <linux/kernel.h>
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
+#include <linux/ethtool.h>
 #include <linux/init.h>
 #include <linux/moduleparam.h>
 #include <linux/rtnetlink.h>
@@ -131,21 +132,9 @@ static void dummy_get_drvinfo(struct net_device *dev,
 	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 = {
 	.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)
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: dummy: use generic helper to report timestamping info
  2019-04-12 11:06 [PATCH net-next] net: dummy: use generic helper to report timestamping info Julian Wiedmann
@ 2019-04-12 23:27 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-04-12 23:27 UTC (permalink / raw)
  To: jwi; +Cc: netdev

From: Julian Wiedmann <jwi@linux.ibm.com>
Date: Fri, 12 Apr 2019 13:06:13 +0200

> 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>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-12 23:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-12 11:06 [PATCH net-next] net: dummy: use generic helper to report timestamping info Julian Wiedmann
2019-04-12 23:27 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).