diff options
Diffstat (limited to 'include/net/bluetooth/hci_core.h')
-rw-r--r-- | include/net/bluetooth/hci_core.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 7451a9c92d9d..df22efcfcc0b 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -316,10 +316,13 @@ static inline void hci_conn_put(struct hci_conn *conn) | |||
316 | if (atomic_dec_and_test(&conn->refcnt)) { | 316 | if (atomic_dec_and_test(&conn->refcnt)) { |
317 | unsigned long timeo; | 317 | unsigned long timeo; |
318 | if (conn->type == ACL_LINK) { | 318 | if (conn->type == ACL_LINK) { |
319 | timeo = msecs_to_jiffies(HCI_DISCONN_TIMEOUT); | ||
320 | if (!conn->out) | ||
321 | timeo *= 2; | ||
322 | del_timer(&conn->idle_timer); | 319 | del_timer(&conn->idle_timer); |
320 | if (conn->state == BT_CONNECTED) { | ||
321 | timeo = msecs_to_jiffies(HCI_DISCONN_TIMEOUT); | ||
322 | if (!conn->out) | ||
323 | timeo *= 2; | ||
324 | } else | ||
325 | timeo = msecs_to_jiffies(10); | ||
323 | } else | 326 | } else |
324 | timeo = msecs_to_jiffies(10); | 327 | timeo = msecs_to_jiffies(10); |
325 | mod_timer(&conn->disc_timer, jiffies + timeo); | 328 | mod_timer(&conn->disc_timer, jiffies + timeo); |