diff options
author | Andrew Lunn <andrew@lunn.ch> | 2018-09-12 01:53:17 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-12 20:24:21 -0700 |
commit | 70814e819c1139e5e7faacb3700eab5eac559272 (patch) | |
tree | ace5dc192ed3e22e719f148d531c6d01345a7858 /drivers/net/ethernet/aurora | |
parent | c306ad36184fb7d0bd53f45441f45c1810e88a53 (diff) | |
download | blackbird-op-linux-70814e819c1139e5e7faacb3700eab5eac559272.tar.gz blackbird-op-linux-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/aurora')
-rw-r--r-- | drivers/net/ethernet/aurora/nb8800.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c index c8d1f8fa4713..6f56276015a4 100644 --- a/drivers/net/ethernet/aurora/nb8800.c +++ b/drivers/net/ethernet/aurora/nb8800.c @@ -935,18 +935,11 @@ static void nb8800_pause_adv(struct net_device *dev) { struct nb8800_priv *priv = netdev_priv(dev); struct phy_device *phydev = dev->phydev; - u32 adv = 0; if (!phydev) return; - if (priv->pause_rx) - adv |= ADVERTISED_Pause | ADVERTISED_Asym_Pause; - if (priv->pause_tx) - adv ^= ADVERTISED_Asym_Pause; - - phydev->supported |= adv; - phydev->advertising |= adv; + phy_set_asym_pause(phydev, priv->pause_rx, priv->pause_tx); } static int nb8800_open(struct net_device *dev) |