diff options
author | Luo Jie <luoj@codeaurora.org> | 2021-10-24 10:27:26 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-25 15:04:18 +0200 |
commit | 2d4284e88a59114f2f02b60da4977b49ace149bc (patch) | |
tree | c6d3317b0b2a0e11db683b3fdd42847f9d1d6a20 /drivers/net/phy | |
parent | net: phy: at803x: replace AT803X_DEVICE_ADDR with MDIO_MMD_PCS (diff) | |
download | linux-2d4284e88a59114f2f02b60da4977b49ace149bc.tar.xz linux-2d4284e88a59114f2f02b60da4977b49ace149bc.zip |
net: phy: at803x: use phy_modify()
Convert at803x_set_wol to use phy_modify.
Signed-off-by: Luo Jie <luoj@codeaurora.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/at803x.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c index d0f41cdaec75..cf25cd428ffa 100644 --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c @@ -357,16 +357,12 @@ static int at803x_set_wol(struct phy_device *phydev, phy_write_mmd(phydev, MDIO_MMD_PCS, offsets[i], mac[(i * 2) + 1] | (mac[(i * 2)] << 8)); - value = phy_read(phydev, AT803X_INTR_ENABLE); - value |= AT803X_INTR_ENABLE_WOL; - ret = phy_write(phydev, AT803X_INTR_ENABLE, value); + ret = phy_modify(phydev, AT803X_INTR_ENABLE, 0, AT803X_INTR_ENABLE_WOL); if (ret) return ret; value = phy_read(phydev, AT803X_INTR_STATUS); } else { - value = phy_read(phydev, AT803X_INTR_ENABLE); - value &= (~AT803X_INTR_ENABLE_WOL); - ret = phy_write(phydev, AT803X_INTR_ENABLE, value); + ret = phy_modify(phydev, AT803X_INTR_ENABLE, AT803X_INTR_ENABLE_WOL, 0); if (ret) return ret; value = phy_read(phydev, AT803X_INTR_STATUS); |