mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 06:21:31 +00:00
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>
This commit is contained in:
parent
e209519b62
commit
b6478b8c93
3 changed files with 12 additions and 2 deletions
|
@ -262,7 +262,7 @@ int genphy_c45_an_config_aneg(struct phy_device *phydev)
|
||||||
linkmode_and(phydev->advertising, phydev->advertising,
|
linkmode_and(phydev->advertising, phydev->advertising,
|
||||||
phydev->supported);
|
phydev->supported);
|
||||||
|
|
||||||
ret = genphy_c45_write_eee_adv(phydev, phydev->supported_eee);
|
ret = genphy_c45_an_config_eee_aneg(phydev);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
else if (ret)
|
else if (ret)
|
||||||
|
@ -858,6 +858,15 @@ int genphy_c45_read_eee_abilities(struct phy_device *phydev)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(genphy_c45_read_eee_abilities);
|
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
|
* genphy_c45_pma_read_abilities - read supported link modes from PMA
|
||||||
* @phydev: target phy_device struct
|
* @phydev: target phy_device struct
|
||||||
|
|
|
@ -2231,7 +2231,7 @@ int __genphy_config_aneg(struct phy_device *phydev, bool changed)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = genphy_c45_write_eee_adv(phydev, phydev->supported_eee);
|
err = genphy_c45_an_config_eee_aneg(phydev);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
else if (err)
|
else if (err)
|
||||||
|
|
|
@ -1765,6 +1765,7 @@ int genphy_c45_ethtool_get_eee(struct phy_device *phydev,
|
||||||
int genphy_c45_ethtool_set_eee(struct phy_device *phydev,
|
int genphy_c45_ethtool_set_eee(struct phy_device *phydev,
|
||||||
struct ethtool_eee *data);
|
struct ethtool_eee *data);
|
||||||
int genphy_c45_write_eee_adv(struct phy_device *phydev, unsigned long *adv);
|
int genphy_c45_write_eee_adv(struct phy_device *phydev, unsigned long *adv);
|
||||||
|
int genphy_c45_an_config_eee_aneg(struct phy_device *phydev);
|
||||||
|
|
||||||
/* Generic C45 PHY driver */
|
/* Generic C45 PHY driver */
|
||||||
extern struct phy_driver genphy_c45_driver;
|
extern struct phy_driver genphy_c45_driver;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue