diff options
author | Daniel Mack <zonque@gmail.com> | 2014-06-18 13:01:41 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-22 02:50:00 +0400 |
commit | 2b8f2a28eac1d35a432705d269f02bdaeba9be8f (patch) | |
tree | f7115b72a1f524f7edfaf75b0d60146a104dd2bf /include/linux | |
parent | 916c1689a09bc1ca81f2d7a34876f8d35aadd11b (diff) | |
download | linux-2b8f2a28eac1d35a432705d269f02bdaeba9be8f.tar.xz |
net: phylib: add link_change_notify callback to phy device
Add a notify callback to inform phy drivers when the core is about to
do its link adjustment. No change for drivers that do not implement
this callback.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/phy.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 864ddafad8cc..68041446c450 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -536,6 +536,15 @@ struct phy_driver { /* See set_wol, but for checking whether Wake on LAN is enabled. */ void (*get_wol)(struct phy_device *dev, struct ethtool_wolinfo *wol); + /* + * Called to inform a PHY device driver when the core is about to + * change the link state. This callback is supposed to be used as + * fixup hook for drivers that need to take action when the link + * state changes. Drivers are by no means allowed to mess with the + * PHY device structure in their implementations. + */ + void (*link_change_notify)(struct phy_device *dev); + struct device_driver driver; }; #define to_phy_driver(d) container_of(d, struct phy_driver, driver) |