trezorhal: reply with winusb guid just for the main interface (0)

This commit is contained in:
Pavol Rusnak 2018-01-24 00:14:01 +01:00
parent 966d8cb4ce
commit 6acfc5d1b3
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
1 changed files with 2 additions and 1 deletions

View File

@ -115,7 +115,8 @@ static int winusb_control_vendor_request(usbd_device *usbd_dev,
status = USBD_REQ_HANDLED;
} else if (((req->bmRequestType & USB_REQ_TYPE_RECIPIENT) == USB_REQ_TYPE_INTERFACE) &&
(req->wIndex == WINUSB_REQ_GET_EXTENDED_PROPERTIES_OS_FEATURE_DESCRIPTOR)) {
(req->wIndex == WINUSB_REQ_GET_EXTENDED_PROPERTIES_OS_FEATURE_DESCRIPTOR) &&
(usb_descriptor_index(req->wValue) == winusb_wcid.functions[0].bInterfaceNumber)) {
*buf = (uint8_t*)(&guid);
*len = MIN(*len, guid.header.dwLength);