Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc3dd33c authored by Andre Guedes's avatar Andre Guedes Committed by Gustavo Padovan
Browse files

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: default avatarAndre Guedes <andre.guedes@openbossa.org>
Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
parent 097db76c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);

		if (hdev->discovery.type == DISCOV_TYPE_INTERLEAVED) {
		if (hdev->discovery.type == DISCOV_TYPE_INTERLEAVED &&
		    hdev->discovery.state == DISCOVERY_FINDING) {
			mgmt_interleaved_discovery(hdev);
		} else {
			hci_dev_lock(hdev);