aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/hci.h6
-rw-r--r--include/net/bluetooth/hci_core.h9
2 files changed, 12 insertions, 3 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 5f04181b8109..10a3eec191fd 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -297,6 +297,7 @@ struct hci_cp_host_buffer_size {
297 297
298/* Link Control */ 298/* Link Control */
299#define OGF_LINK_CTL 0x01 299#define OGF_LINK_CTL 0x01
300
300#define OCF_CREATE_CONN 0x0005 301#define OCF_CREATE_CONN 0x0005
301struct hci_cp_create_conn { 302struct hci_cp_create_conn {
302 bdaddr_t bdaddr; 303 bdaddr_t bdaddr;
@@ -307,6 +308,11 @@ struct hci_cp_create_conn {
307 __u8 role_switch; 308 __u8 role_switch;
308} __attribute__ ((packed)); 309} __attribute__ ((packed));
309 310
311#define OCF_CREATE_CONN_CANCEL 0x0008
312struct hci_cp_create_conn_cancel {
313 bdaddr_t bdaddr;
314} __attribute__ ((packed));
315
310#define OCF_ACCEPT_CONN_REQ 0x0009 316#define OCF_ACCEPT_CONN_REQ 0x0009
311struct hci_cp_accept_conn_req { 317struct hci_cp_accept_conn_req {
312 bdaddr_t bdaddr; 318 bdaddr_t bdaddr;
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);