mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
8c6f00ef4f
Refresh patches. Remove upstreamed patches: - backport/096-mips-math-emu-Write-protect-delay-slot-emulation-pages.patch - pending/510-f2fs-fix-sanity_check_raw_super-on-big-endian-machines.patch - brcm2708/950-0415-qmi_wwan-apply-SET_DTR-quirk-to-the-SIMCOM-shared-de.patch Compile-tested: ar71xx, ath79, brcm2708/bcm27{08,10}, octeon, x86/64 Runtime-tested: ar71xx, ath79, brcm2708/bcm27{08,10}, octeon, x86/64 Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
39 lines
1.4 KiB
Diff
39 lines
1.4 KiB
Diff
From 50340b55bb7af7c12259d3bce5da6ba969c58e00 Mon Sep 17 00:00:00 2001
|
|
From: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
|
Date: Wed, 4 Apr 2018 16:34:24 +0100
|
|
Subject: [PATCH 265/454] net: lan78xx: Allow for VLAN headers in timeout.
|
|
|
|
The frame abort timeout being set by lan78xx_set_rx_max_frame_length
|
|
didn't account for any VLAN headers, resulting in very low
|
|
throughput if used with tagged VLANs.
|
|
Use VLAN_ETH_HLEN instead of ETH_HLEN to correct for this.
|
|
|
|
See https://github.com/raspberrypi/linux/issues/2458
|
|
|
|
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
|
---
|
|
drivers/net/usb/lan78xx.c | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
--- a/drivers/net/usb/lan78xx.c
|
|
+++ b/drivers/net/usb/lan78xx.c
|
|
@@ -2194,7 +2194,7 @@ static int lan78xx_change_mtu(struct net
|
|
if ((ll_mtu % dev->maxpacket) == 0)
|
|
return -EDOM;
|
|
|
|
- ret = lan78xx_set_rx_max_frame_length(dev, new_mtu + ETH_HLEN);
|
|
+ ret = lan78xx_set_rx_max_frame_length(dev, new_mtu + VLAN_ETH_HLEN);
|
|
|
|
netdev->mtu = new_mtu;
|
|
|
|
@@ -2487,7 +2487,8 @@ static int lan78xx_reset(struct lan78xx_
|
|
buf |= FCT_TX_CTL_EN_;
|
|
ret = lan78xx_write_reg(dev, FCT_TX_CTL, buf);
|
|
|
|
- ret = lan78xx_set_rx_max_frame_length(dev, dev->net->mtu + ETH_HLEN);
|
|
+ ret = lan78xx_set_rx_max_frame_length(dev,
|
|
+ dev->net->mtu + VLAN_ETH_HLEN);
|
|
|
|
ret = lan78xx_read_reg(dev, MAC_RX, &buf);
|
|
buf |= MAC_RX_RXEN_;
|