Disable offloading on RK3399 network devices (#2079)
* Disable offloading on RK3399 network devices * Add kernel version checking since we only need this for legacy * Adjust / fix condition
This commit is contained in:
parent
88a585a3fe
commit
a48877aeaa
23
packages/bsp/common/etc/NetworkManager/dispatcher.d/30-offload
Executable file
23
packages/bsp/common/etc/NetworkManager/dispatcher.d/30-offload
Executable file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
# With offloading enabled, Samba becomes completely useless - transfers to a Windows PC freezes randomly
|
||||
# Disabling offloading should solve this - all RK3399
|
||||
|
||||
IFACE=$1
|
||||
EVENT=$2
|
||||
|
||||
if [[ "$EVENT" != "up" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if linux-version compare $(uname -r | cut -d '.' -f1,2) gt 4.4; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
ETHTOOL=/sbin/ethtool
|
||||
|
||||
[ -f $ETHTOOL ] || exit 2
|
||||
[ -d /sys/devices/platform/fe300000.ethernet/net/$IFACE ] || exit 3
|
||||
|
||||
$ETHTOOL -K $IFACE rx off tx off
|
||||
exit 0
|
||||
Loading…
Reference in New Issue
Block a user