bcm27xx: add support for linux v5.15
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.15 / 950-0031-Revert-Bluetooth-Always-request-for-user-confirmatio.patch
1 From 0d96dec62add659cc6189c629b465a903a1ff235 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Mon, 1 Mar 2021 09:14:35 +0000
4 Subject: [PATCH] Revert "Bluetooth: Always request for user
5 confirmation for Just Works"
6
7 This reverts commit 92516cd97fd4d8ad5b1421a0d51771044f453a5f.
8
9 Thi 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.
12
13 If another solution to the problem is found then this reversion will
14 be removed.
15
16 See: https://github.com/raspberrypi/linux/issues/4139
17
18 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
19 ---
20 net/bluetooth/smp.c | 11 ++---------
21 1 file changed, 2 insertions(+), 9 deletions(-)
22
23 --- a/net/bluetooth/smp.c
24 +++ b/net/bluetooth/smp.c
25 @@ -883,16 +883,9 @@ static int tk_request(struct l2cap_conn
26 hcon->io_capability == HCI_IO_NO_INPUT_OUTPUT)
27 smp->method = JUST_WORKS;
28
29 - /* If Just Works, Continue with Zero TK and ask user-space for
30 - * confirmation */
31 + /* If Just Works, Continue with Zero TK */
32 if (smp->method == JUST_WORKS) {
33 - ret = mgmt_user_confirm_request(hcon->hdev, &hcon->dst,
34 - hcon->type,
35 - hcon->dst_type,
36 - passkey, 1);
37 - if (ret)
38 - return ret;
39 - set_bit(SMP_FLAG_WAIT_USER, &smp->flags);
40 + set_bit(SMP_FLAG_TK_VALID, &smp->flags);
41 return 0;
42 }
43