diff options
author | David P <megver83@parabola.nu> | 2020-11-19 19:46:46 -0500 |
---|---|---|
committer | David P <megver83@parabola.nu> | 2020-11-19 19:46:46 -0500 |
commit | 7247b6e2821154fa2185b870264a1d4cf426233a (patch) | |
tree | 6326b05eb174d7325b4574d2b2134f7425e61d47 /libre/linux-libre/0002-Bluetooth-Fix-LL-PRivacy-BLE-device-fails-to-connect.patch | |
parent | 10bdcbb591c5123f00ee394750df6063a20f7564 (diff) | |
download | abslibre-7247b6e2821154fa2185b870264a1d4cf426233a.tar.gz abslibre-7247b6e2821154fa2185b870264a1d4cf426233a.tar.bz2 abslibre-7247b6e2821154fa2185b870264a1d4cf426233a.zip |
updpkg: libre/linux-libre 5.9.9-1
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'libre/linux-libre/0002-Bluetooth-Fix-LL-PRivacy-BLE-device-fails-to-connect.patch')
-rw-r--r-- | libre/linux-libre/0002-Bluetooth-Fix-LL-PRivacy-BLE-device-fails-to-connect.patch | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/libre/linux-libre/0002-Bluetooth-Fix-LL-PRivacy-BLE-device-fails-to-connect.patch b/libre/linux-libre/0002-Bluetooth-Fix-LL-PRivacy-BLE-device-fails-to-connect.patch new file mode 100644 index 000000000..ad25fc620 --- /dev/null +++ b/libre/linux-libre/0002-Bluetooth-Fix-LL-PRivacy-BLE-device-fails-to-connect.patch @@ -0,0 +1,67 @@ +From b2e41088d2a2b3dd99f268833d8079d1a98ee3ea Mon Sep 17 00:00:00 2001 +From: Sathish Narasimman <nsathish41@gmail.com> +Date: Thu, 29 Oct 2020 13:18:21 +0530 +Subject: [PATCH 2/2] Bluetooth: Fix: LL PRivacy BLE device fails to connect + +When adding device to white list the device is added to resolving list +also. It has to be added only when HCI_ENABLE_LL_PRIVACY flag is set. +HCI_ENABLE_LL_PRIVACY flag has to be tested before adding/deleting devices +to resolving list. use_ll_privacy macro is used only to check if controller +supports LL_Privacy. + +https://bugzilla.kernel.org/show_bug.cgi?id=209745 + +Fixes: 0eee35bdfa3b ("Bluetooth: Update resolving list when updating whitelist") +Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com> +Signed-off-by: Marcel Holtmann <marcel@holtmann.org> +--- + net/bluetooth/hci_request.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c +index e0269192f2e5..a565c91b8599 100644 +--- a/net/bluetooth/hci_request.c ++++ b/net/bluetooth/hci_request.c +@@ -698,7 +698,8 @@ static void del_from_white_list(struct hci_request *req, bdaddr_t *bdaddr, + cp.bdaddr_type); + hci_req_add(req, HCI_OP_LE_DEL_FROM_WHITE_LIST, sizeof(cp), &cp); + +- if (use_ll_privacy(req->hdev)) { ++ if (use_ll_privacy(req->hdev) && ++ hci_dev_test_flag(req->hdev, HCI_ENABLE_LL_PRIVACY)) { + struct smp_irk *irk; + + irk = hci_find_irk_by_addr(req->hdev, bdaddr, bdaddr_type); +@@ -732,7 +733,8 @@ static int add_to_white_list(struct hci_request *req, + return -1; + + /* White list can not be used with RPAs */ +- if (!allow_rpa && !use_ll_privacy(hdev) && ++ if (!allow_rpa && ++ !hci_dev_test_flag(hdev, HCI_ENABLE_LL_PRIVACY) && + hci_find_irk_by_addr(hdev, ¶ms->addr, params->addr_type)) { + return -1; + } +@@ -750,7 +752,8 @@ static int add_to_white_list(struct hci_request *req, + cp.bdaddr_type); + hci_req_add(req, HCI_OP_LE_ADD_TO_WHITE_LIST, sizeof(cp), &cp); + +- if (use_ll_privacy(hdev)) { ++ if (use_ll_privacy(hdev) && ++ hci_dev_test_flag(hdev, HCI_ENABLE_LL_PRIVACY)) { + struct smp_irk *irk; + + irk = hci_find_irk_by_addr(hdev, ¶ms->addr, +@@ -812,7 +815,8 @@ static u8 update_white_list(struct hci_request *req) + } + + /* White list can not be used with RPAs */ +- if (!allow_rpa && !use_ll_privacy(hdev) && ++ if (!allow_rpa && ++ !hci_dev_test_flag(hdev, HCI_ENABLE_LL_PRIVACY) && + hci_find_irk_by_addr(hdev, &b->bdaddr, b->bdaddr_type)) { + return 0x00; + } +-- +2.29.2 + |