netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] WAN: bit and/or confusion
@ 2009-08-14 12:51 Roel Kluin
  2009-08-14 23:32 ` David Miller
  2009-08-14 23:36 ` Andrew Morton
  0 siblings, 2 replies; 11+ messages in thread
From: Roel Kluin @ 2009-08-14 12:51 UTC (permalink / raw)
  To: Francois Romieu, netdev, Andrew Morton, David S. Miller

Fix the tests that check whether Frame* bits are not set

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
// vi drivers/net/wan/dscc4.c +307
#define FrameVfr	0x80
#define FrameRdo        0x40
#define FrameCrc	0x20
#define FrameRab	0x10

diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c
index 8face5d..dd3c64a 100644
--- a/drivers/net/wan/dscc4.c
+++ b/drivers/net/wan/dscc4.c
@@ -663,9 +663,9 @@ 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)))
 			dev->stats.rx_length_errors++;
 		else
 			dev->stats.rx_errors++;

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-08-31  5:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-14 12:51 [PATCH] WAN: bit and/or confusion Roel Kluin
2009-08-14 23:32 ` David Miller
2009-08-14 23:36 ` Andrew Morton
2009-08-14 23:41   ` David Miller
2009-08-14 23:58     ` Andrew Morton
2009-08-15 13:41       ` Roel Kluin
2009-08-15 14:13         ` Francois Romieu
2009-08-15 18:46         ` Krzysztof Halasa
2009-08-20 14:04           ` Roel Kluin
2009-08-20 14:25             ` Krzysztof Halasa
2009-08-31  5:02             ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).