Commit 48bccd25 authored by Thomas Sailer's avatar Thomas Sailer Committed by David S. Miller

hamradio: Fix bit test correctly.

Signed-off-by: default avatarThomas Sailer <t.sailer@alumni.ethz.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 86a0a1e5
...@@ -595,17 +595,16 @@ static int receive(struct net_device *dev, int cnt) ...@@ -595,17 +595,16 @@ static int receive(struct net_device *dev, int cnt)
if (!(notbitstream & (0x1fc << j))) if (!(notbitstream & (0x1fc << j)))
state = 0; state = 0;
/* not flag received */ /* flag received */
else if ((bitstream & (0x1fe << j)) != else if ((bitstream & (0x1fe << j)) == (0x0fc << j)) {
(0x0fc << j)) {
if (state) if (state)
do_rxpacket(dev); do_rxpacket(dev);
bc->hdlcrx.bufcnt = 0; bc->hdlcrx.bufcnt = 0;
bc->hdlcrx.bufptr = bc->hdlcrx.buf; bc->hdlcrx.bufptr = bc->hdlcrx.buf;
state = 1; state = 1;
numbits = 7-j; numbits = 7-j;
}
} }
}
/* stuffed bit */ /* stuffed bit */
else if (unlikely((bitstream & (0x1f8 << j)) == (0xf8 << j))) { else if (unlikely((bitstream & (0x1f8 << j)) == (0xf8 << j))) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment