Commit e86a8987 authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

net: phy: Add phy_ethtool_nway_reset

This function just calls into genphy_restart_aneg() to perform an
autonegotation restart.
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8ebd115b
...@@ -1441,3 +1441,14 @@ int phy_ethtool_set_link_ksettings(struct net_device *ndev, ...@@ -1441,3 +1441,14 @@ int phy_ethtool_set_link_ksettings(struct net_device *ndev,
return phy_ethtool_ksettings_set(phydev, cmd); return phy_ethtool_ksettings_set(phydev, cmd);
} }
EXPORT_SYMBOL(phy_ethtool_set_link_ksettings); EXPORT_SYMBOL(phy_ethtool_set_link_ksettings);
int phy_ethtool_nway_reset(struct net_device *ndev)
{
struct phy_device *phydev = ndev->phydev;
if (!phydev)
return -ENODEV;
return genphy_restart_aneg(phydev);
}
EXPORT_SYMBOL(phy_ethtool_nway_reset);
...@@ -860,6 +860,7 @@ int phy_ethtool_get_link_ksettings(struct net_device *ndev, ...@@ -860,6 +860,7 @@ int phy_ethtool_get_link_ksettings(struct net_device *ndev,
struct ethtool_link_ksettings *cmd); struct ethtool_link_ksettings *cmd);
int phy_ethtool_set_link_ksettings(struct net_device *ndev, int phy_ethtool_set_link_ksettings(struct net_device *ndev,
const struct ethtool_link_ksettings *cmd); const struct ethtool_link_ksettings *cmd);
int phy_ethtool_nway_reset(struct net_device *ndev);
int __init mdio_bus_init(void); int __init mdio_bus_init(void);
void mdio_bus_exit(void); void mdio_bus_exit(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment