Skip to content

Commit bba5d23

Browse files
jori-nordiccvinayak
authored andcommitted
Bluetooth: Host: Free ACL RX fragments on disconnection
This function call frees the buffer kept by the host for reassembling L2CAP PDUs into. Without this call, the current buffer will eventually be leaked, leading to a non-functional host due to lack of RX buffers. The effect is worse when host flow control is not enabled, as the RX buffer pool is shared with events, which means communication with the controller is essentially dead. Signed-off-by: Jonathan Rico <[email protected]> (cherry picked from commit 8a2fe27) Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent cafacb8 commit bba5d23

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

subsys/bluetooth/host/conn.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,8 @@ void bt_conn_set_state(struct bt_conn *conn, bt_conn_state_t state)
11071107
case BT_CONN_DISCONNECT_COMPLETE:
11081108
tx_notify(conn);
11091109

1110+
bt_conn_reset_rx_state(conn);
1111+
11101112
/* Cancel Connection Update if it is pending */
11111113
if ((conn->type == BT_CONN_TYPE_LE) &&
11121114
(k_work_delayable_busy_get(&conn->deferred_work) &

0 commit comments

Comments
 (0)