diff options
author | Richard Cochran <richardcochran@gmail.com> | 2012-04-03 18:59:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-04 05:28:45 -0400 |
commit | c8f3a8c31069137fe0100e6920558f1a7487ef3c (patch) | |
tree | 891303875fcca8c8110c949955b87e1447dbcdfc /include/linux/phy.h | |
parent | 995a9090b2b7dc734351f3ac0ba8d913ffb87001 (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.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 6fe0a37d4abf..f092032f1c98 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -412,6 +412,9 @@ struct phy_driver { | |||
412 | /* Clears up any memory if needed */ | 412 | /* Clears up any memory if needed */ |
413 | void (*remove)(struct phy_device *phydev); | 413 | void (*remove)(struct phy_device *phydev); |
414 | 414 | ||
415 | /* Handles ethtool queries for hardware time stamping. */ | ||
416 | int (*ts_info)(struct phy_device *phydev, struct ethtool_ts_info *ti); | ||
417 | |||
415 | /* Handles SIOCSHWTSTAMP ioctl for hardware time stamping. */ | 418 | /* Handles SIOCSHWTSTAMP ioctl for hardware time stamping. */ |
416 | int (*hwtstamp)(struct phy_device *phydev, struct ifreq *ifr); | 419 | int (*hwtstamp)(struct phy_device *phydev, struct ifreq *ifr); |
417 | 420 | ||