usb: gadget: f_hid: idle uses the highest byte for duration

SET_IDLE value must be shifted 8 bits to the right to get duration.
This confirmed by USBCV test.

Fixes: afcff6dc69 ("usb: gadget: f_hid: added GET_IDLE and SET_IDLE handlers")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Maxim Devaev <mdevaev@gmail.com>
Link: https://lore.kernel.org/r/20210727185800.43796-1-mdevaev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Maxim Devaev 2021-07-27 21:58:00 +03:00 committed by Greg Kroah-Hartman
parent 8e3341257e
commit fa20bada3f
1 changed files with 1 additions and 1 deletions

View File

@ -573,7 +573,7 @@ static int hidg_setup(struct usb_function *f,
| HID_REQ_SET_IDLE):
VDBG(cdev, "set_idle\n");
length = 0;
hidg->idle = value;
hidg->idle = value >> 8;
goto respond;
break;