From 2382e2c43c3386dab0a44f4cd90a351a91329a5c Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Mon, 24 Mar 2014 17:20:54 +0100 Subject: unifying: make Get_Report provide sane mouse reports ...and ignore Get_Report for HID++ queries. 0x20 and 0x21 already return EPIPE on real hw, but even querying 0x10 and 0x11 does not make sense as the device index is not known. Signed-off-by: Peter Wu --- hw/usb/dev-unifying.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'hw/usb/dev-unifying.c') diff --git a/hw/usb/dev-unifying.c b/hw/usb/dev-unifying.c index 36ffdb3f55..c9364f089c 100644 --- a/hw/usb/dev-unifying.c +++ b/hw/usb/dev-unifying.c @@ -379,11 +379,7 @@ static void usb_ltunify_handle_control_hid(USBDevice *dev, USBPacket *p, switch (request) { case HID_GET_REPORT: - if (hs->kind == HID_KEYBOARD) { - p->actual_length = hid_keyboard_poll(hs, data, length); - } else if (hs->kind == HID_MOUSE) { - p->actual_length = hid_pointer_poll(hs, data, length); - } + p->actual_length = usb_ltunify_poll_hid(hs, data, length); break; case HID_SET_REPORT: if (hs->kind == HID_KEYBOARD) { -- cgit v1.2.1