aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/nand/base-files/lib/preinit/10_fix_eth_mac.sh
blob: fdd8381f562b210d46f727b06d68bcb81bf4c050 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
. /lib/functions.sh
. /lib/functions/system.sh

preinit_set_mac_address() {
	case $(board_name) in
	zyxel,nbg6716)
		ethaddr=$(mtd_get_mac_ascii u-boot-env ethaddr)
		ip link set dev eth0 address $(macaddr_add $ethaddr 2)
		ip link set dev eth1 address $(macaddr_add $ethaddr 3)
		;;
	esac
}

boot_hook_add preinit_main preinit_set_mac_address