From: Paul Geraedts
Date: Sat, 24 Feb 2024 08:01:01 +0000 (+0100)
Subject: mediatek: filogic: fix failsafe mode on devices with no lan1
X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=8256d06933e7542ecdd427b6a0ef4e87bb37d3f4;p=openwrt%2Fstaging%2Fblocktrron.git
mediatek: filogic: fix failsafe mode on devices with no lan1
Default to lan4 port, instead of (missing) lan1 port,
to fix failsafe mode on Xiaomi AX3000T, WR30U, AX6000
Build system: x86/64
Build-tested: mediatek/filogic/xiaomi_mi-router-ax3000t-ubootmod
Run-tested: mediatek/filogic/xiaomi_mi-router-ax3000t-ubootmod
Signed-off-by: Paul Geraedts
---
diff --git a/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface b/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
index 9f513d20c4..2bff09b2b2 100644
--- a/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
+++ b/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
@@ -15,6 +15,15 @@ set_preinit_iface() {
ip link set eth0 up
ifname=eth0
;;
+ xiaomi,mi-router-ax3000t|\
+ xiaomi,mi-router-ax3000t-ubootmod|\
+ xiaomi,mi-router-wr30u-stock|\
+ xiaomi,mi-router-wr30u-ubootmod|\
+ xiaomi,redmi-router-ax6000-stock|\
+ xiaomi,redmi-router-ax6000-ubootmod)
+ ip link set eth0 up
+ ifname=lan4
+ ;;
*)
ip link set eth0 up
ifname=lan1