Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290972
b: refs/heads/master
c: 343f935
h: refs/heads/master
v: v3
  • Loading branch information
Andre Guedes authored and Johan Hedberg committed Feb 19, 2012
1 parent 6dacfad commit 7928f3e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4aab14e5504e84c42534378f91e836e6f55d0886
refs/heads/master: 343f935bfa44189c68527102c409286b0cfc4526
3 changes: 1 addition & 2 deletions trunk/include/net/bluetooth/hci_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ struct discovery_state {
enum {
DISCOVERY_STOPPED,
DISCOVERY_STARTING,
DISCOVERY_INQUIRY,
DISCOVERY_LE_SCAN,
DISCOVERY_FINDING,
DISCOVERY_RESOLVING,
DISCOVERY_STOPPING,
} state;
Expand Down
6 changes: 2 additions & 4 deletions trunk/net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,7 @@ bool hci_discovery_active(struct hci_dev *hdev)
struct discovery_state *discov = &hdev->discovery;

switch (discov->state) {
case DISCOVERY_INQUIRY:
case DISCOVERY_LE_SCAN:
case DISCOVERY_FINDING:
case DISCOVERY_RESOLVING:
return true;

Expand All @@ -387,8 +386,7 @@ void hci_discovery_set_state(struct hci_dev *hdev, int state)
break;
case DISCOVERY_STARTING:
break;
case DISCOVERY_INQUIRY:
case DISCOVERY_LE_SCAN:
case DISCOVERY_FINDING:
mgmt_discovering(hdev, 1);
break;
case DISCOVERY_RESOLVING:
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ 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_discovery_set_state(hdev, DISCOVERY_FINDING);
hci_dev_unlock(hdev);
break;

Expand Down Expand Up @@ -1159,7 +1159,7 @@ static inline void hci_cs_inquiry(struct hci_dev *hdev, __u8 status)
set_bit(HCI_INQUIRY, &hdev->flags);

hci_dev_lock(hdev);
hci_discovery_set_state(hdev, DISCOVERY_INQUIRY);
hci_discovery_set_state(hdev, DISCOVERY_FINDING);
hci_dev_unlock(hdev);
}

Expand Down Expand Up @@ -1645,7 +1645,7 @@ static inline void hci_inquiry_complete_evt(struct hci_dev *hdev, struct sk_buff

hci_dev_lock(hdev);

if (discov->state != DISCOVERY_INQUIRY)
if (discov->state != DISCOVERY_FINDING)
goto unlock;

if (list_empty(&discov->resolve)) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2250,7 +2250,7 @@ static int stop_discovery(struct sock *sk, u16 index)
goto unlock;
}

if (hdev->discovery.state == DISCOVERY_INQUIRY) {
if (hdev->discovery.state == DISCOVERY_FINDING) {
err = hci_cancel_inquiry(hdev);
if (err < 0)
mgmt_pending_remove(cmd);
Expand Down

0 comments on commit 7928f3e

Please sign in to comment.