2 # Copyright (C) 2014-2015 OpenWrt.org
3 # Copyright (C) 2016 LEDE-Project.org
6 preinit_set_mac_address() {
12 case $(mvebu_board_name) in
13 armada-xp-linksys-mamba)
14 mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
15 ifconfig eth0 hw ether $mac 2>/dev/null
16 ifconfig eth1 hw ether $mac 2>/dev/null
18 armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby)
19 mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
20 mac_wan=$(macaddr_setbit_la "$mac")
21 ifconfig eth1 hw ether $mac 2>/dev/null
22 ifconfig eth0 hw ether $mac_wan 2>/dev/null
27 boot_hook_add preinit_main preinit_set_mac_address