diff options
author | Alan Ott <alan@signal11.us> | 2011-01-18 03:04:38 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-02-11 09:05:49 -0500 |
commit | 0825411ade21a39ac63b3e011d092b1f95b5f3f5 (patch) | |
tree | c69a0088e46c93ef1a0916030af3e02c4cce04e9 /net/bluetooth/hidp/hidp.h | |
parent | 0f69dca20f77dc374b67e17e10b30cec37e778c4 (diff) |
HID: bt: Wait for ACK on Sent Reports
Wait for an ACK from the device before returning from
hidp_output_raw_report(). This way, failures can be returned to the user
application. Also, it prevents ACK/NAK packets from an output packet from
being confused with ACK/NAK packets from an input request packet.
Signed-off-by: Alan Ott <alan@signal11.us>
Acked-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'net/bluetooth/hidp/hidp.h')
-rw-r--r-- | net/bluetooth/hidp/hidp.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/hidp/hidp.h b/net/bluetooth/hidp/hidp.h index 2cc35dc8fa03..92e093e61f27 100644 --- a/net/bluetooth/hidp/hidp.h +++ b/net/bluetooth/hidp/hidp.h | |||
@@ -80,6 +80,7 @@ | |||
80 | #define HIDP_VIRTUAL_CABLE_UNPLUG 0 | 80 | #define HIDP_VIRTUAL_CABLE_UNPLUG 0 |
81 | #define HIDP_BOOT_PROTOCOL_MODE 1 | 81 | #define HIDP_BOOT_PROTOCOL_MODE 1 |
82 | #define HIDP_BLUETOOTH_VENDOR_ID 9 | 82 | #define HIDP_BLUETOOTH_VENDOR_ID 9 |
83 | #define HIDP_WAITING_FOR_SEND_ACK 11 | ||
83 | 84 | ||
84 | struct hidp_connadd_req { | 85 | struct hidp_connadd_req { |
85 | int ctrl_sock; // Connected control socket | 86 | int ctrl_sock; // Connected control socket |
@@ -154,6 +155,9 @@ struct hidp_session { | |||
154 | struct sk_buff_head ctrl_transmit; | 155 | struct sk_buff_head ctrl_transmit; |
155 | struct sk_buff_head intr_transmit; | 156 | struct sk_buff_head intr_transmit; |
156 | 157 | ||
158 | /* Used in hidp_output_raw_report() */ | ||
159 | int output_report_success; /* boolean */ | ||
160 | |||
157 | /* Report descriptor */ | 161 | /* Report descriptor */ |
158 | __u8 *rd_data; | 162 | __u8 *rd_data; |
159 | uint rd_size; | 163 | uint rd_size; |