net: phy: fix phy_disable_eee
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 20 Dec 2024 22:02:06 +0000 (23:02 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 3 Jan 2025 01:09:09 +0000 (17:09 -0800)
commitc83ca5a4df7cf0ce9ccc25e8481043e05aed6ad0
tree5a76fad42d676c51b4df82db8d070d6f8a466a4a
parent9268abe611b09edc975aa27e6ce829f629352ff4
net: phy: fix phy_disable_eee

genphy_c45_write_eee_adv() becomes a no-op if phydev->supported_eee
is cleared. That's not what we want because this function is still
needed to clear the EEE advertisement register(s).
Fill phydev->eee_broken_modes instead to ensure that userspace
can't re-enable EEE advertising.

Fixes: b55498ff14bd ("net: phy: add phy_disable_eee")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/57e2ae5f-4319-413c-b5c4-ebc8d049bc23@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phy_device.c