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>
This commit is contained in:
Alan Ott
2011-01-18 03:04:38 -05:00
committed by Jiri Kosina
parent 0f69dca20f
commit 0825411ade
2 changed files with 55 additions and 3 deletions

View File

@ -80,6 +80,7 @@
#define HIDP_VIRTUAL_CABLE_UNPLUG 0
#define HIDP_BOOT_PROTOCOL_MODE 1
#define HIDP_BLUETOOTH_VENDOR_ID 9
#define HIDP_WAITING_FOR_SEND_ACK 11
struct hidp_connadd_req {
int ctrl_sock; // Connected control socket
@ -154,6 +155,9 @@ struct hidp_session {
struct sk_buff_head ctrl_transmit;
struct sk_buff_head intr_transmit;
/* Used in hidp_output_raw_report() */
int output_report_success; /* boolean */
/* Report descriptor */
__u8 *rd_data;
uint rd_size;