mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
net: support time stamping in phy devices.
This patch adds a new networking option to allow hardware time stamps from PHY devices. When enabled, likely candidates among incoming and outgoing network packets are offered to the PHY driver for possible time stamping. When accepted by the PHY driver, incoming packets are deferred for later delivery by the driver. The patch also adds phylib driver methods for the SIOCSHWTSTAMP ioctl and callbacks for transmit and receive time stamping. Drivers may optionally implement these functions. Signed-off-by: Richard Cochran <richard.cochran@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
15f0127d1d
commit
c1f19b51d1
10 changed files with 208 additions and 1 deletions
|
@ -460,6 +460,7 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
|
|||
}
|
||||
|
||||
phydev->attached_dev = dev;
|
||||
dev->phydev = phydev;
|
||||
|
||||
phydev->dev_flags = flags;
|
||||
|
||||
|
@ -513,6 +514,7 @@ EXPORT_SYMBOL(phy_attach);
|
|||
*/
|
||||
void phy_detach(struct phy_device *phydev)
|
||||
{
|
||||
phydev->attached_dev->phydev = NULL;
|
||||
phydev->attached_dev = NULL;
|
||||
|
||||
/* If the device had no specific driver before (i.e. - it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue