summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/cdc_ncm.c
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2013-11-01 11:16:46 +0100
committerDavid S. Miller <davem@davemloft.net>2013-11-02 02:02:02 -0400
commit1b5287a7abec1177257a988b523c78dab7056b41 (patch)
treebda69dc23435d41269fed81974076339af462f23 /drivers/net/usb/cdc_ncm.c
parent6a9612e2cb22b3fd6a7304dcbf2b4ee1cf2104b2 (diff)
downloadblackbird-op-linux-1b5287a7abec1177257a988b523c78dab7056b41.tar.gz
blackbird-op-linux-1b5287a7abec1177257a988b523c78dab7056b41.zip
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/cdc_ncm.c')
-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 4de3a5423e87..b8de8ddd6d98 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
OpenPOWER on IntegriCloud