提交 2259dca3 编写于 作者: N Nicolas Kaiser 提交者: David S. Miller

net/tg3: simplify conditional

Simplify: ((a && !b) || (!a && b)) => (a != b)
Signed-off-by: NNicolas Kaiser <nikai@nikai.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 aa3bc6c6
......@@ -9968,8 +9968,7 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam
if (!(phydev->supported & SUPPORTED_Pause) ||
(!(phydev->supported & SUPPORTED_Asym_Pause) &&
((epause->rx_pause && !epause->tx_pause) ||
(!epause->rx_pause && epause->tx_pause))))
(epause->rx_pause != epause->tx_pause)))
return -EINVAL;
tp->link_config.flowctrl = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册