Skip to content

Commit 994246f

Browse files
LuoZhongYaojhedberg
authored andcommitted
bluetooth: h5: Handling the the zero length ack packet
If H5_HDR_LEN is equal to zero, remaining will grow negatively, the commit fixes the problem. Signed-off-by: ZhongYao Luo <[email protected]>
1 parent 5758a9e commit 994246f

File tree

1 file changed

+3
-0
lines changed
  • drivers/bluetooth/hci

1 file changed

+3
-0
lines changed

drivers/bluetooth/hci/h5.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,9 @@ static void bt_uart_isr(struct device *unused)
501501
h5.rx_state = END;
502502
break;
503503
}
504+
if (!remaining) {
505+
h5.rx_state = END;
506+
}
504507
break;
505508
case PAYLOAD:
506509
if (h5_unslip_byte(&byte) < 0) {

0 commit comments

Comments
 (0)