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,13 +144,9 @@ int phy_aneg_done(struct phy_device *phydev)
{
if (phydev->drv && phydev->drv->aneg_done)
return phydev->drv->aneg_done(phydev);
/* Avoid genphy_aneg_done() if the Clause 45 PHY does not
* implement Clause 22 registers
*/
if (phydev->is_c45 && !(phydev->c45_ids.devices_in_package & BIT(0)))
return -EINVAL;
else if (phydev->is_c45)
return genphy_c45_aneg_done(phydev);
else
return genphy_aneg_done(phydev);
}
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