Bluetooth: Controller: Fix Ctrl to Host flow control assertion

Fix Controller to Host flow control assertion handling ISO
stream disconnection.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2023-01-22 11:21:31 +05:30 committed by Stephanos Ioannidis
commit 479ba351d2

View file

@ -7956,10 +7956,14 @@ void hci_disconn_complete_process(uint16_t handle)
#if defined(CONFIG_BT_HCI_ACL_FLOW_CONTROL)
/* Clear any pending packets upon disconnection */
/* Note: This requires linear handle values starting from 0 */
LL_ASSERT(handle < ARRAY_SIZE(hci_hbuf_pend));
if (handle >= ARRAY_SIZE(hci_hbuf_pend)) {
return;
}
hci_hbuf_acked += hci_hbuf_pend[handle];
hci_hbuf_pend[handle] = 0U;
#endif /* CONFIG_BT_HCI_ACL_FLOW_CONTROL */
conn_count--;
}