summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorRabin Vincent <rabin@rab.in>2012-03-29 07:15:15 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-13 08:33:45 -0700
commit0ccef2bfa30d6b6e4cc9674b9dca3b26d1517e33 (patch)
tree093ae63cb5b97653f9b208bf475c40ef6cd9d141 /drivers/net
parent61234da7f859094fb5f9c676385897d4b60319ca (diff)
net: usb: cdc_eem: fix mtu
[ Upstream commit 78fb72f7936c01d5b426c03a691eca082b03f2b9 ] 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 <oliver@neukum.name> Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/usb/cdc_eem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c
index 882f53f708d..82d43b214f9 100644
--- a/drivers/net/usb/cdc_eem.c
+++ b/drivers/net/usb/cdc_eem.c
@@ -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;
}