Skip to content

Commit b6478b8

Browse files
oleremPaolo Abeni
authored andcommitted
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 <[email protected]> Reviewed-by: Russell King (Oracle) <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent e209519 commit b6478b8

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

drivers/net/phy/phy-c45.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ int genphy_c45_an_config_aneg(struct phy_device *phydev)
262262
linkmode_and(phydev->advertising, phydev->advertising,
263263
phydev->supported);
264264

265-
ret = genphy_c45_write_eee_adv(phydev, phydev->supported_eee);
265+
ret = genphy_c45_an_config_eee_aneg(phydev);
266266
if (ret < 0)
267267
return ret;
268268
else if (ret)
@@ -858,6 +858,15 @@ int genphy_c45_read_eee_abilities(struct phy_device *phydev)
858858
}
859859
EXPORT_SYMBOL_GPL(genphy_c45_read_eee_abilities);
860860

861+
/**
862+
* genphy_c45_an_config_eee_aneg - configure EEE advertisement
863+
* @phydev: target phy_device struct
864+
*/
865+
int genphy_c45_an_config_eee_aneg(struct phy_device *phydev)
866+
{
867+
return genphy_c45_write_eee_adv(phydev, phydev->supported_eee);
868+
}
869+
861870
/**
862871
* genphy_c45_pma_read_abilities - read supported link modes from PMA
863872
* @phydev: target phy_device struct

drivers/net/phy/phy_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2231,7 +2231,7 @@ int __genphy_config_aneg(struct phy_device *phydev, bool changed)
22312231
{
22322232
int err;
22332233

2234-
err = genphy_c45_write_eee_adv(phydev, phydev->supported_eee);
2234+
err = genphy_c45_an_config_eee_aneg(phydev);
22352235
if (err < 0)
22362236
return err;
22372237
else if (err)

include/linux/phy.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1765,6 +1765,7 @@ int genphy_c45_ethtool_get_eee(struct phy_device *phydev,
17651765
int genphy_c45_ethtool_set_eee(struct phy_device *phydev,
17661766
struct ethtool_eee *data);
17671767
int genphy_c45_write_eee_adv(struct phy_device *phydev, unsigned long *adv);
1768+
int genphy_c45_an_config_eee_aneg(struct phy_device *phydev);
17681769

17691770
/* Generic C45 PHY driver */
17701771
extern struct phy_driver genphy_c45_driver;

0 commit comments

Comments
 (0)