aboutsummaryrefslogtreecommitdiff
path: root/include/linux/phy.h
diff options
context:
space:
mode:
authorRichard Cochran <richardcochran@gmail.com>2012-04-03 22:59:17 +0000
committerDavid S. Miller <davem@davemloft.net>2012-04-04 05:28:45 -0400
commitc8f3a8c31069137fe0100e6920558f1a7487ef3c (patch)
tree891303875fcca8c8110c949955b87e1447dbcdfc /include/linux/phy.h
parent995a9090b2b7dc734351f3ac0ba8d913ffb87001 (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 6fe0a37d4ab..f092032f1c9 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -412,6 +412,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);