Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277742
b: refs/heads/master
c: 023d504
h: refs/heads/master
v: v3
  • Loading branch information
Andre Guedes authored and Gustavo F. Padovan committed Nov 8, 2011
1 parent ae9f03b commit c2d84db
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 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: 2519a1fc82490eb13d69610f81fe84930f3b0e3f
refs/heads/master: 023d50498d04c77b73eed11d849e436ef5639ed2
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 @@ -971,5 +971,6 @@ void hci_le_ltk_reply(struct hci_conn *conn, u8 ltk[16]);
void hci_le_ltk_neg_reply(struct hci_conn *conn);

int hci_do_inquiry(struct hci_dev *hdev, u8 length);
int hci_cancel_inquiry(struct hci_dev *hdev);

#endif /* __HCI_CORE_H */
10 changes: 10 additions & 0 deletions trunk/net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2578,3 +2578,13 @@ int hci_do_inquiry(struct hci_dev *hdev, u8 length)

return hci_send_cmd(hdev, HCI_OP_INQUIRY, sizeof(cp), &cp);
}

int hci_cancel_inquiry(struct hci_dev *hdev)
{
BT_DBG("%s", hdev->name);

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

return hci_send_cmd(hdev, HCI_OP_INQUIRY_CANCEL, 0, NULL);
}
2 changes: 1 addition & 1 deletion trunk/net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1649,7 +1649,7 @@ static int stop_discovery(struct sock *sk, u16 index)
goto failed;
}

err = hci_send_cmd(hdev, HCI_OP_INQUIRY_CANCEL, 0, NULL);
err = hci_cancel_inquiry(hdev);
if (err < 0)
mgmt_pending_remove(cmd);

Expand Down

0 comments on commit c2d84db

Please sign in to comment.