浏览代码

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 <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Johan Hedberg 11 年之前
父节点
当前提交
b3ff670a44
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      net/bluetooth/hci_conn.c

+ 3 - 0
net/bluetooth/hci_conn.c

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