net: ethernet: Add helper for set_pauseparam for Pause
ethtool can be used to enable/disable pause. Add a helper to configure the PHY when 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>
This commit is contained in:

committed by
David S. Miller

parent
70814e819c
commit
0c122405d4
@@ -892,11 +892,8 @@ static int bcm_enet_open(struct net_device *dev)
|
||||
/* mask with MAC supported features */
|
||||
phy_support_sym_pause(phydev);
|
||||
phy_set_max_speed(phydev, SPEED_100);
|
||||
|
||||
if (priv->pause_auto && priv->pause_rx && priv->pause_tx)
|
||||
phydev->advertising |= SUPPORTED_Pause;
|
||||
else
|
||||
phydev->advertising &= ~SUPPORTED_Pause;
|
||||
phy_set_sym_pause(phydev, priv->pause_rx, priv->pause_rx,
|
||||
priv->pause_auto);
|
||||
|
||||
phy_attached_info(phydev);
|
||||
|
||||
|
Reference in New Issue
Block a user