From 6695dc87b5279d279601e71390c36834e089ee2e Mon Sep 17 00:00:00 2001 From: John Crispin Date: Mon, 2 Jun 2014 12:43:04 +0000 Subject: ramips: fix not set lan/wan mac address The first switch case is default case. Then it will only match default case. cause not update the lan/wan mac address. And in the default switch case the param lan_mac is empty. it will case error message 'arithmetic syntax error' when call macaddr_add function. Signed-off-by: michael lee git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40910 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/ramips/base-files/etc/uci-defaults/02_network | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'target/linux') diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network b/target/linux/ramips/base-files/etc/uci-defaults/02_network index b9524f6d2c..e167ddb84f 100755 --- a/target/linux/ramips/base-files/etc/uci-defaults/02_network +++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network @@ -179,10 +179,6 @@ ramips_setup_macs() local wan_mac="" case $board in - *) - wan_mac=$(macaddr_add "$lan_mac" 1) - ;; - br-6475nd) lan_mac=$(mtd_get_mac_binary devdata 13) wan_mac=$(mtd_get_mac_binary devdata 7) @@ -240,6 +236,10 @@ ramips_setup_macs() wan_mac=$(macaddr_add "$lan_mac" 1) ;; + *) + wan_mac=$(macaddr_add "$lan_mac" 1) + ;; + esac [ -n "$lan_mac" ] && ucidef_set_interface_macaddr lan $lan_mac -- cgit v1.2.3