Skip to content

Commit 78fb72f

Browse files
vitkyrkadavem330
authored andcommitted
net: usb: cdc_eem: fix mtu
Make CDC EEM recalculate the hard_mtu after adjusting the hard_header_len. Without this, usbnet adjusts the MTU down to 1494 bytes, and the host is unable to receive standard 1500-byte frames from the device. Tested with the Linux USB Ethernet gadget. Cc: Oliver Neukum <[email protected]> Signed-off-by: Rabin Vincent <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 10b9194 commit 78fb72f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/usb/cdc_eem.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ static int eem_bind(struct usbnet *dev, struct usb_interface *intf)
9393
/* no jumbogram (16K) support for now */
9494

9595
dev->net->hard_header_len += EEM_HEAD + ETH_FCS_LEN;
96+
dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
9697

9798
return 0;
9899
}

0 commit comments

Comments
 (0)