The usbnet driver always attempts to set dev->maxpacket from the out endpoint. For this to function correctly it relies on the alternate setting containg the bulk out endpoint to be selected. This isn't necessarily always the case. This change allows drivers that make use of usbnet to specify the value for dev->maxpacket themselves. Signed-off-by: Toby Gray <toby.gray@xxxxxxxxxxx> --- drivers/net/usb/usbnet.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index fae0fbd..4ccd316 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1425,7 +1425,8 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) if (!dev->rx_urb_size) dev->rx_urb_size = dev->hard_mtu; - dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1); + if (!dev->maxpacket) + dev->maxpacket = usb_maxpacket(dev->udev, dev->out, 1); if ((dev->driver_info->flags & FLAG_WLAN) != 0) SET_NETDEV_DEVTYPE(net, &wlan_type); -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html