diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2014-02-11 17:27:36 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-12 19:08:19 -0500 |
commit | a9fa6e6ac29709e7a623b60695c172da675df045 (patch) | |
tree | 902ffd99a28a5f3a82495afd7711a479e0bd5e4f /drivers/net/phy/phy.c | |
parent | 766d1d388e6e6bfda99a00d68ac9247a1c25a0d9 (diff) |
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>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r-- | drivers/net/phy/phy.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 36fc6e16b569..db9c543bd2af 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -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 |