Re: [PATCH] Bluetooth: hci_sync: avoid dup filtering when passive scanning with adv monitor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Anton,

On Mon, Jul 29, 2024 at 5:06 PM Anton Khirnov <anton@xxxxxxxxxxx> wrote:
>
> This restores behaviour (including the comment) from now-removed
> hci_request.c, and also matches existing code for active scanning.

Make sure you add the Fixes tag with the commit hash that introduced
the problem, since we might want to backport this.

> Without this, the duplicates filter is always active when passive
> scanning, which makes it impossible to work with devices that send
> nontrivial dynamic data in their advertisement reports.
>
> Signed-off-by: Anton Khirnov <anton@xxxxxxxxxxx>
> ---
>  net/bluetooth/hci_sync.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
> index a31d39a821f4..e79cd40bd079 100644
> --- a/net/bluetooth/hci_sync.c
> +++ b/net/bluetooth/hci_sync.c
> @@ -3019,6 +3019,20 @@ static int hci_passive_scan_sync(struct hci_dev *hdev)
>         } else if (hci_is_adv_monitoring(hdev)) {
>                 window = hdev->le_scan_window_adv_monitor;
>                 interval = hdev->le_scan_int_adv_monitor;
> +
> +               /* Disable duplicates filter when scanning for advertisement
> +                * monitor for the following reasons.
> +                *
> +                * For HW pattern filtering (ex. MSFT), Realtek and Qualcomm
> +                * controllers ignore RSSI_Sampling_Period when the duplicates
> +                * filter is enabled.
> +                *
> +                * For SW pattern filtering, when we're not doing interleaved
> +                * scanning, it is necessary to disable duplicates filter,
> +                * otherwise hosts can only receive one advertisement and it's
> +                * impossible to know if a peer is still in range.
> +                */
> +               filter_dups = LE_SCAN_FILTER_DUP_DISABLE;
>         } else {
>                 window = hdev->le_scan_window;
>                 interval = hdev->le_scan_interval;
> --
> 2.39.2
>
>


-- 
Luiz Augusto von Dentz





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux