summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHoward Chung <howardchung@google.com>2020-11-26 07:22:21 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2020-12-07 18:00:43 +0300
commitc4f1f408168cd6a83d973e98e1cd1888e4d3d907 (patch)
treed0fba88aa0572ebc929f0118295cc9ecef8dc2e0 /include
parenta31489d2a368d2f9225ed6a6f595c63bc7d10de8 (diff)
downloadlinux-c4f1f408168cd6a83d973e98e1cd1888e4d3d907.tar.xz
Bluetooth: Interleave with allowlist scan
This patch implements the interleaving between allowlist scan and no-filter scan. It'll be used to save power when at least one monitor is registered and at least one pending connection or one device to be scanned for. The durations of the allowlist scan and the no-filter scan are controlled by MGMT command: Set Default System Configuration. The default values are set randomly for now. Signed-off-by: Howard Chung <howardchung@google.com> Reviewed-by: Alain Michaud <alainm@chromium.org> Reviewed-by: Manish Mandlik <mmandlik@chromium.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/bluetooth/hci_core.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 9873e1c8cd16..cfede18709d8 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -361,6 +361,8 @@ struct hci_dev {
__u8 ssp_debug_mode;
__u8 hw_error_code;
__u32 clock;
+ __u16 advmon_allowlist_duration;
+ __u16 advmon_no_filter_duration;
__u16 devid_source;
__u16 devid_vendor;
@@ -542,6 +544,14 @@ struct hci_dev {
struct delayed_work rpa_expired;
bdaddr_t rpa;
+ enum {
+ INTERLEAVE_SCAN_NONE,
+ INTERLEAVE_SCAN_NO_FILTER,
+ INTERLEAVE_SCAN_ALLOWLIST
+ } interleave_scan_state;
+
+ struct delayed_work interleave_scan;
+
#if IS_ENABLED(CONFIG_BT_LEDS)
struct led_trigger *power_led;
#endif