Skip to content

Commit

Permalink
hamradio: Fix bit test correctly.
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Sailer <t.sailer@alumni.ethz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Thomas Sailer authored and David S. Miller committed Oct 14, 2009
1 parent 86a0a1e commit 48bccd2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/net/hamradio/baycom_epp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))) {
Expand Down

0 comments on commit 48bccd2

Please sign in to comment.