Commit 9731ea06 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

net: phy: use phy_modify_mmd_changed in genphy_c45_an_config_aneg

As can be seen from the usage of the return value, we should use
phy_modify_mmd_changed() here.

Fixes: 9a5dc8af ("net: phy: add genphy_c45_an_config_aneg")
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3acca1dd
......@@ -99,7 +99,7 @@ int genphy_c45_an_config_aneg(struct phy_device *phydev)
adv = linkmode_adv_to_mii_adv_t(phydev->advertising);
ret = phy_modify_mmd(phydev, MDIO_MMD_AN, MDIO_AN_ADVERTISE,
ret = phy_modify_mmd_changed(phydev, MDIO_MMD_AN, MDIO_AN_ADVERTISE,
ADVERTISE_ALL | ADVERTISE_100BASE4 |
ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM,
adv);
......@@ -110,11 +110,10 @@ int genphy_c45_an_config_aneg(struct phy_device *phydev)
adv = linkmode_adv_to_mii_10gbt_adv_t(phydev->advertising);
ret = phy_modify_mmd(phydev, MDIO_MMD_AN, MDIO_AN_10GBT_CTRL,
ret = phy_modify_mmd_changed(phydev, MDIO_MMD_AN, MDIO_AN_10GBT_CTRL,
MDIO_AN_10GBT_CTRL_ADV10G |
MDIO_AN_10GBT_CTRL_ADV5G |
MDIO_AN_10GBT_CTRL_ADV2_5G,
adv);
MDIO_AN_10GBT_CTRL_ADV2_5G, adv);
if (ret < 0)
return ret;
if (ret > 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment