USB: gadget: Fix Superspeed endpoint descriptor length issue
USB Device should report USB endpoint descriptor size as seven bytes
for all endpoints except audio endpoint. Only for audio endpoint, length
should be of endpoint descriptor size. Otherwise USB complaince tests
will fail due to wrong endpoint descriptor length. Fix this issue by
updating endpoint descriptor length field to seven bytes in serial and
rmnet function drivers.
CRs-Fixed: 422740
Change-Id: I8b42be39a7f8a315e3919bdf38293eda18bd601d
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
diff --git a/drivers/usb/gadget/f_serial.c b/drivers/usb/gadget/f_serial.c
index 43347b3..74dba07 100644
--- a/drivers/usb/gadget/f_serial.c
+++ b/drivers/usb/gadget/f_serial.c
@@ -246,7 +246,7 @@
#ifdef CONFIG_MODEM_SUPPORT
static struct usb_endpoint_descriptor gser_ss_notify_desc = {
- .bLength = sizeof gser_ss_notify_desc,
+ .bLength = USB_DT_ENDPOINT_SIZE,
.bDescriptorType = USB_DT_ENDPOINT,
.bEndpointAddress = USB_DIR_IN,
.bmAttributes = USB_ENDPOINT_XFER_INT,