The case USB_SPEED_WIRELESS and the default one were doing the same.
Also, make always use of usb_endpoint_maxp_mult, as it should have a
sane value, even for LOW speed and WIRELESS.
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
struct usb_host_endpoint *ep)
{
u16 psize;
- u16 mult;
switch (dev->speed) {
case USB_SPEED_SUPER:
case USB_SPEED_SUPER_PLUS:
return le16_to_cpu(ep->ss_ep_comp.wBytesPerInterval);
- case USB_SPEED_HIGH:
- psize = usb_endpoint_maxp(&ep->desc);
- mult = usb_endpoint_maxp_mult(&ep->desc);
- return psize * mult;
- case USB_SPEED_WIRELESS:
- psize = usb_endpoint_maxp(&ep->desc);
- return psize;
default:
psize = usb_endpoint_maxp(&ep->desc);
+ psize *= usb_endpoint_maxp_mult(&ep->desc);
return psize;
}
}