aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/socionext/sni_ave.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2018-09-12 01:53:17 +0200
committerDavid S. Miller <davem@davemloft.net>2018-09-12 20:24:21 -0700
commit70814e819c1139e5e7faacb3700eab5eac559272 (patch)
treeace5dc192ed3e22e719f148d531c6d01345a7858 /drivers/net/ethernet/socionext/sni_ave.c
parentnet: ethernet: Add helper for MACs which support pause (diff)
downloadlinux-dev-70814e819c1139e5e7faacb3700eab5eac559272.tar.xz
linux-dev-70814e819c1139e5e7faacb3700eab5eac559272.zip
net: ethernet: Add helper for set_pauseparam for Asym Pause
ethtool can be used to enable/disable pause. Add a helper to configure the PHY when asym pause is supported. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/socionext/sni_ave.c')
-rw-r--r--drivers/net/ethernet/socionext/sni_ave.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/ethernet/socionext/sni_ave.c b/drivers/net/ethernet/socionext/sni_ave.c
index a50720ec109c..61e6abb966ac 100644
--- a/drivers/net/ethernet/socionext/sni_ave.c
+++ b/drivers/net/ethernet/socionext/sni_ave.c
@@ -461,16 +461,7 @@ static int ave_ethtool_set_pauseparam(struct net_device *ndev,
priv->pause_rx = pause->rx_pause;
priv->pause_tx = pause->tx_pause;
- phydev->advertising &= ~(ADVERTISED_Pause | ADVERTISED_Asym_Pause);
- if (pause->rx_pause)
- phydev->advertising |= ADVERTISED_Pause | ADVERTISED_Asym_Pause;
- if (pause->tx_pause)
- phydev->advertising ^= ADVERTISED_Asym_Pause;
-
- if (pause->autoneg) {
- if (netif_running(ndev))
- phy_start_aneg(phydev);
- }
+ phy_set_asym_pause(phydev, pause->rx_pause, pause->tx_pause);
return 0;
}