ramips: mt7620: fix failsafe switch config
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 25 Feb 2016 10:14:22 +0000 (10:14 +0000)
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 25 Feb 2016 10:14:22 +0000 (10:14 +0000)
commit5668105a3fd9889d88c5babc7eb656cc13142246
treeaf175fba84acdcc89e1d56d8d218b85c6fdace35
parent2de05f62588f9d7fafb90d37f63002a56a1b885c
ramips: mt7620: fix failsafe switch config

As indicated in the bug tracker[1], failsafe mode is broken on at least some
devices using the mt7620 switch (and possibly mt7621). The thread explicitly
mentions the Xiaomi MiWifi, and the Nexx WT3020, and an unspecified device
using the mt7621 switch; the issue also applies to the Netgear EX2700.

The problem is that failsafe mode uses eth0, but enable_vlan is always set to 1
by the switch driver. Connecting to and/or pinging the device fails. This patch
fixes the failsafe preinit config, by making sure that vlan support is disabled.
It currently only fixes the switch config on mt7620, but might apply to the
mt7621 as well, so the patch has been designed with this in mind.

A similar (line wrapped) patch was submitted in December by Simon Peter, but never
accepted and/or discussed.

This patch applies to both Chaos Calmer and trunk.

[1] https://dev.openwrt.org/ticket/18768

Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48772 3c298f89-4303-0410-b956-a3cf2f4a3e73
target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips