aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-09-20 16:59:44 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-09-20 16:59:44 +0000
commit944577c63f4914274695f6801af8fffab4316ec1 (patch)
treeff84b057bd06dc413585e41a94ee71b49d87b981 /target/linux
parent784e34f43a1a39a9d82f486d7298292432a67557 (diff)
downloadupstream-944577c63f4914274695f6801af8fffab4316ec1.tar.gz
upstream-944577c63f4914274695f6801af8fffab4316ec1.tar.bz2
upstream-944577c63f4914274695f6801af8fffab4316ec1.zip
ar71xx: set proper wan mac during initial configuration on dir-825-c1
The goal is to set the WAN MAC address to the one on the sticker on the bottom of the unit. Currently it is not used at all. But some users expect the WAN interface to have the MAC address that is written on the sticker. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net> Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38091 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/uci-defaults/02_network11
1 files changed, 10 insertions, 1 deletions
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 23e99d0b3b..b654bbbd35 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -194,7 +194,16 @@ wzr-hp-g300nh)
ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t"
;;
-dir-825-c1 |\
+dir-825-c1)
+ local mac
+ ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+ ucidef_add_switch "switch0" "1" "1"
+ ucidef_add_switch_vlan "switch0" "1" "0t 1 2 3 4"
+ ucidef_add_switch_vlan "switch0" "2" "0t 5"
+ mac=$(mtd_get_mac_ascii nvram "^wan_mac")
+ [ -n "$mac" ] && ucidef_set_interface_macaddr "wan" "$mac"
+ ;;
+
dir-835-a1 |\
wndr4300)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"