aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phy.c
diff options
context:
space:
mode:
authorFlorian Fainelli <[email protected]>2014-02-12 01:27:36 +0000
committerDavid S. Miller <[email protected]>2014-02-13 00:08:19 +0000
commita9fa6e6ac29709e7a623b60695c172da675df045 (patch)
tree902ffd99a28a5f3a82495afd7711a479e0bd5e4f /drivers/net/phy/phy.c
parentnet: phy: display human readable PHY speed settings (diff)
downloadkernel-a9fa6e6ac29709e7a623b60695c172da675df045.tar.gz
kernel-a9fa6e6ac29709e7a623b60695c172da675df045.zip
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r--drivers/net/phy/phy.c4
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