2024-05-10 11:19:19 +00:00
|
|
|
From eaeca896d077e9e42866f7f7caae7b62211a0d0d Mon Sep 17 00:00:00 2001
|
|
|
|
From: Phil Elwell <phil@raspberrypi.com>
|
|
|
|
Date: Mon, 1 Mar 2021 09:12:44 +0000
|
|
|
|
Subject: [PATCH 0058/1085] Revert "Bluetooth: Always request for user
|
|
|
|
confirmation for Just Works (LE SC)"
|
|
|
|
|
|
|
|
This reverts commit ffee202a78c2980688bc5d2f7d56480e69a5e0c9.
|
|
|
|
|
|
|
|
The commit "Bluetooth: Always request for user confirmation for Just
|
|
|
|
Works" prevents BLE devices pairing in (at least) the Raspberry Pi OS
|
|
|
|
GUI. After reverting it, pairing works again. Although this companion
|
|
|
|
commit ("... (LE SC)") has not been demonstrated to be problematic,
|
|
|
|
it follows the same logic and therefore could affect some use cases.
|
|
|
|
|
|
|
|
If another solution to the problem is found then this reversion will
|
|
|
|
be removed.
|
|
|
|
|
|
|
|
See: https://github.com/raspberrypi/linux/issues/4139
|
|
|
|
|
|
|
|
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
|
|
|
---
|
|
|
|
net/bluetooth/smp.c | 5 +----
|
|
|
|
1 file changed, 1 insertion(+), 4 deletions(-)
|
|
|
|
|
|
|
|
--- a/net/bluetooth/smp.c
|
|
|
|
+++ b/net/bluetooth/smp.c
|
2024-09-12 11:14:13 +00:00
|
|
|
@@ -2215,7 +2215,7 @@ mackey_and_ltk:
|
2024-05-10 11:19:19 +00:00
|
|
|
if (err)
|
|
|
|
return SMP_UNSPECIFIED;
|
|
|
|
|
|
|
|
- if (smp->method == REQ_OOB) {
|
|
|
|
+ if (smp->method == JUST_WORKS || smp->method == REQ_OOB) {
|
2024-08-29 17:38:03 +00:00
|
|
|
if (test_bit(SMP_FLAG_INITIATOR, &smp->flags)) {
|
2024-05-10 11:19:19 +00:00
|
|
|
sc_dhkey_check(smp);
|
|
|
|
SMP_ALLOW_CMD(smp, SMP_CMD_DHKEY_CHECK);
|
2024-09-12 11:14:13 +00:00
|
|
|
@@ -2230,9 +2230,6 @@ mackey_and_ltk:
|
2024-05-10 11:19:19 +00:00
|
|
|
confirm_hint = 0;
|
|
|
|
|
|
|
|
confirm:
|
|
|
|
- if (smp->method == JUST_WORKS)
|
|
|
|
- confirm_hint = 1;
|
|
|
|
-
|
|
|
|
err = mgmt_user_confirm_request(hcon->hdev, &hcon->dst, hcon->type,
|
|
|
|
hcon->dst_type, passkey, confirm_hint);
|
|
|
|
if (err)
|