diff options
author | Daniel Mack <zonque@gmail.com> | 2014-06-18 05:01:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-21 18:50:00 -0400 |
commit | 2b8f2a28eac1d35a432705d269f02bdaeba9be8f (patch) | |
tree | f7115b72a1f524f7edfaf75b0d60146a104dd2bf /drivers/net | |
parent | 916c1689a09bc1ca81f2d7a34876f8d35aadd11b (diff) |
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 'drivers/net')
-rw-r--r-- | drivers/net/phy/phy.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 3bc079a67a3d..f7c61812ea4a 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
@@ -720,6 +720,9 @@ void phy_state_machine(struct work_struct *work) | |||
720 | 720 | ||
721 | mutex_lock(&phydev->lock); | 721 | mutex_lock(&phydev->lock); |
722 | 722 | ||
723 | if (phydev->drv->link_change_notify) | ||
724 | phydev->drv->link_change_notify(phydev); | ||
725 | |||
723 | switch (phydev->state) { | 726 | switch (phydev->state) { |
724 | case PHY_DOWN: | 727 | case PHY_DOWN: |
725 | case PHY_STARTING: | 728 | case PHY_STARTING: |