summaryrefslogtreecommitdiff
path: root/include/linux/phy.h
diff options
context:
space:
mode:
authorRichard Cochran <richardcochran@gmail.com>2012-04-03 22:59:17 +0000
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2014-03-31 16:00:13 +0200
commit854877d2e30d5f7bb6a591186a2d26b2d69aa185 (patch)
tree5ca74b46fb0d51a170acb43b4043c4a73ccbef3b /include/linux/phy.h
parent5701f7db2d05c59b7edb51325a4cbed72aec7c90 (diff)
ethtool: Introduce a method for getting time stamping capabilities.
This commit adds a new ethtool ioctl that exposes the SO_TIMESTAMPING capabilities of a network interface. In addition, user space programs can use this ioctl to discover the PTP Hardware Clock (PHC) device associated with the interface. Since software receive time stamps are handled by the stack, the generic ethtool code can answer the query correctly in case the MAC or PHY drivers lack special time stamping features. 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 'include/linux/phy.h')
-rw-r--r--include/linux/phy.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 79f337c47388..4d62457137a1 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -406,6 +406,9 @@ struct phy_driver {
/* Clears up any memory if needed */
void (*remove)(struct phy_device *phydev);
+ /* Handles ethtool queries for hardware time stamping. */
+ int (*ts_info)(struct phy_device *phydev, struct ethtool_ts_info *ti);
+
/* Handles SIOCSHWTSTAMP ioctl for hardware time stamping. */
int (*hwtstamp)(struct phy_device *phydev, struct ifreq *ifr);