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 <LuoZhongYao@gmail.com>
This commit is contained in:
parent
5758a9e1c6
commit
994246f7c6
1 changed files with 3 additions and 0 deletions
|
@ -501,6 +501,9 @@ static void bt_uart_isr(struct device *unused)
|
|||
h5.rx_state = END;
|
||||
break;
|
||||
}
|
||||
if (!remaining) {
|
||||
h5.rx_state = END;
|
||||
}
|
||||
break;
|
||||
case PAYLOAD:
|
||||
if (h5_unslip_byte(&byte) < 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue