aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2016-05-02 18:51:20 +0000
committerLuka Perkov <luka@openwrt.org>2016-06-19 19:21:33 +0200
commit4d5daf0ef3f84f9b03eb036fb7c0348624c9fa09 (patch)
treec8f92b77285e505cd09b4f63902f716b254ad820 /target
parentf238f71af126b0b4213b591e5916f9676ae212f6 (diff)
downloadmaster-187ad058-4d5daf0ef3f84f9b03eb036fb7c0348624c9fa09.tar.gz
master-187ad058-4d5daf0ef3f84f9b03eb036fb7c0348624c9fa09.tar.bz2
master-187ad058-4d5daf0ef3f84f9b03eb036fb7c0348624c9fa09.zip
ramips: Drop hacky switch workaround for failsafe on rt3x5x and rt5350.
The new rt3050 switch driver doesn't have problems with TCP when not using VLANs. This piece of code also broke failsafe for all routers where the LAN port is not wired to port 0 of the internal switch. Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49293 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips37
1 files changed, 9 insertions, 28 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 6948851ee5..452b1b203f 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
@@ -6,43 +6,24 @@
. /lib/ramips.sh
ramips_set_preinit_iface() {
- RT3X5X=`cat /proc/cpuinfo | egrep "(RT3.5|RT5350|MT7628|MT7688)"`
- MT762X=`cat /proc/cpuinfo | egrep "MT7620"`
+ RT3X5X=`cat /proc/cpuinfo | egrep "(RT3.5|RT5350|MT7628|MT7688|MT7620)"`
if [ -n "${RT3X5X}" ]; then
- swconfig dev rt305x set reset 1
- elif [ -n "${MT762X}" ]; then
- # The mt7530 switch driver enables VLAN by default, but
+ # The ethernet switch driver enables VLAN by default, but
# failsafe uses eth0, making the device unreachable:
# https://dev.openwrt.org/ticket/18768
- case "${MT762X}" in
+ ralink_switchdev=rt305x
+ case "${RT3X5X}" in
*MT7620*)
- mt762x_switchdev=mt7620
+ ralink_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
+ swconfig dev $ralink_switchdev set reset 1
+ swconfig dev $ralink_switchdev set enable_vlan 0
+ swconfig dev $ralink_switchdev set apply 1
fi
- if echo $RT3X5X | egrep -q "(RT5350|MT7628|MT7688)"; then
- # This is a dirty hack to get by while the switch
- # problem is investigated. When VLAN is disabled, ICMP
- # pings work as expected, but TCP connections time
- # out, so telnetting in failsafe is impossible. The
- # likely reason is TCP checksumming hardware getting
- # disabled:
- # https://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg19870.html
- swconfig dev rt305x set enable_vlan 1
- swconfig dev rt305x vlan 1 set ports "0 6"
- swconfig dev rt305x port 6 set untag 0
- swconfig dev rt305x set apply 1
- ip link add link eth0 name eth0.1 type vlan id 1
- ip link set eth0 up
- ifname=eth0.1
- else
- ifname=eth0
- fi
+ ifname=eth0
}
boot_hook_add preinit_main ramips_set_preinit_iface