Skip to content

Commit d6a12dd

Browse files
pelwellpopcornmix
authored andcommitted
Revert "Bluetooth: Always request for user confirmation for Just Works (LE SC)"
This reverts commit ffee202. 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: #4139 Signed-off-by: Phil Elwell <[email protected]>
1 parent d679763 commit d6a12dd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

net/bluetooth/smp.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -2215,7 +2215,7 @@ static u8 smp_cmd_pairing_random(struct l2cap_conn *conn, struct sk_buff *skb)
22152215
if (err)
22162216
return SMP_UNSPECIFIED;
22172217

2218-
if (smp->method == REQ_OOB) {
2218+
if (smp->method == JUST_WORKS || smp->method == REQ_OOB) {
22192219
if (test_bit(SMP_FLAG_INITIATOR, &smp->flags)) {
22202220
sc_dhkey_check(smp);
22212221
SMP_ALLOW_CMD(smp, SMP_CMD_DHKEY_CHECK);
@@ -2230,9 +2230,6 @@ static u8 smp_cmd_pairing_random(struct l2cap_conn *conn, struct sk_buff *skb)
22302230
confirm_hint = 0;
22312231

22322232
confirm:
2233-
if (smp->method == JUST_WORKS)
2234-
confirm_hint = 1;
2235-
22362233
err = mgmt_user_confirm_request(hcon->hdev, &hcon->dst, hcon->type,
22372234
hcon->dst_type, passkey, confirm_hint);
22382235
if (err)

0 commit comments

Comments
 (0)