Message ID | 20240729155546.20932-1-anton@khirnov.net (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Bluetooth: hci_sync: avoid dup filtering when passive scanning with adv monitor | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | success | CheckPatch PASS |
tedd_an/GitLint | success | Gitlint PASS |
tedd_an/SubjectPrefix | success | Gitlint PASS |
tedd_an/BuildKernel | success | BuildKernel PASS |
tedd_an/CheckAllWarning | success | CheckAllWarning PASS |
tedd_an/CheckSparse | success | CheckSparse PASS |
tedd_an/CheckSmatch | success | CheckSparse PASS |
tedd_an/BuildKernel32 | success | BuildKernel32 PASS |
tedd_an/TestRunnerSetup | success | TestRunnerSetup PASS |
tedd_an/TestRunner_l2cap-tester | success | TestRunner PASS |
tedd_an/TestRunner_iso-tester | fail | TestRunner_iso-tester: Total: 122, Passed: 117 (95.9%), Failed: 1, Not Run: 4 |
tedd_an/TestRunner_bnep-tester | success | TestRunner PASS |
tedd_an/TestRunner_mgmt-tester | success | TestRunner PASS |
tedd_an/TestRunner_rfcomm-tester | success | TestRunner PASS |
tedd_an/TestRunner_sco-tester | success | TestRunner PASS |
tedd_an/TestRunner_ioctl-tester | success | TestRunner PASS |
tedd_an/TestRunner_mesh-tester | success | TestRunner PASS |
tedd_an/TestRunner_smp-tester | success | TestRunner PASS |
tedd_an/TestRunner_userchan-tester | success | TestRunner PASS |
tedd_an/IncrementalBuild | success | Incremental Build PASS |
Hi Anton, On Mon, Jul 29, 2024 at 5:06 PM Anton Khirnov <anton@khirnov.net> 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@khirnov.net> > --- > 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 > >
This is automated email and please do not reply to this email! Dear submitter, Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series: PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=874636 ---Test result--- Test Summary: CheckPatch PASS 0.67 seconds GitLint PASS 0.32 seconds SubjectPrefix PASS 0.13 seconds BuildKernel PASS 29.39 seconds CheckAllWarning PASS 31.89 seconds CheckSparse PASS 37.55 seconds CheckSmatch PASS 101.62 seconds BuildKernel32 PASS 28.38 seconds TestRunnerSetup PASS 521.34 seconds TestRunner_l2cap-tester PASS 19.81 seconds TestRunner_iso-tester FAIL 37.01 seconds TestRunner_bnep-tester PASS 4.83 seconds TestRunner_mgmt-tester PASS 115.55 seconds TestRunner_rfcomm-tester PASS 7.47 seconds TestRunner_sco-tester PASS 14.98 seconds TestRunner_ioctl-tester PASS 7.84 seconds TestRunner_mesh-tester PASS 7.07 seconds TestRunner_smp-tester PASS 6.88 seconds TestRunner_userchan-tester PASS 5.03 seconds IncrementalBuild PASS 27.52 seconds Details ############################## Test: TestRunner_iso-tester - FAIL Desc: Run iso-tester with test-runner Output: Total: 122, Passed: 117 (95.9%), Failed: 1, Not Run: 4 Failed Test Cases ISO Connect Suspend - Success Failed 4.180 seconds --- Regards, Linux Bluetooth
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;
This restores behaviour (including the comment) from now-removed hci_request.c, and also matches existing code for active scanning. 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@khirnov.net> --- net/bluetooth/hci_sync.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)