diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2013-04-03 14:50:29 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-04-04 12:16:08 -0400 |
commit | 02350a725f5bc44490c30a10e7e04a12a5ecd406 (patch) | |
tree | 243d09f74edf36d79d50db5d470d340c733f38b1 /include/net | |
parent | 75e84b7c522c6e07964cd1f5bf28535768a1e9fa (diff) |
Bluetooth: Add support for custom event terminated commands
This patch adds support for having commands within HCI requests that do
not result in a command complete but some other event. This is at least
needed for some vendor specific commands to be issued in the
hdev->setup() procecure, but might also be useful for other commands.
The way that the support is implemented is by extending the skb control
buffer to have a field to indicate that the command is expected to
terminate with a special event. After sending the command each received
event can then be compared against this field through hdev->sent_cmd.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/bluetooth/bluetooth.h | 1 | ||||
-rw-r--r-- | include/net/bluetooth/hci_core.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index ed6e9552252e..591fee7d0060 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
@@ -266,6 +266,7 @@ typedef void (*hci_req_complete_t)(struct hci_dev *hdev, u8 status); | |||
266 | 266 | ||
267 | struct hci_req_ctrl { | 267 | struct hci_req_ctrl { |
268 | bool start; | 268 | bool start; |
269 | u8 event; | ||
269 | hci_req_complete_t complete; | 270 | hci_req_complete_t complete; |
270 | }; | 271 | }; |
271 | 272 | ||
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 755743d508aa..b85eefb230fd 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -1055,6 +1055,8 @@ struct hci_request { | |||
1055 | void hci_req_init(struct hci_request *req, struct hci_dev *hdev); | 1055 | void hci_req_init(struct hci_request *req, struct hci_dev *hdev); |
1056 | int hci_req_run(struct hci_request *req, hci_req_complete_t complete); | 1056 | int hci_req_run(struct hci_request *req, hci_req_complete_t complete); |
1057 | void hci_req_add(struct hci_request *req, u16 opcode, u32 plen, void *param); | 1057 | void hci_req_add(struct hci_request *req, u16 opcode, u32 plen, void *param); |
1058 | void hci_req_add_ev(struct hci_request *req, u16 opcode, u32 plen, void *param, | ||
1059 | u8 event); | ||
1058 | void hci_req_cmd_complete(struct hci_dev *hdev, u16 opcode, u8 status); | 1060 | void hci_req_cmd_complete(struct hci_dev *hdev, u16 opcode, u8 status); |
1059 | 1061 | ||
1060 | struct sk_buff *__hci_cmd_sync(struct hci_dev *hdev, u16 opcode, u32 plen, | 1062 | struct sk_buff *__hci_cmd_sync(struct hci_dev *hdev, u16 opcode, u32 plen, |