make use of the adm6996 switch for atheros devices that support it (autodetected...
[openwrt/svn-archive/archive.git] / target / linux / atheros / base-files / etc / preinit.arch
1 # reset button only supported on ar5315+ at the moment
2 grep 'Atheros AR231[567]' /proc/cpuinfo > /dev/null && {
3 if [ -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/0:00" ]; then
4 vconfig set_name_type DEV_PLUS_VID_NO_PAD
5 ifconfig eth0 up
6 vconfig add eth0 0
7 ifname=eth0.0
8 else
9 ifname=eth0
10 fi
11 failsafe_ip
12 netmsg 192.168.1.255 "Press reset now, to enter Failsafe!"
13 ifconfig "$ifname" 0.0.0.0 down
14 sleep 2
15 if [ -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/0:00" ]; then
16 vconfig rem eth0.0
17 ifconfig eth0 down
18 fi
19 }