diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2013-10-15 17:33:51 +0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-10-15 18:17:44 +0400 |
commit | b1e73124104d0c4c6c9a073afea07ff0b73d5787 (patch) | |
tree | a028f1dfe356e407d3226129a3ead1131b661cb1 /net/bluetooth/hci_core.c | |
parent | 8d6083fe0ab6ffbe486b5d537922fba68e872568 (diff) | |
download | linux-b1e73124104d0c4c6c9a073afea07ff0b73d5787.tar.xz |
Bluetooth: Use hci_request for discoverable timeout handling
When the discoverable timeout triggers and it is time to turn inquiry
scan back off, use the HCI request framework to do it.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r-- | net/bluetooth/hci_core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 7add9c96e32c..c53f7f9c630a 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -1789,6 +1789,7 @@ static void hci_power_off(struct work_struct *work) static void hci_discov_off(struct work_struct *work) { struct hci_dev *hdev; + struct hci_request req; u8 scan = SCAN_PAGE; hdev = container_of(work, struct hci_dev, discov_off.work); @@ -1797,7 +1798,9 @@ static void hci_discov_off(struct work_struct *work) hci_dev_lock(hdev); - hci_send_cmd(hdev, HCI_OP_WRITE_SCAN_ENABLE, sizeof(scan), &scan); + hci_req_init(&req, hdev); + hci_req_add(&req, HCI_OP_WRITE_SCAN_ENABLE, sizeof(scan), &scan); + hci_req_run(&req, NULL); hdev->discov_timeout = 0; |