Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277743
b: refs/heads/master
c: 89352e7
h: refs/heads/master
i:
  277741: ae9f03b
  277739: e83ebef
  277735: 3a81316
  277727: cbfee86
v: v3
  • Loading branch information
Andre Guedes authored and Gustavo F. Padovan committed Nov 8, 2011
1 parent c2d84db commit b069c2f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 33 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: 023d50498d04c77b73eed11d849e436ef5639ed2
refs/heads/master: 89352e7d3ab372ffad8efe2aa070e0b63df42b85
43 changes: 11 additions & 32 deletions trunk/net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ static void hci_cc_inquiry_cancel(struct hci_dev *hdev, struct sk_buff *skb)
if (status)
return;

if (test_and_clear_bit(HCI_INQUIRY, &hdev->flags) &&
test_bit(HCI_MGMT, &hdev->flags))
mgmt_discovering(hdev->id, 0);
clear_bit(HCI_INQUIRY, &hdev->flags);

mgmt_discovering(hdev->id, 0);

hci_req_complete(hdev, HCI_OP_INQUIRY_CANCEL, status);

Expand All @@ -76,10 +76,6 @@ static void hci_cc_exit_periodic_inq(struct hci_dev *hdev, struct sk_buff *skb)
if (status)
return;

if (test_and_clear_bit(HCI_INQUIRY, &hdev->flags) &&
test_bit(HCI_MGMT, &hdev->flags))
mgmt_discovering(hdev->id, 0);

hci_conn_check_pending(hdev);
}

Expand Down Expand Up @@ -986,9 +982,9 @@ static inline void hci_cs_inquiry(struct hci_dev *hdev, __u8 status)
return;
}

if (!test_and_set_bit(HCI_INQUIRY, &hdev->flags) &&
test_bit(HCI_MGMT, &hdev->flags))
mgmt_discovering(hdev->id, 1);
set_bit(HCI_INQUIRY, &hdev->flags);

mgmt_discovering(hdev->id, 1);
}

static inline void hci_cs_create_conn(struct hci_dev *hdev, __u8 status)
Expand Down Expand Up @@ -1367,13 +1363,14 @@ static inline void hci_inquiry_complete_evt(struct hci_dev *hdev, struct sk_buff

BT_DBG("%s status %d", hdev->name, status);

if (test_and_clear_bit(HCI_INQUIRY, &hdev->flags) &&
test_bit(HCI_MGMT, &hdev->flags))
mgmt_discovering(hdev->id, 0);

hci_req_complete(hdev, HCI_OP_INQUIRY, status);

hci_conn_check_pending(hdev);

if (!test_and_clear_bit(HCI_INQUIRY, &hdev->flags))
return;

mgmt_discovering(hdev->id, 0);
}

static inline void hci_inquiry_result_evt(struct hci_dev *hdev, struct sk_buff *skb)
Expand All @@ -1389,12 +1386,6 @@ static inline void hci_inquiry_result_evt(struct hci_dev *hdev, struct sk_buff *

hci_dev_lock(hdev);

if (!test_and_set_bit(HCI_INQUIRY, &hdev->flags)) {

if (test_bit(HCI_MGMT, &hdev->flags))
mgmt_discovering(hdev->id, 1);
}

for (; num_rsp; num_rsp--, info++) {
bacpy(&data.bdaddr, &info->bdaddr);
data.pscan_rep_mode = info->pscan_rep_mode;
Expand Down Expand Up @@ -2395,12 +2386,6 @@ static inline void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev, struct

hci_dev_lock(hdev);

if (!test_and_set_bit(HCI_INQUIRY, &hdev->flags)) {

if (test_bit(HCI_MGMT, &hdev->flags))
mgmt_discovering(hdev->id, 1);
}

if ((skb->len - 1) / num_rsp != sizeof(struct inquiry_info_with_rssi)) {
struct inquiry_info_with_rssi_and_pscan_mode *info;
info = (void *) (skb->data + 1);
Expand Down Expand Up @@ -2563,12 +2548,6 @@ static inline void hci_extended_inquiry_result_evt(struct hci_dev *hdev, struct
if (!num_rsp)
return;

if (!test_and_set_bit(HCI_INQUIRY, &hdev->flags)) {

if (test_bit(HCI_MGMT, &hdev->flags))
mgmt_discovering(hdev->id, 1);
}

hci_dev_lock(hdev);

for (; num_rsp; num_rsp--, info++) {
Expand Down

0 comments on commit b069c2f

Please sign in to comment.