Skip to contentSkip to conversation

net: loopback: use generic helper to report timestamping info

PATCH Applied Julian Wiedmann 2 participants 2 messages Apr 12, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/loopback.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)
drivers/net/loopback.c +1 -13
index 2df7f60fe052..857e4bf99883 100644
@@ -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)
Signature · 1 line
2.16.4