Skip to content

Commit b5431dc

Browse files
elenrilVudentz
authored andcommitted
Bluetooth: hci_sync: avoid dup filtering when passive scanning with adv monitor
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. Fixes: abfeea4 ("Bluetooth: hci_sync: Convert MGMT_OP_START_DISCOVERY") Signed-off-by: Anton Khirnov <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent c531e63 commit b5431dc

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

net/bluetooth/hci_sync.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3019,6 +3019,20 @@ static int hci_passive_scan_sync(struct hci_dev *hdev)
30193019
} else if (hci_is_adv_monitoring(hdev)) {
30203020
window = hdev->le_scan_window_adv_monitor;
30213021
interval = hdev->le_scan_int_adv_monitor;
3022+
3023+
/* Disable duplicates filter when scanning for advertisement
3024+
* monitor for the following reasons.
3025+
*
3026+
* For HW pattern filtering (ex. MSFT), Realtek and Qualcomm
3027+
* controllers ignore RSSI_Sampling_Period when the duplicates
3028+
* filter is enabled.
3029+
*
3030+
* For SW pattern filtering, when we're not doing interleaved
3031+
* scanning, it is necessary to disable duplicates filter,
3032+
* otherwise hosts can only receive one advertisement and it's
3033+
* impossible to know if a peer is still in range.
3034+
*/
3035+
filter_dups = LE_SCAN_FILTER_DUP_DISABLE;
30223036
} else {
30233037
window = hdev->le_scan_window;
30243038
interval = hdev->le_scan_interval;

0 commit comments

Comments
 (0)