mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
Bluetooth: hci_sync: scan unfiltered for host-resolved RPAs
Restore unfiltered scanning for pending IRK peers when the controller
cannot resolve private addresses. Keep accept-list filtering while
suspended and when forced by periodic advertising synchronization.
Fixes: e209e5ccc5 ("Bluetooth: MGMT: Mark LL Privacy as stable")
Assisted-by: OpenCode:gpt-6.1-sol
Signed-off-by: Kyle Pepper <cochcoder@proton.me>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
5874f8d032
commit
397464709a
|
|
@ -2618,7 +2618,7 @@ static int hci_le_set_privacy_mode_sync(struct hci_dev *hdev,
|
|||
*/
|
||||
static int hci_le_add_accept_list_sync(struct hci_dev *hdev,
|
||||
struct conn_params *params,
|
||||
u8 *num_entries)
|
||||
u8 *num_entries, bool force_filter)
|
||||
{
|
||||
struct hci_cp_le_add_to_accept_list cp;
|
||||
int err;
|
||||
|
|
@ -2631,6 +2631,11 @@ static int hci_le_add_accept_list_sync(struct hci_dev *hdev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Host-resolved peers need unfiltered scanning while awake. */
|
||||
if (!force_filter && !hdev->suspended && !ll_privacy_capable(hdev) &&
|
||||
hci_find_irk_by_addr(hdev, ¶ms->addr, params->addr_type))
|
||||
return -EINVAL;
|
||||
|
||||
/* Select filter policy to accept all advertising */
|
||||
if (*num_entries >= hdev->le_accept_list_size)
|
||||
return -ENOSPC;
|
||||
|
|
@ -2956,7 +2961,7 @@ static u8 hci_update_accept_list_sync(struct hci_dev *hdev)
|
|||
|
||||
num_entries = 1;
|
||||
err = hci_le_add_accept_list_sync(hdev, &pa,
|
||||
&num_entries);
|
||||
&num_entries, true);
|
||||
goto done;
|
||||
} else {
|
||||
rcu_read_unlock();
|
||||
|
|
@ -3020,7 +3025,7 @@ static u8 hci_update_accept_list_sync(struct hci_dev *hdev)
|
|||
|
||||
for (i = 0; i < n; ++i) {
|
||||
err = hci_le_add_accept_list_sync(hdev, ¶ms[i],
|
||||
&num_entries);
|
||||
&num_entries, false);
|
||||
if (err) {
|
||||
kvfree(params);
|
||||
goto done;
|
||||
|
|
@ -3042,7 +3047,7 @@ static u8 hci_update_accept_list_sync(struct hci_dev *hdev)
|
|||
|
||||
for (i = 0; i < n; ++i) {
|
||||
err = hci_le_add_accept_list_sync(hdev, ¶ms[i],
|
||||
&num_entries);
|
||||
&num_entries, false);
|
||||
if (err) {
|
||||
kvfree(params);
|
||||
goto done;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user