提交 46dfc3a5 编写于 作者: T Tan, Tee Min 提交者: David S. Miller

net: stmmac: fix ethtool flow control not able to get/set

Currently ethtool was not able to get/set the flow control due to a
missing "!". It will always return -EOPNOTSUPP even the device is
flow control supported.

This patch fixes the condition check for ethtool flow control get/set
function for ETHTOOL_LINK_MODE_Asym_Pause_BIT.

Fixes: 3c1bcc86 (“net: ethernet: Convert phydev advertize and supported from u32 to link mode”)
Signed-off-by: NTan, Tee Min <tee.min.tan@intel.com>
Reviewed-by: NOng Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: Voon, Weifeng <weifeng.voon@intel.com@intel.com>
Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 7036e621
......@@ -460,7 +460,7 @@ stmmac_get_pauseparam(struct net_device *netdev,
} else {
if (!linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT,
netdev->phydev->supported) ||
linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
!linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
netdev->phydev->supported))
return;
}
......@@ -491,7 +491,7 @@ stmmac_set_pauseparam(struct net_device *netdev,
} else {
if (!linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT,
phy->supported) ||
linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
!linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
phy->supported))
return -EOPNOTSUPP;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册