aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2012-06-15 04:50:28 -0400
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-06-30 10:41:24 -0400
commit38b3fef1730319e2730af3fc9f73698e3a9aeb4a (patch)
tree28a2d3cebb79bf7ce6dff00f27da730cc92562f5 /include
parentb82c29d81df0ead8b66041702d1dd88e778ab806 (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')
-rw-r--r--include/net/bluetooth/hci_core.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 75766b7f0dc..475b8c04ba5 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
588static inline void hci_conn_hold(struct hci_conn *conn) 588static 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
594static inline void hci_conn_put(struct hci_conn *conn) 597static 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) {