diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-07-18 14:53:10 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-07-18 14:53:10 -0400 |
commit | 0cd06647b7c24f6633e32a505930a9aa70138c22 (patch) | |
tree | 8f2ca456dfd2c8deddf8dfb5d50a0db5b7dda916 /include | |
parent | e8c7b335faca2cbce715da3b0e1663d75d422f5b (diff) | |
parent | e0482103c22957b413db4c4ba35eca3b1e99751d (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Diffstat (limited to 'include')
-rw-r--r-- | include/net/bluetooth/hci.h | 11 | ||||
-rw-r--r-- | include/net/bluetooth/hci_core.h | 8 | ||||
-rw-r--r-- | include/net/bluetooth/l2cap.h | 5 | ||||
-rw-r--r-- | include/net/bluetooth/mgmt.h | 2 |
4 files changed, 19 insertions, 7 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 2a6b0b8b7120..ccd723e0f783 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -139,11 +139,12 @@ enum { | |||
139 | #define HCIINQUIRY _IOR('H', 240, int) | 139 | #define HCIINQUIRY _IOR('H', 240, int) |
140 | 140 | ||
141 | /* HCI timeouts */ | 141 | /* HCI timeouts */ |
142 | #define HCI_DISCONN_TIMEOUT (2000) /* 2 seconds */ | 142 | #define HCI_DISCONN_TIMEOUT msecs_to_jiffies(2000) /* 2 seconds */ |
143 | #define HCI_PAIRING_TIMEOUT (60000) /* 60 seconds */ | 143 | #define HCI_PAIRING_TIMEOUT msecs_to_jiffies(60000) /* 60 seconds */ |
144 | #define HCI_INIT_TIMEOUT (10000) /* 10 seconds */ | 144 | #define HCI_INIT_TIMEOUT msecs_to_jiffies(10000) /* 10 seconds */ |
145 | #define HCI_CMD_TIMEOUT (1000) /* 1 seconds */ | 145 | #define HCI_CMD_TIMEOUT msecs_to_jiffies(1000) /* 1 second */ |
146 | #define HCI_ACL_TX_TIMEOUT (45000) /* 45 seconds */ | 146 | #define HCI_ACL_TX_TIMEOUT msecs_to_jiffies(45000) /* 45 seconds */ |
147 | #define HCI_AUTO_OFF_TIMEOUT msecs_to_jiffies(2000) /* 2 seconds */ | ||
147 | 148 | ||
148 | /* HCI data types */ | 149 | /* HCI data types */ |
149 | #define HCI_COMMAND_PKT 0x01 | 150 | #define HCI_COMMAND_PKT 0x01 |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 20fd57367ddc..475b8c04ba52 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -587,18 +587,24 @@ void hci_conn_put_device(struct hci_conn *conn); | |||
587 | 587 | ||
588 | static inline void hci_conn_hold(struct hci_conn *conn) | 588 | static inline void hci_conn_hold(struct hci_conn *conn) |
589 | { | 589 | { |
590 | BT_DBG("hcon %p refcnt %d -> %d", conn, atomic_read(&conn->refcnt), | ||
591 | atomic_read(&conn->refcnt) + 1); | ||
592 | |||
590 | atomic_inc(&conn->refcnt); | 593 | atomic_inc(&conn->refcnt); |
591 | cancel_delayed_work(&conn->disc_work); | 594 | cancel_delayed_work(&conn->disc_work); |
592 | } | 595 | } |
593 | 596 | ||
594 | static inline void hci_conn_put(struct hci_conn *conn) | 597 | static inline void hci_conn_put(struct hci_conn *conn) |
595 | { | 598 | { |
599 | BT_DBG("hcon %p refcnt %d -> %d", conn, atomic_read(&conn->refcnt), | ||
600 | atomic_read(&conn->refcnt) - 1); | ||
601 | |||
596 | if (atomic_dec_and_test(&conn->refcnt)) { | 602 | if (atomic_dec_and_test(&conn->refcnt)) { |
597 | unsigned long timeo; | 603 | unsigned long timeo; |
598 | if (conn->type == ACL_LINK || conn->type == LE_LINK) { | 604 | if (conn->type == ACL_LINK || conn->type == LE_LINK) { |
599 | del_timer(&conn->idle_timer); | 605 | del_timer(&conn->idle_timer); |
600 | if (conn->state == BT_CONNECTED) { | 606 | if (conn->state == BT_CONNECTED) { |
601 | timeo = msecs_to_jiffies(conn->disc_timeout); | 607 | timeo = conn->disc_timeout; |
602 | if (!conn->out) | 608 | if (!conn->out) |
603 | timeo *= 2; | 609 | timeo *= 2; |
604 | } else { | 610 | } else { |
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index d80e3f0691b4..a7679f8913d2 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -464,6 +464,7 @@ struct l2cap_chan { | |||
464 | 464 | ||
465 | __u16 tx_win; | 465 | __u16 tx_win; |
466 | __u16 tx_win_max; | 466 | __u16 tx_win_max; |
467 | __u16 ack_win; | ||
467 | __u8 max_tx; | 468 | __u8 max_tx; |
468 | __u16 retrans_timeout; | 469 | __u16 retrans_timeout; |
469 | __u16 monitor_timeout; | 470 | __u16 monitor_timeout; |
@@ -672,11 +673,15 @@ enum { | |||
672 | 673 | ||
673 | static inline void l2cap_chan_hold(struct l2cap_chan *c) | 674 | static inline void l2cap_chan_hold(struct l2cap_chan *c) |
674 | { | 675 | { |
676 | BT_DBG("chan %p orig refcnt %d", c, atomic_read(&c->refcnt)); | ||
677 | |||
675 | atomic_inc(&c->refcnt); | 678 | atomic_inc(&c->refcnt); |
676 | } | 679 | } |
677 | 680 | ||
678 | static inline void l2cap_chan_put(struct l2cap_chan *c) | 681 | static inline void l2cap_chan_put(struct l2cap_chan *c) |
679 | { | 682 | { |
683 | BT_DBG("chan %p orig refcnt %d", c, atomic_read(&c->refcnt)); | ||
684 | |||
680 | if (atomic_dec_and_test(&c->refcnt)) | 685 | if (atomic_dec_and_test(&c->refcnt)) |
681 | kfree(c); | 686 | kfree(c); |
682 | } | 687 | } |
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h index 23fd0546fccb..4348ee8bda69 100644 --- a/include/net/bluetooth/mgmt.h +++ b/include/net/bluetooth/mgmt.h | |||
@@ -444,7 +444,7 @@ struct mgmt_ev_auth_failed { | |||
444 | struct mgmt_ev_device_found { | 444 | struct mgmt_ev_device_found { |
445 | struct mgmt_addr_info addr; | 445 | struct mgmt_addr_info addr; |
446 | __s8 rssi; | 446 | __s8 rssi; |
447 | __u8 flags[4]; | 447 | __le32 flags; |
448 | __le16 eir_len; | 448 | __le16 eir_len; |
449 | __u8 eir[0]; | 449 | __u8 eir[0]; |
450 | } __packed; | 450 | } __packed; |