summaryrefslogtreecommitdiff
path: root/net/bluetooth/smp.c
diff options
context:
space:
mode:
authorPhilippe Langlais <philippe.langlais@stericsson.com>2012-04-06 11:51:14 +0200
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-04-06 11:51:14 +0200
commit3b5766214a67f24913d4e046fc30eed7ec0ddc35 (patch)
tree65388dec2a13f78ede772136281607ae6c8ca9b7 /net/bluetooth/smp.c
parent70526554173aa46c8b13a59992b6fbc555fd4ee0 (diff)
parent78be8d8ebeafc24368e897c7fc78c301c1caf3c8 (diff)
Merge remote-tracking branch 'jstultz/linaro-android-3.3' into stable-android-ux500-3.3-1
Conflicts: arch/arm/common/Makefile drivers/gpu/Makefile drivers/misc/Kconfig drivers/misc/Makefile drivers/mmc/card/block.c drivers/mmc/core/core.c drivers/video/Kconfig include/net/bluetooth/hci.h include/net/bluetooth/hci_core.h include/net/bluetooth/sco.h kernel/printk.c net/bluetooth/hci_conn.c net/bluetooth/hci_event.c net/bluetooth/l2cap_core.c net/bluetooth/mgmt.c net/bluetooth/sco.c
Diffstat (limited to 'net/bluetooth/smp.c')
-rw-r--r--net/bluetooth/smp.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 32c47de3034..32a22b28440 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -783,6 +783,17 @@ int smp_conn_security(struct l2cap_conn *conn, __u8 sec_level)
if (hcon->link_mode & HCI_LM_MASTER) {
struct smp_cmd_pairing cp;
+ struct link_key *key;
+
+ key = hci_find_link_key_type(hcon->hdev, conn->dst,
+ HCI_LK_SMP_LTK);
+ if (key) {
+ struct key_master_id *master = (void *) key->data;
+
+ hci_le_start_enc(hcon, master->ediv, master->rand,
+ key->val);
+ goto done;
+ }
build_pairing_cmd(conn, &cp, NULL, authreq);
smp->preq[0] = SMP_CMD_PAIRING_REQ;