1 From b99d91f044ff9360ac03ce7d27eb6aead6cd2d42 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Mon, 1 Mar 2021 09:12:44 +0000
4 Subject: [PATCH] Revert "Bluetooth: Always request for user
5 confirmation for Just Works (LE SC)"
7 This reverts commit ffee202a78c2980688bc5d2f7d56480e69a5e0c9.
9 The commit "Bluetooth: Always request for user confirmation for Just
10 Works" prevents BLE devices pairing in (at least) the Raspberry Pi OS
11 GUI. After reverting it, pairing works again. Although this companion
12 commit ("... (LE SC)") has not been demonstrated to be problematic,
13 it follows the same logic and therefore could affect some use cases.
15 If another solution to the problem is found then this reversion will
18 See: https://github.com/raspberrypi/linux/issues/4139
20 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
22 net/bluetooth/smp.c | 5 +----
23 1 file changed, 1 insertion(+), 4 deletions(-)
25 --- a/net/bluetooth/smp.c
26 +++ b/net/bluetooth/smp.c
27 @@ -2207,7 +2207,7 @@ mackey_and_ltk:
29 return SMP_UNSPECIFIED;
31 - if (smp->method == REQ_OOB) {
32 + if (smp->method == JUST_WORKS || smp->method == REQ_OOB) {
35 SMP_ALLOW_CMD(smp, SMP_CMD_DHKEY_CHECK);
36 @@ -2222,9 +2222,6 @@ mackey_and_ltk:
40 - if (smp->method == JUST_WORKS)
43 err = mgmt_user_confirm_request(hcon->hdev, &hcon->dst, hcon->type,
44 hcon->dst_type, passkey, confirm_hint);