net: phy: use genphy_config_eee_advert in genphy_c45_an_config_aneg

Like in genphy_config_aneg() for clause 22 PHY's, we should keep modes
from being advertised that are known to be broken with EEE.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Heiner Kallweit 2019-02-18 21:27:12 +01:00 committed by David S. Miller
parent cd34499cac
commit cc429d5291
1 changed files with 3 additions and 1 deletions

View File

@ -89,12 +89,14 @@ EXPORT_SYMBOL_GPL(genphy_c45_pma_setup_forced);
*/ */
int genphy_c45_an_config_aneg(struct phy_device *phydev) int genphy_c45_an_config_aneg(struct phy_device *phydev)
{ {
int changed = 0, ret; int changed, ret;
u32 adv; u32 adv;
linkmode_and(phydev->advertising, phydev->advertising, linkmode_and(phydev->advertising, phydev->advertising,
phydev->supported); phydev->supported);
changed = genphy_config_eee_advert(phydev);
adv = linkmode_adv_to_mii_adv_t(phydev->advertising); adv = linkmode_adv_to_mii_adv_t(phydev->advertising);
ret = phy_modify_mmd(phydev, MDIO_MMD_AN, MDIO_AN_ADVERTISE, ret = phy_modify_mmd(phydev, MDIO_MMD_AN, MDIO_AN_ADVERTISE,