Skip to content

Commit

Permalink
Bluetooth: Add SMP to User Passkey and Confirm
Browse files Browse the repository at this point in the history
Low Energy pairing is performed through the SMP (Security Manager Protocol)
mechanism rather than HCI.

Signed-off-by: Brian Gix <[email protected]>
Acked-by: Marcel Holtmann <[email protected]>
Signed-off-by: Gustavo F. Padovan <[email protected]>
  • Loading branch information
Brian Gix authored and Gustavo F. Padovan committed Dec 22, 2011
1 parent 2b64d15 commit 5fe57d9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 5fe57d9

Please sign in to comment.