Skip to content

Commit

Permalink
Bluetooth: Check FINDING state in interleaved discovery
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andre Guedes authored and Gustavo Padovan committed May 9, 2012
1 parent 097db76 commit bc3dd33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bc3dd33

Please sign in to comment.