Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b3320ef authored by Ben Hutchings's avatar Ben Hutchings Committed by David S. Miller
Browse files

net: phy: Invalidate LP advertising flags when restarting or disabling AN



It is possible to see the old value of the LP advertising flags
through ethtool after reconfiguring the PHY and before autonegotiation
completes.  If autonegotiation is turned off then the last value seen
will persist indefinitely.

Signed-off-by: default avatarBen Hutchings <ben.hutchings@codethink.co.uk>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 28f323b3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;