diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-03-13 03:02:28 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-03-13 03:02:28 +0000 |
commit | 1850e0f0a7627b4e0ef18516ff2b25a7c14215ca (patch) | |
tree | 22c612d44a744058d16d50acce527f0d07c9151b /target/linux/ath25/base-files/lib/preinit | |
parent | 558a452e1a50f6195c8839c9828ae94a89ea0308 (diff) | |
download | upstream-1850e0f0a7627b4e0ef18516ff2b25a7c14215ca.tar.gz upstream-1850e0f0a7627b4e0ef18516ff2b25a7c14215ca.tar.bz2 upstream-1850e0f0a7627b4e0ef18516ff2b25a7c14215ca.zip |
Rename 'atheros' target to 'ath25'
Rename 'atheros' target to more precise 'ath25'.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 44736
Diffstat (limited to 'target/linux/ath25/base-files/lib/preinit')
-rw-r--r-- | target/linux/ath25/base-files/lib/preinit/15_preinit_iface_atheros | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/target/linux/ath25/base-files/lib/preinit/15_preinit_iface_atheros b/target/linux/ath25/base-files/lib/preinit/15_preinit_iface_atheros new file mode 100644 index 0000000000..434103e172 --- /dev/null +++ b/target/linux/ath25/base-files/lib/preinit/15_preinit_iface_atheros @@ -0,0 +1,35 @@ +#!/bin/sh + +# reset button only supported on ar5315+ at the moment +preinit_ip() { + if [ -z "$pi_ifname" ]; then + grep -q 'Atheros AR231[567]' /proc/cpuinfo && { + if [ -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/0:00" -o \ + -e "/sys/bus/mdio_bus/drivers/Marvell 88E6060/0:10" ]; then + vconfig set_name_type DEV_PLUS_VID_NO_PAD + ifconfig eth0 up + vconfig add eth0 1 + ifname=eth0.1 + else + ifname=eth0 + fi + pi_ifname=$ifname + } + fi + [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && { + ifconfig $pi_ifname $pi_ip netmask $pi_netmask broadcast $pi_broadcast up + } +} + + +# reset button only supported on ar5315+ at the moment + +preinit_ip_deconfig() { + if [ -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/0:00" -o \ + -e "/sys/bus/mdio_bus/drivers/Marvell 88E6060/0:10" ]; then + vconfig rem eth0.1 2>/dev/null + ifconfig $pi_ifname down + elif [ -n "$pi_ifname" ]; then + ifconfig $pi_ifname 0.0.0.0 + fi +} |