mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
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>
This commit is contained in:
parent
3251ca334b
commit
2d28cfe7aa
3 changed files with 97 additions and 1 deletions
|
|
@ -79,6 +79,8 @@ struct discovery_state {
|
|||
s8 rssi;
|
||||
u16 uuid_count;
|
||||
u8 (*uuids)[16];
|
||||
unsigned long scan_start;
|
||||
unsigned long scan_duration;
|
||||
};
|
||||
|
||||
struct hci_conn_hash {
|
||||
|
|
@ -354,6 +356,7 @@ struct hci_dev {
|
|||
unsigned long dev_flags;
|
||||
|
||||
struct delayed_work le_scan_disable;
|
||||
struct delayed_work le_scan_restart;
|
||||
|
||||
__s8 adv_tx_power;
|
||||
__u8 adv_data[HCI_MAX_AD_LENGTH];
|
||||
|
|
@ -531,6 +534,8 @@ static inline void hci_discovery_filter_clear(struct hci_dev *hdev)
|
|||
hdev->discovery.uuid_count = 0;
|
||||
kfree(hdev->discovery.uuids);
|
||||
hdev->discovery.uuids = NULL;
|
||||
hdev->discovery.scan_start = 0;
|
||||
hdev->discovery.scan_duration = 0;
|
||||
}
|
||||
|
||||
bool hci_discovery_active(struct hci_dev *hdev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue