net: phy: add genphy_aneg_done()
In preparation for allowing PHY drivers to potentially override their auto-negotiation done callback, move the contents of phy_aneg_done() to genphy_aneg_done() since that function really is the generic implementation based on the BMSR_ANEGCOMPLETE status. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
766d1d388e
commit
a9fa6e6ac2
@@ -120,9 +120,7 @@ static int phy_config_interrupt(struct phy_device *phydev, u32 interrupts)
|
||||
*/
|
||||
static inline int phy_aneg_done(struct phy_device *phydev)
|
||||
{
|
||||
int retval = phy_read(phydev, MII_BMSR);
|
||||
|
||||
return (retval < 0) ? retval : (retval & BMSR_ANEGCOMPLETE);
|
||||
return genphy_aneg_done(phydev);
|
||||
}
|
||||
|
||||
/* A structure for mapping a particular speed and duplex
|
||||
|
Reference in New Issue
Block a user