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) ...@@ -280,10 +280,11 @@ static inline void hci_conn_hold(struct hci_conn *conn)
static inline void hci_conn_put(struct hci_conn *conn) static inline void hci_conn_put(struct hci_conn *conn)
{ {
if (atomic_dec_and_test(&conn->refcnt) && conn->out) { if (atomic_dec_and_test(&conn->refcnt)) {
unsigned long timeo = (conn->type == ACL_LINK) ? if (conn->type == SCO_LINK)
HCI_DISCONN_TIMEOUT : HZ / 100; hci_conn_set_timer(conn, HZ / 100);
hci_conn_set_timer(conn, timeo); 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