diff options
Diffstat (limited to 'target/linux/mediatek/base-files')
-rwxr-xr-x | target/linux/mediatek/base-files/etc/hotplug.d/iface/99-mtk-lro | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/target/linux/mediatek/base-files/etc/hotplug.d/iface/99-mtk-lro b/target/linux/mediatek/base-files/etc/hotplug.d/iface/99-mtk-lro new file mode 100755 index 0000000000..9a2ffaeed8 --- /dev/null +++ b/target/linux/mediatek/base-files/etc/hotplug.d/iface/99-mtk-lro @@ -0,0 +1,14 @@ +[ ifup = "$ACTION" ] && { + [ -n "$DEVICE" ] && { + if [ "$INTERFACE" == "lan" ]; then + if [ -f /usr/sbin/ethtool ]; then + ifname=eth0 + lan_ip=`uci -q get network.lan.ipaddr` + ethdrv=`ethtool -i $ifname | grep mtk_soc_eth` + [ -n "$ethdrv" ] && { + ethtool -N $ifname flow-type tcp4 dst-ip $lan_ip loc 0 + } + fi + fi + } +} |