diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-02-19 14:18:31 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-02-19 17:04:24 +0100 |
commit | 95fbac8a8e459262c580ee4172e4713cdc60929b (patch) | |
tree | 4d5950c90f2b12f08e6f171b24e5ae232f5ddab8 /net/bluetooth/smp.c | |
parent | Bluetooth: Move SMP LTK notification after key distribution (diff) | |
download | linux-95fbac8a8e459262c580ee4172e4713cdc60929b.tar.xz linux-95fbac8a8e459262c580ee4172e4713cdc60929b.zip |
Bluetooth: Add support for sending New IRK event
This patch adds the necessary helper function to send the New IRK mgmt
event and makes sure that the function is called at when SMP key
distribution has completed. The event is sent before the New LTK event
so user space knows which remote device to associate with the keys.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to '')
-rw-r--r-- | net/bluetooth/smp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index f05c1b71d99a..f06068072bdd 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -1112,6 +1112,9 @@ static void smp_notify_keys(struct l2cap_conn *conn) struct hci_conn *hcon = conn->hcon; struct hci_dev *hdev = hcon->hdev; + if (smp->remote_irk) + mgmt_new_irk(hdev, smp->remote_irk); + if (smp->ltk) { smp->ltk->bdaddr_type = hcon->dst_type; bacpy(&smp->ltk->bdaddr, &hcon->dst); |