]> git.karo-electronics.de Git - linux-beck.git/commit
Bluetooth: A2MP: Do not reference hci_conn
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Thu, 31 May 2012 08:01:37 +0000 (11:01 +0300)
committerJohan Hedberg <johan.hedberg@intel.com>
Tue, 5 Jun 2012 03:34:14 +0000 (06:34 +0300)
commit3cabbfdad3150e0083a64c951701c970ef970c77
tree06cac37ffdf14a90f19d1712418a1ef9d0ffce97
parentfd83e2c27c1bd8b0e9dc7596339c2411385f8b0c
Bluetooth: A2MP: Do not reference hci_conn

Make A2MP channel special channel which do not reference hci_conn.
This prevents from keeping ACL connection open when all L2CAP
channels got closed.

hci_conn_hold and hci_conn_put are not reference counts on the
hci_conn structure in the typical way.  They are reference counts for
the ACL.  When you do the last hci_conn_put, the ACL is disconnected
after a timeout.

Reported-by: Mat Martineau <mathewm@codeaurora.org>
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/a2mp.c
net/bluetooth/l2cap_core.c