[PATCH 5/5] usb: cdc-ncm: Allow NCM driver to determine dev->maxpacket

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As the NCM driver does not necessarily select the alternate setting
which presents the data bulk endpoints, dev->maxpacket can't be set
correctly by usbnet.

This fixes this by getting the NCM driver to set the dev->maxpacket itself.

Signed-off-by: Toby Gray <toby.gray@xxxxxxxxxxx>
---
 drivers/net/usb/cdc_ncm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index e1b2d5d..158c3d8 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -600,6 +600,7 @@ advance:
 		ctx->out_ep->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
 	dev->status = ctx->status_ep;
 	dev->rx_urb_size = ctx->rx_max;
+	dev->maxpacket = usb_endpoint_maxp(&ctx->out_ep->desc);
 
 	/*
 	 * We should get an event when network connection is "connected" or
-- 
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux