summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Sailer <t.sailer@alumni.ethz.ch>2009-10-14 15:15:24 -0700
committerDavid S. Miller <davem@davemloft.net>2009-10-14 16:57:17 -0700
commit48bccd25df71f4f8177cb800f4b288222eb57761 (patch)
tree92294c0c100f21b51d87cd59dc8311a4dbe2384d
parent86a0a1e52d0918125ffc21475537a032f9a71d7c (diff)
downloadkernel-crypto-48bccd25df71f4f8177cb800f4b288222eb57761.tar.gz
kernel-crypto-48bccd25df71f4f8177cb800f4b288222eb57761.tar.xz
kernel-crypto-48bccd25df71f4f8177cb800f4b288222eb57761.zip
hamradio: Fix bit test correctly.
Signed-off-by: Thomas Sailer <t.sailer@alumni.ethz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/hamradio/baycom_epp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c
index ee06a13ba0f..b3cf95d7604 100644
--- a/drivers/net/hamradio/baycom_epp.c
+++ b/drivers/net/hamradio/baycom_epp.c
@@ -595,17 +595,16 @@ static int receive(struct net_device *dev, int cnt)
if (!(notbitstream & (0x1fc << j)))
state = 0;
- /* not flag received */
- else if ((bitstream & (0x1fe << j)) !=
- (0x0fc << j)) {
+ /* flag received */
+ else if ((bitstream & (0x1fe << j)) == (0x0fc << j)) {
if (state)
do_rxpacket(dev);
bc->hdlcrx.bufcnt = 0;
bc->hdlcrx.bufptr = bc->hdlcrx.buf;
state = 1;
numbits = 7-j;
- }
}
+ }
/* stuffed bit */
else if (unlikely((bitstream & (0x1f8 << j)) == (0xf8 << j))) {