Skip to content

Commit

Permalink
net: veth: use generic helper to report timestamping info
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Julian Wiedmann authored and David S. Miller committed Apr 12, 2019
1 parent af73034 commit 056b21f
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions drivers/net/veth.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,26 +162,14 @@ static void veth_get_ethtool_stats(struct net_device *dev,
}
}

static int veth_get_ts_info(struct net_device *dev,
struct ethtool_ts_info *info)
{
info->so_timestamping =
SOF_TIMESTAMPING_TX_SOFTWARE |
SOF_TIMESTAMPING_RX_SOFTWARE |
SOF_TIMESTAMPING_SOFTWARE;
info->phc_index = -1;

return 0;
}

static const struct ethtool_ops veth_ethtool_ops = {
.get_drvinfo = veth_get_drvinfo,
.get_link = ethtool_op_get_link,
.get_strings = veth_get_strings,
.get_sset_count = veth_get_sset_count,
.get_ethtool_stats = veth_get_ethtool_stats,
.get_link_ksettings = veth_get_link_ksettings,
.get_ts_info = veth_get_ts_info,
.get_ts_info = ethtool_op_get_ts_info,
};

/* general routines */
Expand Down

0 comments on commit 056b21f

Please sign in to comment.