net: usb: cdc_eem: fix mtu
authorRabin Vincent <rabin@rab.in>
Thu, 29 Mar 2012 07:15:15 +0000 (07:15 +0000)
committerLuis Henriques <luis.henriques@canonical.com>
Mon, 30 Apr 2012 18:14:58 +0000 (19:14 +0100)
commitd9632b0819193cca3fdaec6122a7abbc39e6575e
tree4d638a8d178f5f8bd411dba335269cf14746e137
parentcb1e4dbe4ef5d6f5b116f4c44de1bf7035829a91
net: usb: cdc_eem: fix mtu

BugLink: http://bugs.launchpad.net/bugs/981162

[ 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>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/net/usb/cdc_eem.c