Skip to content

Commit 8c443bc

Browse files
jori-nordiccvinayak
authored andcommitted
[nrf fromtree] 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 93b9835 commit 8c443bc

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
@@ -1095,6 +1095,8 @@ void bt_conn_set_state(struct bt_conn *conn, bt_conn_state_t state)
10951095
case BT_CONN_DISCONNECT_COMPLETE:
10961096
tx_notify(conn);
10971097

1098+
bt_conn_reset_rx_state(conn);
1099+
10981100
/* Cancel Connection Update if it is pending */
10991101
if ((conn->type == BT_CONN_TYPE_LE) &&
11001102
(k_work_delayable_busy_get(&conn->deferred_work) &

0 commit comments

Comments
 (0)