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 <igvtee@gmail.com>

SVN-Revision: 40910
v19.07.3_mercusys_ac12_duma
John Crispin 10 years ago
parent 36d0a5e3fb
commit 9b728bebfb

@ -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

Loading…
Cancel
Save