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>
This commit is contained in:

committed by
Gustavo Padovan

parent
b82c29d81d
commit
38b3fef173
@@ -587,12 +587,18 @@ void hci_conn_put_device(struct hci_conn *conn);
|
||||
|
||||
static inline void hci_conn_hold(struct hci_conn *conn)
|
||||
{
|
||||
BT_DBG("hcon %p refcnt %d -> %d", conn, atomic_read(&conn->refcnt),
|
||||
atomic_read(&conn->refcnt) + 1);
|
||||
|
||||
atomic_inc(&conn->refcnt);
|
||||
cancel_delayed_work(&conn->disc_work);
|
||||
}
|
||||
|
||||
static inline void hci_conn_put(struct hci_conn *conn)
|
||||
{
|
||||
BT_DBG("hcon %p refcnt %d -> %d", conn, atomic_read(&conn->refcnt),
|
||||
atomic_read(&conn->refcnt) - 1);
|
||||
|
||||
if (atomic_dec_and_test(&conn->refcnt)) {
|
||||
unsigned long timeo;
|
||||
if (conn->type == ACL_LINK || conn->type == LE_LINK) {
|
||||
|
Reference in New Issue
Block a user