summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorNicolas Kaiser <nikai@nikai.net>2010-10-07 23:29:27 +0000
committerDavid S. Miller <davem@davemloft.net>2010-10-09 09:22:54 -0700
commit2259dca36a2f0226596ea37132a46338fcff6722 (patch)
tree38a775d1c3240c4a65787de82fa69d062b3a3ce3 /drivers/net
parentaa3bc6c68e3c1064969f5f2962be84491ffb69a0 (diff)
downloadlinux-2259dca36a2f0226596ea37132a46338fcff6722.tar.gz
linux-2259dca36a2f0226596ea37132a46338fcff6722.tar.bz2
linux-2259dca36a2f0226596ea37132a46338fcff6722.zip
net/tg3: simplify conditional
Simplify: ((a && !b) || (!a && b)) => (a != b) Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/tg3.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index e5b9ec5797c1..943c28325444 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -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;