net: phy: Invalidate LP advertising flags when restarting or disabling AN
[cascardo/linux.git] / drivers / net / phy / phy.c
index 767cd11..cdcac6a 100644 (file)
@@ -439,6 +439,9 @@ int phy_start_aneg(struct phy_device *phydev)
        if (AUTONEG_DISABLE == phydev->autoneg)
                phy_sanitize_settings(phydev);
 
+       /* Invalidate LP advertising flags */
+       phydev->lp_advertising = 0;
+
        err = phydev->drv->config_aneg(phydev);
        if (err < 0)
                goto out_unlock;