Bluetooth: Fix SMP debug key handling
authorJohan Hedberg <johan.hedberg@intel.com>
Wed, 3 Dec 2014 10:43:39 +0000 (12:43 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 3 Dec 2014 15:51:22 +0000 (16:51 +0100)
commit923e24143efe654553cabdb08f369d3789413147
tree858d8ecb70983a376367886dbaf7f40f29f4ddf6
parent06edf8deb55dbdcda2177da31d75ac79ccdc5841
Bluetooth: Fix SMP debug key handling

We need to keep debug keys around at least until the point that they are
used - otherwise e.g. slave role behavior wouldn't work as there'd be no
key to be looked up. The correct behavior should therefore be to return
any stored keys but when we clean up the SMP context to remove the key
from the hdev list if keeping debug keys around hasn't been requestsed.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_core.c
net/bluetooth/smp.c