summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorBrian Gix <bgix@codeaurora.org>2011-12-21 16:12:13 -0800
committerGustavo F. Padovan <padovan@profusion.mobi>2011-12-22 14:19:03 -0200
commit5fe57d9e9edb9182d1fa941b94902444c3174ccd (patch)
tree03174e466bdba4a1d72f9ae29d0f43424f5625f9 /net
parent2b64d153a0cc9d2b60e47be013cde8490f16e0a5 (diff)
downloadlinux-stable-5fe57d9e9edb9182d1fa941b94902444c3174ccd.tar.gz
linux-stable-5fe57d9e9edb9182d1fa941b94902444c3174ccd.tar.bz2
linux-stable-5fe57d9e9edb9182d1fa941b94902444c3174ccd.zip
Bluetooth: Add SMP to User Passkey and Confirm
Low Energy pairing is performed through the SMP (Security Manager Protocol) mechanism rather than HCI. Signed-off-by: Brian Gix <bgix@codeaurora.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/mgmt.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index fbcbef6ecceb..2540944d871f 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -30,6 +30,7 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/mgmt.h>
+#include <net/bluetooth/smp.h>
#define MGMT_VERSION 0
#define MGMT_REVISION 1
@@ -1642,8 +1643,15 @@ static int user_pairing_resp(struct sock *sk, u16 index, bdaddr_t *bdaddr,
}
/* Continue with pairing via SMP */
+ err = smp_user_confirm_reply(conn, mgmt_op, passkey);
+
+ if (!err)
+ err = cmd_status(sk, index, mgmt_op,
+ MGMT_STATUS_SUCCESS);
+ else
+ err = cmd_status(sk, index, mgmt_op,
+ MGMT_STATUS_FAILED);
- err = cmd_status(sk, index, mgmt_op, MGMT_STATUS_SUCCESS);
goto done;
}