summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorVinicius Costa Gomes2012-02-03 01:08:05 +0100
committerJohan Hedberg2012-02-13 16:01:33 +0100
commit261cc5aa9e54aac633dcc3b6469739cb6e23e21a (patch)
tree52d39d6a4c9b83998e5fe64e6e448e6d429e775d /net/bluetooth/hci_core.c
parentBluetooth: Clean up structures left unused (diff)
downloadkernel-qcow2-linux-261cc5aa9e54aac633dcc3b6469739cb6e23e21a.tar.gz
kernel-qcow2-linux-261cc5aa9e54aac633dcc3b6469739cb6e23e21a.tar.xz
kernel-qcow2-linux-261cc5aa9e54aac633dcc3b6469739cb6e23e21a.zip
Bluetooth: Add support for notifying userspace of new LTK's
If we want to have proper pairing support over LE we need to inform userspace that a new LTK is available, so userspace can store that key permanently. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 84b7a9e4f2f6..76dc1538e321 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1338,6 +1338,9 @@ int hci_add_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 addr_type, u8 type,
if (!new_key)
return 0;
+ if (type & HCI_SMP_LTK)
+ mgmt_new_ltk(hdev, key, 1);
+
return 0;
}