Skip to content

Commit

Permalink
net: usb: cdc_eem: fix mtu
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
vitkyrka authored and davem330 committed Apr 2, 2012
1 parent 10b9194 commit 78fb72f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/usb/cdc_eem.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ static int eem_bind(struct usbnet *dev, struct usb_interface *intf)
/* no jumbogram (16K) support for now */

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

return 0;
}
Expand Down

0 comments on commit 78fb72f

Please sign in to comment.