aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_request.h
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2015-11-11 01:11:17 -0500
committerMarcel Holtmann <marcel@holtmann.org>2015-11-19 11:50:29 -0500
commit2e93e53b8f86fb38a9a3c3bd08e539c40b3f8d89 (patch)
tree2ba50e194a5d180a73ab911d3b8ba493475960cc /net/bluetooth/hci_request.h
parent5fc16cc4f3044551587dfee8e12422cbf59303e8 (diff)
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);
64int hci_update_random_address(struct hci_request *req, bool require_privacy, 64int hci_update_random_address(struct hci_request *req, bool require_privacy,
65 u8 *own_addr_type); 65 u8 *own_addr_type);
66 66
67void hci_update_background_scan(struct hci_dev *hdev);
68void __hci_update_background_scan(struct hci_request *req); 67void __hci_update_background_scan(struct hci_request *req);
69 68
70int hci_abort_conn(struct hci_conn *conn, u8 reason); 69int hci_abort_conn(struct hci_conn *conn, u8 reason);
71void __hci_abort_conn(struct hci_request *req, struct hci_conn *conn, 70void __hci_abort_conn(struct hci_request *req, struct hci_conn *conn,
72 u8 reason); 71 u8 reason);
73 72
73static inline void hci_update_background_scan(struct hci_dev *hdev)
74{
75 queue_work(hdev->req_workqueue, &hdev->bg_scan_update);
76}
77
74void hci_request_setup(struct hci_dev *hdev); 78void hci_request_setup(struct hci_dev *hdev);
75void hci_request_cancel_all(struct hci_dev *hdev); 79void hci_request_cancel_all(struct hci_dev *hdev);