summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_request.h
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2015-11-11 07:11:17 +0100
committerMarcel Holtmann <marcel@holtmann.org>2015-11-19 17:50:29 +0100
commit2e93e53b8f86fb38a9a3c3bd08e539c40b3f8d89 (patch)
tree2ba50e194a5d180a73ab911d3b8ba493475960cc /net/bluetooth/hci_request.h
parentBluetooth: Add stubs for synchronous HCI request functionality (diff)
downloadlinux-2e93e53b8f86fb38a9a3c3bd08e539c40b3f8d89.tar.xz
linux-2e93e53b8f86fb38a9a3c3bd08e539c40b3f8d89.zip
Bluetooth: Run all background scan updates through req_workqueue
Instead of firing off a simple async request queue all background scan updates through req_workqueue and use hci_req_sync() there to ensure that no two updates overlap with each other. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_request.h')
-rw-r--r--net/bluetooth/hci_request.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/bluetooth/hci_request.h b/net/bluetooth/hci_request.h
index 9759b7175f8e..983e687fee22 100644
--- a/net/bluetooth/hci_request.h
+++ b/net/bluetooth/hci_request.h
@@ -64,12 +64,16 @@ void __hci_update_page_scan(struct hci_request *req);
int hci_update_random_address(struct hci_request *req, bool require_privacy,
u8 *own_addr_type);
-void hci_update_background_scan(struct hci_dev *hdev);
void __hci_update_background_scan(struct hci_request *req);
int hci_abort_conn(struct hci_conn *conn, u8 reason);
void __hci_abort_conn(struct hci_request *req, struct hci_conn *conn,
u8 reason);
+static inline void hci_update_background_scan(struct hci_dev *hdev)
+{
+ queue_work(hdev->req_workqueue, &hdev->bg_scan_update);
+}
+
void hci_request_setup(struct hci_dev *hdev);
void hci_request_cancel_all(struct hci_dev *hdev);