Bluetooth: Add support for reusing the same hci_conn for LE links
authorVinicius Costa Gomes <vinicius.gomes@openbossa.org>
Fri, 20 Apr 2012 18:46:08 +0000 (15:46 -0300)
committerGustavo Padovan <gustavo@padovan.org>
Wed, 9 May 2012 04:40:41 +0000 (01:40 -0300)
commit9f0caeb1deafa9a894ee03134f6642c3a245b1af
tree01e7466dfb3a68fc92fd5649ac77f6ab620088fb
parentc22876814ee9cc72f84996b78203b5530c61bee8
Bluetooth: Add support for reusing the same hci_conn for LE links

As most LE devices leave advertising mode when they enter the connected
state, we may want to "pass" that connection to other users.

The first user will be the pairing procedure, the connection is
established without an associated socket, after the pairing is
complete, userspace may want to discover via GATT what services the
newly bonded device has.

If userspace establishes the connection while the timeout still
hasn't expired, the connection will be re-used.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Tested-by: João Paulo Rechi Vita <jprvita@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
net/bluetooth/hci_conn.c
net/bluetooth/l2cap_core.c