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:
ZhongYao Luo 2019-12-03 17:33:07 +08:00 committed by Johan Hedberg
commit 994246f7c6

View file

@ -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) {