Skip to content

Commit

Permalink
r8169: Add support for restarting auto-negotiation
Browse files Browse the repository at this point in the history
Implement ethtooll::nway_restart by utilizing mii_nway_restart.

Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
ffainelli authored and davem330 committed Dec 5, 2016
1 parent c354368 commit f0903ea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/net/ethernet/realtek/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -2344,6 +2344,13 @@ static void rtl8169_get_strings(struct net_device *dev, u32 stringset, u8 *data)
}
}

static int rtl8169_nway_reset(struct net_device *dev)
{
struct rtl8169_private *tp = netdev_priv(dev);

return mii_nway_restart(&tp->mii);
}

static const struct ethtool_ops rtl8169_ethtool_ops = {
.get_drvinfo = rtl8169_get_drvinfo,
.get_regs_len = rtl8169_get_regs_len,
Expand All @@ -2359,6 +2366,7 @@ static const struct ethtool_ops rtl8169_ethtool_ops = {
.get_sset_count = rtl8169_get_sset_count,
.get_ethtool_stats = rtl8169_get_ethtool_stats,
.get_ts_info = ethtool_op_get_ts_info,
.nway_reset = rtl8169_nway_reset,
};

static void rtl8169_get_mac_version(struct rtl8169_private *tp,
Expand Down

0 comments on commit f0903ea

Please sign in to comment.