Skip to content

Commit

Permalink
net: phy: c45: use cached EEE advertisement in genphy_c45_ethtool_get…
Browse files Browse the repository at this point in the history
…_eee

Now that disabled EEE modes are considered when populating
advertising_eee, we can use this bitmap here instead of reading
the PHY register.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/e57ed3d4-d0bc-4f91-83f6-8f48dfb6d7d7@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Heiner Kallweit authored and Jakub Kicinski committed Feb 19, 2025
1 parent aa951fe commit 199d0ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/phy/phy-c45.c
Original file line number Diff line number Diff line change
Expand Up @@ -1516,14 +1516,14 @@ int genphy_c45_ethtool_get_eee(struct phy_device *phydev,
{
int ret;

ret = genphy_c45_eee_is_active(phydev, data->advertised,
data->lp_advertised);
ret = genphy_c45_eee_is_active(phydev, NULL, data->lp_advertised);
if (ret < 0)
return ret;

data->eee_active = phydev->eee_active;
linkmode_andnot(data->supported, phydev->supported_eee,
phydev->eee_disabled_modes);
linkmode_copy(data->advertised, phydev->advertising_eee);
return 0;
}
EXPORT_SYMBOL(genphy_c45_ethtool_get_eee);
Expand Down

0 comments on commit 199d0ce

Please sign in to comment.