From: roel kluin Date: Thu, 20 Aug 2009 04:04:40 +0000 (+0000) Subject: WAN: bit and/or confusion X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5de3fcab91b0e1809eec030355d15801daf25083;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git WAN: bit and/or confusion Fix the tests that check whether Frame* bits are not set Signed-off-by: Roel Kluin Signed-off-by: David S. Miller --- diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c index e81946d98543..cc00e0f89ecb 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: