[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1329317261-3406-4-git-send-email-toby.gray@realvnc.com>
Date: Wed, 15 Feb 2012 14:47:39 +0000
From: Toby Gray <toby.gray@...lvnc.com>
To: Toby Gray <tg@...lvnc.com>, Oliver Neukum <oliver@...kum.name>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-usb@...r.kernel.org
Cc: netdev@...r.kernel.org, alexey.orishko@...il.com,
Toby Gray <toby.gray@...lvnc.com>
Subject: [PATCH 3/5] usb: usbnet: Allow drivers using usbnet to specify maximum packet size
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@...lvnc.com>
---
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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists