diff options
author | Antonio Ospite <ospite@studenti.unina.it> | 2011-02-20 12:26:46 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-02-22 05:08:13 -0500 |
commit | 97e1efbbe1c8492ea4f804618e26b19325c879fe (patch) | |
tree | 9a46a400faa2ee60cd1f70aaaa97df26d27cfd00 /net | |
parent | 5710fabf315efcd53c54ad4ecc6158f2964745e3 (diff) |
HID: bt hidp: send Output reports using SET_REPORT on the Control channel
The current implementation of hidp_output_raw_report() relies only on
the Control channel even for Output reports, and the BT HID
specification [1] does not mention using the DATA message for Output
reports on the Control channel (see section 7.9.1 and also Figure 11:
SET_ Flow Chart), so let us just use SET_REPORT.
This also fixes sending Output reports to some devices (like Sony
Sixaxis) which are not able to handle DATA messages on the Control
channel.
Ideally hidp_output_raw_report() could be improved to use this scheme:
Feature Report -- SET_REPORT on the Control channel
Output Report -- DATA on the Interrupt channel
for more efficiency, but as said above, right now only the Control
channel is used.
[1] http://www.bluetooth.com/Specification%20Documents/HID_SPEC_V10.pdf
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Acked-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hidp/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 29544c21f4b5..e286e70b4986 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c | |||
@@ -321,7 +321,7 @@ static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, s | |||
321 | report_type = HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE; | 321 | report_type = HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE; |
322 | break; | 322 | break; |
323 | case HID_OUTPUT_REPORT: | 323 | case HID_OUTPUT_REPORT: |
324 | report_type = HIDP_TRANS_DATA | HIDP_DATA_RTYPE_OUPUT; | 324 | report_type = HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_OUPUT; |
325 | break; | 325 | break; |
326 | default: | 326 | default: |
327 | return -EINVAL; | 327 | return -EINVAL; |