Skip to content

Commit eea5274

Browse files
hexameronFelipe Balbi
authored andcommitted
USB: Gadget Ethernet: Re-enable Jumbo frames.
Fixes: <b3e3893e1253> ("net: use core MTU range checking") which patched only one of two functions used to setup the USB Gadget Ethernet driver, causing a serious performance regression in the ability to increase mtu size above 1500. Signed-off-by: John Greb <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
1 parent c7c24e7 commit eea5274

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/usb/gadget/function/u_ether.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,10 @@ struct net_device *gether_setup_name_default(const char *netname)
844844
net->ethtool_ops = &ops;
845845
SET_NETDEV_DEVTYPE(net, &gadget_type);
846846

847+
/* MTU range: 14 - 15412 */
848+
net->min_mtu = ETH_HLEN;
849+
net->max_mtu = GETHER_MAX_ETH_FRAME_LEN;
850+
847851
return net;
848852
}
849853
EXPORT_SYMBOL_GPL(gether_setup_name_default);

0 commit comments

Comments
 (0)