Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/9870 )
Change subject: host usb_util fix: used provided class, sub-class, and interfave when finding matching interfaces ...................................................................... host usb_util fix: used provided class, sub-class, and interfave when finding matching interfaces Change-Id: Ibc06e751e6ca0f9e9a40d82c4eeddfb975240f91 --- M host/libusb_util.c 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/host/libusb_util.c b/host/libusb_util.c index 3236e41..5ee685e 100644 --- a/host/libusb_util.c +++ b/host/libusb_util.c @@ -130,11 +130,11 @@ for (k = 0; k < intf->num_altsetting; k++) { const struct libusb_interface_descriptor *if_desc; if_desc = &intf->altsetting[k]; - if (class > 0 && if_desc->bInterfaceClass != class) + if (class >= 0 && if_desc->bInterfaceClass != class) continue; - if (sub_class > 0 && if_desc->bInterfaceSubClass != sub_class) + if (sub_class >= 0 && if_desc->bInterfaceSubClass != sub_class) continue; - if (protocol > 0 && if_desc->bInterfaceProtocol != protocol) + if (protocol >= 0 && if_desc->bInterfaceProtocol != protocol) continue; /* MATCH! */ out[out_idx].usb_dev = dev; @@ -197,7 +197,7 @@ dev_desc.idVendor, dev_desc.idProduct, addr); #endif - rc = dev_find_matching_interfaces(*dev, 255, 2, -1, out_cur, out_len_remain); + rc = dev_find_matching_interfaces(*dev, class, sub_class, protocol, out_cur, out_len_remain); if (rc < 0) continue; out_cur += rc; -- To view, visit https://gerrit.osmocom.org/9870 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ibc06e751e6ca0f9e9a40d82c4eeddfb975240f91 Gerrit-Change-Number: 9870 Gerrit-PatchSet: 7 Gerrit-Owner: Kévin Redon <kre...@sysmocom.de> Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Jenkins Builder