diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-08-18 20:33:28 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-09-08 19:07:54 +0200 |
commit | e31fb86005a01b7df8427b09d0158da28d0c773a (patch) | |
tree | 35dd3d4d9d618b423d2bf553d38436419ad57719 | |
parent | bcbb655a180344d8004ede669228992bff1921e4 (diff) |
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>
-rw-r--r-- | net/bluetooth/l2cap_core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index cb36169ef30..2d550afe432 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -1640,6 +1640,9 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err) l2cap_unregister_all_users(conn); + /* Force the connection to be immediately dropped */ + hcon->disc_timeout = 0; + mutex_lock(&conn->chan_lock); /* Kill channels */ |