diff options
author | Richard Cochran <richardcochran@gmail.com> | 2012-04-03 18:59:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-04 05:28:46 -0400 |
commit | 02eacbd0c405d378d2357e8e0fac5de981bd40f8 (patch) | |
tree | c6213bbd5f83b8dc4a5dd06f35792beb91116bd7 /net/core | |
parent | 509a7c25729feab353502e1b544c614772a1d49a (diff) |
ethtool: Add a common function for drivers with transmit time stamping.
Currently, most drivers do not support transmit SO_TIMESTAMPING. For those
that do support it, there is one appropriate response to the get_ts_info
query. This patch adds a common function providing this response.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/ethtool.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index a723b1321691..beacdd93cd8f 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c | |||
@@ -38,6 +38,17 @@ u32 ethtool_op_get_link(struct net_device *dev) | |||
38 | } | 38 | } |
39 | EXPORT_SYMBOL(ethtool_op_get_link); | 39 | EXPORT_SYMBOL(ethtool_op_get_link); |
40 | 40 | ||
41 | int ethtool_op_get_ts_info(struct net_device *dev, struct ethtool_ts_info *info) | ||
42 | { | ||
43 | info->so_timestamping = | ||
44 | SOF_TIMESTAMPING_TX_SOFTWARE | | ||
45 | SOF_TIMESTAMPING_RX_SOFTWARE | | ||
46 | SOF_TIMESTAMPING_SOFTWARE; | ||
47 | info->phc_index = -1; | ||
48 | return 0; | ||
49 | } | ||
50 | EXPORT_SYMBOL(ethtool_op_get_ts_info); | ||
51 | |||
41 | /* Handlers for each ethtool command */ | 52 | /* Handlers for each ethtool command */ |
42 | 53 | ||
43 | #define ETHTOOL_DEV_FEATURE_WORDS ((NETDEV_FEATURE_COUNT + 31) / 32) | 54 | #define ETHTOOL_DEV_FEATURE_WORDS ((NETDEV_FEATURE_COUNT + 31) / 32) |