From: Johan Hedberg Date: Sun, 17 Aug 2014 21:41:43 +0000 (+0300) Subject: Bluetooth: Set disc_timeout to 0 when calling hci_chan_del X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b3ff670a44cc34c01e78900c42255511e4f232e6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Bluetooth: Set disc_timeout to 0 when calling hci_chan_del 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 Signed-off-by: Marcel Holtmann --- diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 7815826a48e4..cb04a4e3c829 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -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);