mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 14:14:37 +00:00
Bluetooth: Check FINDING state in interleaved discovery
In order to do interleaved discovery we should be in DISCOVERY_ FINDING state. Otherwise, discovery should be stopped. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
This commit is contained in:
parent
097db76cdc
commit
bc3dd33cef
1 changed files with 2 additions and 1 deletions
|
@ -1098,7 +1098,8 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev,
|
||||||
|
|
||||||
schedule_delayed_work(&hdev->adv_work, ADV_CLEAR_TIMEOUT);
|
schedule_delayed_work(&hdev->adv_work, ADV_CLEAR_TIMEOUT);
|
||||||
|
|
||||||
if (hdev->discovery.type == DISCOV_TYPE_INTERLEAVED) {
|
if (hdev->discovery.type == DISCOV_TYPE_INTERLEAVED &&
|
||||||
|
hdev->discovery.state == DISCOVERY_FINDING) {
|
||||||
mgmt_interleaved_discovery(hdev);
|
mgmt_interleaved_discovery(hdev);
|
||||||
} else {
|
} else {
|
||||||
hci_dev_lock(hdev);
|
hci_dev_lock(hdev);
|
||||||
|
|
Loading…
Reference in a new issue