提交 716e4ab5 编写于 作者: A Andrei Emeltchenko 提交者: Gustavo Padovan

Bluetooth: AMP: Hanlde AMP_LINK case in conn_put

Handle AMP link when setting up disconnect timeout.
Signed-off-by: NAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: NMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
上级 bd1eb66b
......@@ -605,7 +605,10 @@ static inline void hci_conn_put(struct hci_conn *conn)
if (atomic_dec_and_test(&conn->refcnt)) {
unsigned long timeo;
if (conn->type == ACL_LINK || conn->type == LE_LINK) {
switch (conn->type) {
case ACL_LINK:
case LE_LINK:
del_timer(&conn->idle_timer);
if (conn->state == BT_CONNECTED) {
timeo = conn->disc_timeout;
......@@ -614,12 +617,20 @@ static inline void hci_conn_put(struct hci_conn *conn)
} else {
timeo = msecs_to_jiffies(10);
}
} else {
break;
case AMP_LINK:
timeo = conn->disc_timeout;
break;
default:
timeo = msecs_to_jiffies(10);
break;
}
cancel_delayed_work(&conn->disc_work);
queue_delayed_work(conn->hdev->workqueue,
&conn->disc_work, timeo);
&conn->disc_work, timeo);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册