summaryrefslogtreecommitdiff
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2013-11-01 10:16:46 (GMT)
committerDavid S. Miller <davem@davemloft.net>2013-11-02 06:02:02 (GMT)
commit1b5287a7abec1177257a988b523c78dab7056b41 (patch)
treebda69dc23435d41269fed81974076339af462f23 /drivers/net/usb
parent6a9612e2cb22b3fd6a7304dcbf2b4ee1cf2104b2 (diff)
downloadlinux-fsl-qoriq-1b5287a7abec1177257a988b523c78dab7056b41.tar.xz
net: cdc_ncm: fix SET_MAX_DATAGRAM_SIZE
We need to inform the device about the *new* value, not the old one. Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/cdc_ncm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 4de3a542..b8de8dd 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -280,6 +280,7 @@ static u8 cdc_ncm_setup(struct usbnet *dev)
/* if value changed, update device */
if (ctx->max_datagram_size !=
le16_to_cpu(max_datagram_size)) {
+ max_datagram_size = cpu_to_le16(ctx->max_datagram_size);
err = usbnet_write_cmd(dev,
USB_CDC_SET_MAX_DATAGRAM_SIZE,
USB_TYPE_CLASS | USB_DIR_OUT