brcm2708: update to latest patches from the RPi foundation
[openwrt/staging/lynxis.git] / target / linux / brcm2708 / patches-4.14 / 950-0315-usb-gadget-ethernet-Re-enable-Jumbo-frames.patch
1 From 1810e953fd59ebb674c292a13eff8d56c88e1c7e Mon Sep 17 00:00:00 2001
2 From: John Greb <h3x4m3r0n@gmail.com>
3 Date: Sun, 6 May 2018 20:01:57 +0000
4 Subject: [PATCH 315/454] usb: gadget ethernet: Re-enable Jumbo frames.
5
6 Commit <eea52743eb5654ec6f52b0e8b4aefec952543697> upstream
7
8 Fixes: <b3e3893e1253> ("net: use core MTU range checking")
9 which patched only one of two functions used to setup the
10 USB Gadget Ethernet driver, causing a serious performance
11 regression in the ability to increase mtu size above 1500.
12
13 Signed-off-by: John Greb <h3x4m3r0n@gmail.com>
14 Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
15 ---
16 drivers/usb/gadget/function/u_ether.c | 4 ++++
17 1 file changed, 4 insertions(+)
18
19 --- a/drivers/usb/gadget/function/u_ether.c
20 +++ b/drivers/usb/gadget/function/u_ether.c
21 @@ -848,6 +848,10 @@ struct net_device *gether_setup_name_def
22 net->ethtool_ops = &ops;
23 SET_NETDEV_DEVTYPE(net, &gadget_type);
24
25 + /* MTU range: 14 - 15412 */
26 + net->min_mtu = ETH_HLEN;
27 + net->max_mtu = GETHER_MAX_ETH_FRAME_LEN;
28 +
29 return net;
30 }
31 EXPORT_SYMBOL_GPL(gether_setup_name_default);