aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth
diff options
context:
space:
mode:
authorJakub Pawlowski <jpawlowski@google.com>2015-02-02 02:07:54 -0500
committerMarcel Holtmann <marcel@holtmann.org>2015-02-02 02:52:33 -0500
commit2d28cfe7aada495f87bb439151e9bcc86998fb6d (patch)
tree732485826c4bf96c215fc716926e9a31809b5c69 /include/net/bluetooth
parent3251ca334bcc379b4685bf6850bf38db365cbe6f (diff)
Bluetooth: Add le_scan_restart work for LE scan restarting
Currently there is no way to restart le scan, and it's needed in service scan method. The way it work: it disable, and then enable le scan on controller. During the restart, we must remember when the scan was started, and it's duration, to later re-schedule the le_scan_disable work, that was stopped during the stop scan phase. Signed-off-by: Jakub Pawlowski <jpawlowski@google.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r--include/net/bluetooth/hci_core.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index a37e10f4e2b3..d3a232be9d9b 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -79,6 +79,8 @@ struct discovery_state {
79 s8 rssi; 79 s8 rssi;
80 u16 uuid_count; 80 u16 uuid_count;
81 u8 (*uuids)[16]; 81 u8 (*uuids)[16];
82 unsigned long scan_start;
83 unsigned long scan_duration;
82}; 84};
83 85
84struct hci_conn_hash { 86struct hci_conn_hash {
@@ -354,6 +356,7 @@ struct hci_dev {
354 unsigned long dev_flags; 356 unsigned long dev_flags;
355 357
356 struct delayed_work le_scan_disable; 358 struct delayed_work le_scan_disable;
359 struct delayed_work le_scan_restart;
357 360
358 __s8 adv_tx_power; 361 __s8 adv_tx_power;
359 __u8 adv_data[HCI_MAX_AD_LENGTH]; 362 __u8 adv_data[HCI_MAX_AD_LENGTH];
@@ -531,6 +534,8 @@ static inline void hci_discovery_filter_clear(struct hci_dev *hdev)
531 hdev->discovery.uuid_count = 0; 534 hdev->discovery.uuid_count = 0;
532 kfree(hdev->discovery.uuids); 535 kfree(hdev->discovery.uuids);
533 hdev->discovery.uuids = NULL; 536 hdev->discovery.uuids = NULL;
537 hdev->discovery.scan_start = 0;
538 hdev->discovery.scan_duration = 0;
534} 539}
535 540
536bool hci_discovery_active(struct hci_dev *hdev); 541bool hci_discovery_active(struct hci_dev *hdev);