diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2011-12-01 22:48:43 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2011-12-01 22:48:43 +0000 |
commit | 1c16097588a206b6a7c038093dbfb71fbd1fca2f (patch) | |
tree | e061024adcafd9fbc04f22f917c166bf01ec614f /target/linux/ramips | |
parent | 33678d2d30351fb803cc4efb4e2293987ee32689 (diff) | |
download | master-187ad058-1c16097588a206b6a7c038093dbfb71fbd1fca2f.tar.gz master-187ad058-1c16097588a206b6a7c038093dbfb71fbd1fca2f.tar.bz2 master-187ad058-1c16097588a206b6a7c038093dbfb71fbd1fca2f.zip |
ramips: setup mac and network interfaces from separate functions
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29382 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips')
-rwxr-xr-x | target/linux/ramips/base-files/etc/uci-defaults/network | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/network b/target/linux/ramips/base-files/etc/uci-defaults/network index e58accd181..7baac0c9c0 100755 --- a/target/linux/ramips/base-files/etc/uci-defaults/network +++ b/target/linux/ramips/base-files/etc/uci-defaults/network @@ -107,21 +107,43 @@ set_macs_only_lan_from_nvram() set_macs_only_lan "$lan_mac" } -board=$(ramips_board_name) +ramips_setup_interfaces() +{ + local board="$1" -case $board in - f5d8235-v2) - create_lan_wan - set_macs_only_lan_from_mtd "u-boot" 262148 - ;; + case $board in argus-atp52b | \ b2c | \ + f5d8235-v2 | \ nw718) create_lan_wan - set_macs_only_lan_from_mtd "factory" 4 ;; + *) RT3X5X=`cat /proc/cpuinfo | grep RT3.5` [ -z "${RT3X5X}" ] || create_lan_wan ;; -esac + esac +} + +ramips_setup_macs() +{ + local board="$1" + + case $board in + f5d8235-v2) + set_macs_only_lan_from_mtd "u-boot" 262148 + ;; + + argus-atp52b | \ + b2c | \ + nw718) + set_macs_only_lan_from_mtd "factory" 4 + ;; + esac +} + +board=$(ramips_board_name) + +ramips_setup_interfaces $board +ramips_setup_macs $board |