Skip to content

Commit

Permalink
HID: logitech-dj: Fix forwarding of very long HID++ reports
Browse files Browse the repository at this point in the history
The HID++ spec also defines very long HID++ reports, with a reportid of
0x12. The MX5000 and MX5500 keyboards use 0x12 output reports for sending
messages to display on their buildin LCD.

Userspace (libmx5000) supports this, in order for this to work when talking
to the HID devices instantiated for the keyboard by hid-logitech-dj,
we need to properly forward these reports to the device.

This commit fixes logi_dj_ll_raw_request not forwarding these reports.

Fixes: f2113c3 ("HID: logitech-dj: add support for Logitech Bluetooth Mini-Receiver")
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
jwrdegoede authored and Jiri Kosina committed Jun 26, 2019
1 parent 315ffcc commit 3a9a2c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/hid/hid-logitech-dj.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

#define REPORT_ID_HIDPP_SHORT 0x10
#define REPORT_ID_HIDPP_LONG 0x11
#define REPORT_ID_HIDPP_VERY_LONG 0x12

#define HIDPP_REPORT_SHORT_LENGTH 7
#define HIDPP_REPORT_LONG_LENGTH 20
Expand Down Expand Up @@ -1257,7 +1258,8 @@ static int logi_dj_ll_raw_request(struct hid_device *hid,
int ret;

if ((buf[0] == REPORT_ID_HIDPP_SHORT) ||
(buf[0] == REPORT_ID_HIDPP_LONG)) {
(buf[0] == REPORT_ID_HIDPP_LONG) ||
(buf[0] == REPORT_ID_HIDPP_VERY_LONG)) {
if (count < 2)
return -EINVAL;

Expand Down

0 comments on commit 3a9a2c8

Please sign in to comment.