Commit 54a68364 authored by Maksim Krasnyanskiy's avatar Maksim Krasnyanskiy Committed by Marcel Holtmann

[Bluetooth]

Kill incoming SCO connection when SCO socket is closed
parent 6d33a83a
......@@ -280,10 +280,11 @@ static inline void hci_conn_hold(struct hci_conn *conn)
static inline void hci_conn_put(struct hci_conn *conn)
{
if (atomic_dec_and_test(&conn->refcnt) && conn->out) {
unsigned long timeo = (conn->type == ACL_LINK) ?
HCI_DISCONN_TIMEOUT : HZ / 100;
hci_conn_set_timer(conn, timeo);
if (atomic_dec_and_test(&conn->refcnt)) {
if (conn->type == SCO_LINK)
hci_conn_set_timer(conn, HZ / 100);
else if (conn->out)
hci_conn_set_timer(conn, HCI_DISCONN_TIMEOUT);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment