Skip to content

Commit 48bccd2

Browse files
Thomas Sailerdavem330
authored andcommitted
hamradio: Fix bit test correctly.
Signed-off-by: Thomas Sailer <t.sailer@alumni.ethz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 86a0a1e commit 48bccd2

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎drivers/net/hamradio/baycom_epp.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -595,17 +595,16 @@ static int receive(struct net_device *dev, int cnt)
595595
if (!(notbitstream & (0x1fc << j)))
596596
state = 0;
597597

598-
/* not flag received */
599-
else if ((bitstream & (0x1fe << j)) !=
600-
(0x0fc << j)) {
598+
/* flag received */
599+
else if ((bitstream & (0x1fe << j)) == (0x0fc << j)) {
601600
if (state)
602601
do_rxpacket(dev);
603602
bc->hdlcrx.bufcnt = 0;
604603
bc->hdlcrx.bufptr = bc->hdlcrx.buf;
605604
state = 1;
606605
numbits = 7-j;
607-
}
608606
}
607+
}
609608

610609
/* stuffed bit */
611610
else if (unlikely((bitstream & (0x1f8 << j)) == (0xf8 << j))) {

0 commit comments

Comments
 (0)