diff options
author | Oleksij Rempel <o.rempel@pengutronix.de> | 2023-02-22 06:50:41 +0100 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-02-23 13:43:23 +0100 |
commit | b6478b8c93304fa0483e4657779b44634a1711c7 (patch) | |
tree | f841dd7706a12d3a12ffd8ddb5b44cc184378a64 /drivers | |
parent | net: phy: c45: use "supported_eee" instead of supported for access validation (diff) | |
download | linux-b6478b8c93304fa0483e4657779b44634a1711c7.tar.xz linux-b6478b8c93304fa0483e4657779b44634a1711c7.zip |
net: phy: c45: add genphy_c45_an_config_eee_aneg() function
Add new genphy_c45_an_config_eee_aneg() function and replace some of
genphy_c45_write_eee_adv() calls. This will be needed by the next patch.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/phy/phy-c45.c | 11 | ||||
-rw-r--r-- | drivers/net/phy/phy_device.c | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c index f23cce2c5199..784868e818a7 100644 --- a/drivers/net/phy/phy-c45.c +++ b/drivers/net/phy/phy-c45.c @@ -262,7 +262,7 @@ int genphy_c45_an_config_aneg(struct phy_device *phydev) linkmode_and(phydev->advertising, phydev->advertising, phydev->supported); - ret = genphy_c45_write_eee_adv(phydev, phydev->supported_eee); + ret = genphy_c45_an_config_eee_aneg(phydev); if (ret < 0) return ret; else if (ret) @@ -859,6 +859,15 @@ int genphy_c45_read_eee_abilities(struct phy_device *phydev) EXPORT_SYMBOL_GPL(genphy_c45_read_eee_abilities); /** + * genphy_c45_an_config_eee_aneg - configure EEE advertisement + * @phydev: target phy_device struct + */ +int genphy_c45_an_config_eee_aneg(struct phy_device *phydev) +{ + return genphy_c45_write_eee_adv(phydev, phydev->supported_eee); +} + +/** * genphy_c45_pma_read_abilities - read supported link modes from PMA * @phydev: target phy_device struct * diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 71becceb8764..570a5803f9c2 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -2231,7 +2231,7 @@ int __genphy_config_aneg(struct phy_device *phydev, bool changed) { int err; - err = genphy_c45_write_eee_adv(phydev, phydev->supported_eee); + err = genphy_c45_an_config_eee_aneg(phydev); if (err < 0) return err; else if (err) |