diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2019-12-17 13:39:06 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-12-19 12:52:34 -0800 |
commit | af006240c6cfea9f52fc197ac26e6cade4a8623d (patch) | |
tree | e2dda82d22d3daa4bf3124afe956585a4d2d1c4c /drivers/net/phy/lxt.c | |
parent | c48f16b42a3bf71eeb9c6141369b001097f961e6 (diff) |
net: phy: use phy_resolve_aneg_pause()
Several drivers code their own version of this, working from the LPA
register, after setting the ethtool link partner advertisement bitmask.
Use the generic function instead.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/lxt.c')
-rw-r--r-- | drivers/net/phy/lxt.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/phy/lxt.c b/drivers/net/phy/lxt.c index 356bd6472f49..30172852e36e 100644 --- a/drivers/net/phy/lxt.c +++ b/drivers/net/phy/lxt.c @@ -190,10 +190,7 @@ static int lxt973a2_read_status(struct phy_device *phydev) phydev->duplex = DUPLEX_FULL; } - if (phydev->duplex == DUPLEX_FULL) { - phydev->pause = lpa & LPA_PAUSE_CAP ? 1 : 0; - phydev->asym_pause = lpa & LPA_PAUSE_ASYM ? 1 : 0; - } + phy_resolve_aneg_pause(phydev); } else { int bmcr = phy_read(phydev, MII_BMCR); |