summaryrefslogtreecommitdiffstats
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorroel kluin <roel.kluin@gmail.com>2009-08-20 04:04:40 +0000
committerDavid S. Miller <davem@davemloft.net>2009-08-30 22:02:26 -0700
commit5de3fcab91b0e1809eec030355d15801daf25083 (patch)
treeef6c8418c30eef2c1e2f5855233028f7d6e8c3c3 /drivers/net/wan
parent2394905f67aeec5f9452f2881cbeb2b42009de0e (diff)
WAN: bit and/or confusion
Fix the tests that check whether Frame* bits are not set Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/dscc4.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c
index e81946d9854..cc00e0f89ec 100644
--- a/drivers/net/wan/dscc4.c
+++ b/drivers/net/wan/dscc4.c
@@ -663,12 +663,12 @@ static inline void dscc4_rx_skb(struct dscc4_dev_priv *dpriv,
} else {
if (skb->data[pkt_len] & FrameRdo)
dev->stats.rx_fifo_errors++;
- else if (!(skb->data[pkt_len] | ~FrameCrc))
+ else if (!(skb->data[pkt_len] & FrameCrc))
dev->stats.rx_crc_errors++;
- else if (!(skb->data[pkt_len] | ~(FrameVfr | FrameRab)))
+ else if ((skb->data[pkt_len] & (FrameVfr | FrameRab)) !=
+ FrameVfr | FrameRab)
dev->stats.rx_length_errors++;
- else
- dev->stats.rx_errors++;
+ dev->stats.rx_errors++;
dev_kfree_skb_irq(skb);
}
refill: