ramips: mt7621: fix failsafe mode networking
[openwrt/openwrt.git] / target / linux / ramips / base-files / lib / preinit / 07_set_preinit_iface_ramips
index 452b1b203f7b2fb49ddbc2d368453b76758ed732..5048dacb4f49aa57e67d527daa88ecee1d686e4e 100644 (file)
@@ -6,17 +6,22 @@
 . /lib/ramips.sh
 
 ramips_set_preinit_iface() {
-       RT3X5X=`cat /proc/cpuinfo | egrep "(RT3.5|RT5350|MT7628|MT7688|MT7620)"`
+       RT3X5X=`cat /proc/cpuinfo | egrep "(RT3.5|RT5350|MT7628|MT7688|MT7620|MT7621)"`
 
        if [ -n "${RT3X5X}" ]; then
                # The ethernet switch driver enables VLAN by default, but
                # failsafe uses eth0, making the device unreachable:
                # https://dev.openwrt.org/ticket/18768
-               ralink_switchdev=rt305x
                case "${RT3X5X}" in
                *MT7620*)
                        ralink_switchdev=mt7620
                        ;;
+               *MT7621*)
+                       ralink_switchdev=mt7530
+                       ;;
+               *)
+                       ralink_switchdev=rt305x
+                       ;;
                esac
                swconfig dev $ralink_switchdev set reset 1
                swconfig dev $ralink_switchdev set enable_vlan 0