OSDN Git Service

Bluetooth: Defer connection-parameter removal when unpairing
authorAlfonso Acosta <fons@spotify.com>
Sat, 11 Oct 2014 21:44:47 +0000 (21:44 +0000)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 25 Oct 2014 05:56:24 +0000 (07:56 +0200)
commit89cbb0638e9b7ba6fab02558f47a29f144df1a19
tree0808b4e401c0b3b4d1cf4cfd4e731c691908d97f
parentc37a8106de1b8d286fe577599ccc9bbb0efdd7ad
Bluetooth: Defer connection-parameter removal when unpairing

Systematically removing the LE connection parameters and autoconnect
action is inconvenient for rebonding without disconnecting from
userland (i.e. unpairing followed by repairing without
disconnecting). The parameters will be lost after unparing and
userland needs to take care of book-keeping them and re-adding them.

This patch allows userland to forget about parameter management when
rebonding without disconnecting. It defers clearing the connection
parameters when unparing without disconnecting, giving a chance of
keeping the parameters if a repairing happens before the connection is
closed.

Signed-off-by: Alfonso Acosta <fons@spotify.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_conn.c
net/bluetooth/mgmt.c