aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phy_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/phy/phy_device.c')
-rw-r--r--drivers/net/phy/phy_device.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 77068c545de0..cd5966b0db57 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -2044,11 +2044,14 @@ bool phy_validate_pause(struct phy_device *phydev,
2044 struct ethtool_pauseparam *pp) 2044 struct ethtool_pauseparam *pp)
2045{ 2045{
2046 if (!linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT, 2046 if (!linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT,
2047 phydev->supported) || 2047 phydev->supported) && pp->rx_pause)
2048 (!linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
2049 phydev->supported) &&
2050 pp->rx_pause != pp->tx_pause))
2051 return false; 2048 return false;
2049
2050 if (!linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
2051 phydev->supported) &&
2052 pp->rx_pause != pp->tx_pause)
2053 return false;
2054
2052 return true; 2055 return true;
2053} 2056}
2054EXPORT_SYMBOL(phy_validate_pause); 2057EXPORT_SYMBOL(phy_validate_pause);