Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290927
b: refs/heads/master
c: c599008
h: refs/heads/master
i:
  290925: 9fc1a86
  290923: 88bc348
  290919: 71fbf12
  290911: f7fbdf4
v: v3
  • Loading branch information
Andre Guedes authored and Johan Hedberg committed Feb 13, 2012
1 parent 72f3954 commit d72cf2a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8af59467412b4b61850d3ccb3737c09ecc6dc100
refs/heads/master: c599008f8f999dab8cb4a6404be99bdc4716ba15
1 change: 1 addition & 0 deletions trunk/include/net/bluetooth/hci_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ struct discovery_state {
DISCOVERY_STOPPED,
DISCOVERY_STARTING,
DISCOVERY_INQUIRY,
DISCOVERY_LE_SCAN,
DISCOVERY_RESOLVING,
DISCOVERY_STOPPING,
} state;
Expand Down
2 changes: 2 additions & 0 deletions trunk/net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ bool hci_discovery_active(struct hci_dev *hdev)
struct discovery_state *discov = &hdev->discovery;

if (discov->state == DISCOVERY_INQUIRY ||
discov->state == DISCOVERY_LE_SCAN ||
discov->state == DISCOVERY_RESOLVING)
return true;

Expand All @@ -381,6 +382,7 @@ void hci_discovery_set_state(struct hci_dev *hdev, int state)
case DISCOVERY_STARTING:
break;
case DISCOVERY_INQUIRY:
case DISCOVERY_LE_SCAN:
mgmt_discovering(hdev, 1);
break;
case DISCOVERY_RESOLVING:
Expand Down
5 changes: 5 additions & 0 deletions trunk/net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1056,12 +1056,17 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev,

hci_dev_lock(hdev);
hci_adv_entries_clear(hdev);
hci_discovery_set_state(hdev, DISCOVERY_LE_SCAN);
hci_dev_unlock(hdev);
break;

case LE_SCANNING_DISABLED:
clear_bit(HCI_LE_SCAN, &hdev->dev_flags);

hci_dev_lock(hdev);
hci_discovery_set_state(hdev, DISCOVERY_STOPPED);
hci_dev_unlock(hdev);

schedule_delayed_work(&hdev->adv_work, ADV_CLEAR_TIMEOUT);
break;

Expand Down

0 comments on commit d72cf2a

Please sign in to comment.