aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Gix <bgix@codeaurora.org>2011-12-21 19:12:13 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2011-12-22 11:19:03 -0500
commit5fe57d9e9edb9182d1fa941b94902444c3174ccd (patch)
tree03174e466bdba4a1d72f9ae29d0f43424f5625f9
parent2b64d153a0cc9d2b60e47be013cde8490f16e0a5 (diff)
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>
-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 fbcbef6ecce..2540944d871 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -30,6 +30,7 @@
30#include <net/bluetooth/bluetooth.h> 30#include <net/bluetooth/bluetooth.h>
31#include <net/bluetooth/hci_core.h> 31#include <net/bluetooth/hci_core.h>
32#include <net/bluetooth/mgmt.h> 32#include <net/bluetooth/mgmt.h>
33#include <net/bluetooth/smp.h>
33 34
34#define MGMT_VERSION 0 35#define MGMT_VERSION 0
35#define MGMT_REVISION 1 36#define MGMT_REVISION 1
@@ -1642,8 +1643,15 @@ static int user_pairing_resp(struct sock *sk, u16 index, bdaddr_t *bdaddr,
1642 } 1643 }
1643 1644
1644 /* Continue with pairing via SMP */ 1645 /* Continue with pairing via SMP */
1646 err = smp_user_confirm_reply(conn, mgmt_op, passkey);
1647
1648 if (!err)
1649 err = cmd_status(sk, index, mgmt_op,
1650 MGMT_STATUS_SUCCESS);
1651 else
1652 err = cmd_status(sk, index, mgmt_op,
1653 MGMT_STATUS_FAILED);
1645 1654
1646 err = cmd_status(sk, index, mgmt_op, MGMT_STATUS_SUCCESS);
1647 goto done; 1655 goto done;
1648 } 1656 }
1649 1657