mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 15:10:38 +00:00
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>
This commit is contained in:
parent
6a9612e2cb
commit
1b5287a7ab
@ -280,6 +280,7 @@ static u8 cdc_ncm_setup(struct usbnet *dev)
|
|||||||
/* if value changed, update device */
|
/* if value changed, update device */
|
||||||
if (ctx->max_datagram_size !=
|
if (ctx->max_datagram_size !=
|
||||||
le16_to_cpu(max_datagram_size)) {
|
le16_to_cpu(max_datagram_size)) {
|
||||||
|
max_datagram_size = cpu_to_le16(ctx->max_datagram_size);
|
||||||
err = usbnet_write_cmd(dev,
|
err = usbnet_write_cmd(dev,
|
||||||
USB_CDC_SET_MAX_DATAGRAM_SIZE,
|
USB_CDC_SET_MAX_DATAGRAM_SIZE,
|
||||||
USB_TYPE_CLASS | USB_DIR_OUT
|
USB_TYPE_CLASS | USB_DIR_OUT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user