diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-06-15 04:50:28 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-06-30 10:41:24 -0400 |
commit | 38b3fef1730319e2730af3fc9f73698e3a9aeb4a (patch) | |
tree | 28a2d3cebb79bf7ce6dff00f27da730cc92562f5 /include/net/bluetooth/hci_core.h | |
parent | b82c29d81df0ead8b66041702d1dd88e778ab806 (diff) |
Bluetooth: Improve debugging messages for hci_conn
Improve debugging of hci_conn objects by: adding print to hci_conn
refcounting, adding object spcifier when missing, change conn to hcon
since conn is heavily used for l2cap_conn objects and this is misleading.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'include/net/bluetooth/hci_core.h')
-rw-r--r-- | include/net/bluetooth/hci_core.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 75766b7f0dc7..475b8c04ba52 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -587,12 +587,18 @@ 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) { |