summaryrefslogtreecommitdiff
path: root/include/net/bluetooth/hci_sync.h
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2024-07-01 23:52:57 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2024-07-15 17:11:33 +0300
commitf2d89775358606c7ab6b6b6c4a02fe1e8cd270b1 (patch)
tree4d797676705ed95822d3362634261914ff163dd7 /include/net/bluetooth/hci_sync.h
parent8bedf130c265384fb136b19b20504239240c51bf (diff)
downloadlinux-f2d89775358606c7ab6b6b6c4a02fe1e8cd270b1.tar.xz
Bluetooth: hci_sync: Remove remaining dependencies of hci_request
This removes the dependencies of hci_req_init and hci_request_cancel_all from hci_sync.c. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'include/net/bluetooth/hci_sync.h')
-rw-r--r--include/net/bluetooth/hci_sync.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_sync.h b/include/net/bluetooth/hci_sync.h
index a8d88247ac89..75e052909b5f 100644
--- a/include/net/bluetooth/hci_sync.h
+++ b/include/net/bluetooth/hci_sync.h
@@ -8,6 +8,23 @@
#define UINT_PTR(_handle) ((void *)((uintptr_t)_handle))
#define PTR_UINT(_ptr) ((uintptr_t)((void *)_ptr))
+#define HCI_REQ_DONE 0
+#define HCI_REQ_PEND 1
+#define HCI_REQ_CANCELED 2
+
+#define hci_req_sync_lock(hdev) mutex_lock(&hdev->req_lock)
+#define hci_req_sync_unlock(hdev) mutex_unlock(&hdev->req_lock)
+
+struct hci_request {
+ struct hci_dev *hdev;
+ struct sk_buff_head cmd_q;
+
+ /* If something goes wrong when building the HCI request, the error
+ * value is stored in this field.
+ */
+ int err;
+};
+
typedef int (*hci_cmd_sync_work_func_t)(struct hci_dev *hdev, void *data);
typedef void (*hci_cmd_sync_work_destroy_t)(struct hci_dev *hdev, void *data,
int err);