]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usb: core: allow isoc URBs for wireless devices with an interval < 6
authorThomas Pugliese <thomas.pugliese@gmail.com>
Mon, 9 Dec 2013 19:45:43 +0000 (13:45 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2013 21:27:32 +0000 (13:27 -0800)
In usb_submit_urb, do not fail if an isoc URB for a wireless USB device
has an interval < 6.  Per WUSB spec, isoc endpoints can support values
from 1-16.  Valid values for interrupt URBs for wireless USB devices are
still 6-16.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/urb.c

index e62208356c8915d6fc565173f4561500cb5261a7..07c58af6b5c0ec9b73e26895952937dd5bbc738e 100644 (file)
@@ -492,9 +492,9 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
                /* too small? */
                switch (dev->speed) {
                case USB_SPEED_WIRELESS:
-                       if (urb->interval < 6)
+                       if ((urb->interval < 6)
+                               && (xfertype == USB_ENDPOINT_XFER_INT))
                                return -EINVAL;
-                       break;
                default:
                        if (urb->interval <= 0)
                                return -EINVAL;