summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2016-11-15 19:06:30 +0100
committerDavid S. Miller <davem@davemloft.net>2016-11-15 22:33:35 +0100
commite86a8987e458a1826f509c41494b0b29a61144a7 (patch)
treebe43672cce5a26dc00630cebd4cfcb30f0baf1c6 /drivers/net/phy
parentvxlan: Fix uninitialized variable warnings. (diff)
downloadlinux-e86a8987e458a1826f509c41494b0b29a61144a7.tar.xz
linux-e86a8987e458a1826f509c41494b0b29a61144a7.zip
net: phy: Add phy_ethtool_nway_reset
This function just calls into genphy_restart_aneg() to perform an autonegotation restart. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/phy.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index e6dd222fddb1..73adbaa9ac86 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -1441,3 +1441,14 @@ int phy_ethtool_set_link_ksettings(struct net_device *ndev,
return phy_ethtool_ksettings_set(phydev, cmd);
}
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);