mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
autocore-x86: advertise 2.5G/5G link modes for Intel x550
This commit is contained in:
parent
2b743dbff0
commit
37eaf33035
@ -24,7 +24,7 @@ endef
|
||||
define Package/autocore-x86
|
||||
TITLE:=x86/x64 auto core loadbalance script.
|
||||
MAINTAINER:=Lean
|
||||
DEPENDS:=@TARGET_x86 +bc +lm-sensors +ethtool
|
||||
DEPENDS:=@TARGET_x86 +bc +lm-sensors +ethtool +pciutils
|
||||
VARIANT:=x86
|
||||
endef
|
||||
|
||||
|
@ -43,6 +43,18 @@ start()
|
||||
|
||||
mkdir -p /tmp/sysinfo
|
||||
echo $h > /tmp/sysinfo/model
|
||||
|
||||
all_pcis=`lspci | grep -i 'eth' | grep -i 'x550' | cut -d ' ' -f 1`
|
||||
all_ifs=`cat /proc/net/dev | grep -i 'eth' | cut -d : -f 1 | sed 's/^[ \t]*//g'`
|
||||
|
||||
for ifname in ${all_ifs}
|
||||
do
|
||||
if_pci=`ethtool -i ${ifname} | grep -i 'bus-info' | cut -d : -f 3-`
|
||||
if [[ "$all_pcis" =~ "$if_pci" ]]
|
||||
then
|
||||
ethtool -s ${ifname} advertise 0x1800000001028
|
||||
fi
|
||||
done
|
||||
|
||||
a=$(ip address | grep ^[0-9] | awk -F: '{print $2}' | sed "s/ //g" | grep '^[e]' | grep -v "@" | grep -v "\.")
|
||||
b=$(echo "$a" | wc -l)
|
||||
|
Loading…
Reference in New Issue
Block a user