OSDN Git Service

[PATCH] Masking bug in 6pack driver
authorRalf Baechle <ralf@linux-mips.org>
Thu, 23 Nov 2006 18:35:25 +0000 (18:35 +0000)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 Nov 2006 20:59:34 +0000 (21:59 +0100)
Looks like a broken masking to me, binary not is used where bitwise not
was intended.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
drivers/net/hamradio/6pack.c

index 7fe113f..d93e748 100644 (file)
@@ -918,7 +918,7 @@ static void decode_prio_command(unsigned char cmd, struct sixpack *sp)
                                        printk(KERN_DEBUG "6pack: protocol violation\n");
                                else
                                        sp->status = 0;
-                               cmd &= !SIXP_RX_DCD_MASK;
+                               cmd &= ~SIXP_RX_DCD_MASK;
                }
                sp->status = cmd & SIXP_PRIO_DATA_MASK;
        }