ath79: add Zyxel EMG2926-Q10A
[openwrt/staging/jow.git] / target / linux / ath79 / nand / base-files / lib / preinit / 10_fix_eth_mac.sh
1 . /lib/functions.sh
2 . /lib/functions/system.sh
3
4 preinit_set_mac_address() {
5 case $(board_name) in
6 zyxel,emg2926-q10a|\
7 zyxel,nbg6716)
8 ethaddr=$(mtd_get_mac_ascii u-boot-env ethaddr)
9 ip link set dev eth0 address $(macaddr_add $ethaddr 2)
10 ip link set dev eth1 address $(macaddr_add $ethaddr 3)
11 ;;
12 esac
13 }
14
15 boot_hook_add preinit_main preinit_set_mac_address