Skip to content

Commit e31fb86

Browse files
Johan Hedbergholtmann
authored andcommitted
Bluetooth: Set discon_timeout to 0 in l2cap_conn_del
When the l2cap_conn_del() function is used we do not want to wait around "in case something happens" before disconnecting. This patch sets the disconnection timeout to 0 so that the disconnection routines get immediately scheduled. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
1 parent bcbb655 commit e31fb86

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/bluetooth/l2cap_core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,6 +1640,9 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err)
16401640

16411641
l2cap_unregister_all_users(conn);
16421642

1643+
/* Force the connection to be immediately dropped */
1644+
hcon->disc_timeout = 0;
1645+
16431646
mutex_lock(&conn->chan_lock);
16441647

16451648
/* Kill channels */

0 commit comments

Comments
 (0)