1
0
Fork 0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-07 15:26:18 +02:00
openwrt/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
Paul Geraedts 8256d06933 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 <p.f.j.geraedts@gmail.com>
2024-03-02 14:08:08 +01:00

36 lines
628 B
Plaintext

set_preinit_iface() {
case $(board_name) in
smartrg,sdg-8622|\
smartrg,sdg-8632)
ip link set lan up
ifname=lan
;;
glinet,gl-mt3000)
ip link set eth1 up
ifname=eth1
;;
cudy,re3000-v1|\
ubnt,unifi-6-lr|\
zyxel,nwa50ax-pro)
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
;;
esac
}
boot_hook_add preinit_main set_preinit_iface