]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
Bluetooth: Set disc_timeout to 0 when calling hci_chan_del
authorJohan Hedberg <johan.hedberg@intel.com>
Sun, 17 Aug 2014 21:41:43 +0000 (00:41 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 8 Sep 2014 17:07:53 +0000 (19:07 +0200)
The hci_chan_del() function is used in scenarios where we've decided we
want to get rid of the underlying baseband link. It makes therefore
sense to force the disc_timeout to 0 so that the disconnection routines
are immediately scheduled.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_conn.c

index 7815826a48e4618fc72a35f4417d2d621385977d..cb04a4e3c82965518840473b0515f0719f1c4bda 100644 (file)
@@ -1316,6 +1316,9 @@ void hci_chan_del(struct hci_chan *chan)
 
        synchronize_rcu();
 
+       /* Force the connection to be immediately dropped */
+       conn->disc_timeout = 0;
+
        hci_conn_drop(conn);
        hci_conn_put(conn);