Commit d7bed825 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

net: phy: use genphy_c45_aneg_done in genphy_aneg_done

Now that we have it let's use genphy_c45_aneg_done() in phy_aneg_done().
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6bfc1128
...@@ -144,14 +144,10 @@ int phy_aneg_done(struct phy_device *phydev) ...@@ -144,14 +144,10 @@ int phy_aneg_done(struct phy_device *phydev)
{ {
if (phydev->drv && phydev->drv->aneg_done) if (phydev->drv && phydev->drv->aneg_done)
return phydev->drv->aneg_done(phydev); return phydev->drv->aneg_done(phydev);
else if (phydev->is_c45)
/* Avoid genphy_aneg_done() if the Clause 45 PHY does not return genphy_c45_aneg_done(phydev);
* implement Clause 22 registers else
*/ return genphy_aneg_done(phydev);
if (phydev->is_c45 && !(phydev->c45_ids.devices_in_package & BIT(0)))
return -EINVAL;
return genphy_aneg_done(phydev);
} }
EXPORT_SYMBOL(phy_aneg_done); EXPORT_SYMBOL(phy_aneg_done);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment