aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ramips')
-rw-r--r--target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips14
1 files changed, 14 insertions, 0 deletions
diff --git a/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips b/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips
index 3dce1b667b..6948851ee5 100644
--- a/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips
+++ b/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips
@@ -7,8 +7,22 @@
ramips_set_preinit_iface() {
RT3X5X=`cat /proc/cpuinfo | egrep "(RT3.5|RT5350|MT7628|MT7688)"`
+ MT762X=`cat /proc/cpuinfo | egrep "MT7620"`
+
if [ -n "${RT3X5X}" ]; then
swconfig dev rt305x set reset 1
+ elif [ -n "${MT762X}" ]; then
+ # The mt7530 switch driver enables VLAN by default, but
+ # failsafe uses eth0, making the device unreachable:
+ # https://dev.openwrt.org/ticket/18768
+ case "${MT762X}" in
+ *MT7620*)
+ mt762x_switchdev=mt7620
+ ;;
+ esac
+ swconfig dev $mt762x_switchdev set reset 1
+ swconfig dev $mt762x_switchdev set enable_vlan 0
+ swconfig dev $mt762x_switchdev set apply 1
fi
if echo $RT3X5X | egrep -q "(RT5350|MT7628|MT7688)"; then