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>
This commit is contained in:

committed by
David S. Miller

parent
916c1689a0
commit
2b8f2a28ea
@@ -720,6 +720,9 @@ void phy_state_machine(struct work_struct *work)
|
||||
|
||||
mutex_lock(&phydev->lock);
|
||||
|
||||
if (phydev->drv->link_change_notify)
|
||||
phydev->drv->link_change_notify(phydev);
|
||||
|
||||
switch (phydev->state) {
|
||||
case PHY_DOWN:
|
||||
case PHY_STARTING:
|
||||
|
Reference in New Issue
Block a user