diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-03-24 08:39:05 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-03-24 10:51:56 -0400 |
commit | 4eb65e667ba7070e4798448f5ab8dbbaa4505db0 (patch) | |
tree | 09ccbd9cae272735f3549524d7673c009508a942 /net | |
parent | 81d0c8ad7163d9860374e38a75e2e99d00ac8c17 (diff) |
Bluetooth: Fix SMP confirmation callback handling
In the case that a local pairing confirmation (JUST_CFM) has been
selected as the method we need to use the user confirm request mgmt
event for it with the confirm_hint set to 1 (to indicate confirmation
without any specific passkey value). Without this (if passkey_notify was
used) the pairing would never proceed. This patch adds the necessary
call to mgmt_user_confirm_request in this scenario.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/smp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index b8c31467a7ac..97e95c849fff 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c | |||
@@ -422,6 +422,10 @@ static int tk_request(struct l2cap_conn *conn, u8 remote_oob, u8 auth, | |||
422 | if (method == REQ_PASSKEY) | 422 | if (method == REQ_PASSKEY) |
423 | ret = mgmt_user_passkey_request(hcon->hdev, &hcon->dst, | 423 | ret = mgmt_user_passkey_request(hcon->hdev, &hcon->dst, |
424 | hcon->type, hcon->dst_type); | 424 | hcon->type, hcon->dst_type); |
425 | else if (method == JUST_CFM) | ||
426 | ret = mgmt_user_confirm_request(hcon->hdev, &hcon->dst, | ||
427 | hcon->type, hcon->dst_type, | ||
428 | passkey, 1); | ||
425 | else | 429 | else |
426 | ret = mgmt_user_passkey_notify(hcon->hdev, &hcon->dst, | 430 | ret = mgmt_user_passkey_notify(hcon->hdev, &hcon->dst, |
427 | hcon->type, hcon->dst_type, | 431 | hcon->type, hcon->dst_type, |