source: trunk/target/linux/atheros/base-files/etc/preinit.arch @ 14981

Last change on this file since 14981 was 14981, checked in by nbd, 8 years ago

atheros: in later kernels, vlan 0 no longer works as expected, switch to (1,2) instead of (0,1) for lan/wan

  • Property svn:executable set to *
File size: 659 bytes
Line 
1# reset button only supported on ar5315+ at the moment
2grep 'Atheros AR231[567]' /proc/cpuinfo > /dev/null && {
3        if [ -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/0:00" -o \
4             -e "/sys/bus/mdio_bus/drivers/Marvell 88E6060/0:10" ]; then
5                vconfig set_name_type DEV_PLUS_VID_NO_PAD
6                ifconfig eth0 up
7                vconfig add eth0 1
8                ifname=eth0.1
9        else
10                ifname=eth0
11        fi
12        failsafe_ip
13        netmsg 192.168.1.255 "Press reset now, to enter Failsafe!"
14        ifconfig "$ifname" 0.0.0.0 down
15        sleep 2
16        if [ -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/0:00" -o \
17             -e "/sys/bus/mdio_bus/drivers/Marvell 88E6060/0:10" ]; then
18                vconfig rem eth0.1
19                ifconfig eth0 down
20        fi
21}
Note: See TracBrowser for help on using the repository browser.