mac80211: brcmsmac: fix a build warning, till we update bcma
[openwrt/openwrt.git] / target / linux / ramips / base-files / lib / preinit / 06_set_iface_mac
1 #
2 # Copyright (C) 2011 OpenWrt.org
3 #
4
5 preinit_set_mac_address() {
6 local mac
7
8 . /lib/ramips.sh
9
10 case $(ramips_board_name) in
11 bc2 |\
12 nw718 |\
13 rt-n56u |\
14 esr-9753)
15 mac=$(ramips_get_mac_binary factory 4)
16 mac=$(maccalc or "$mac" "02:00:00:00:00:00")
17 ifconfig eth0 hw ether $mac 2>/dev/null
18 ;;
19 dir-300-b1 |\
20 dir-300-b2 |\
21 dir-600-b1)
22 mac=$(ramips_get_mac_binary devdata 16388)
23 ifconfig eth0 hw ether $mac 2>/dev/null
24 ;;
25 all0256n |\
26 hw550-3g |\
27 nbg-419n |\
28 omni-emb |\
29 w502u |\
30 wr6202)
31 mac=$(ramips_get_mac_binary factory 40)
32 ifconfig eth0 hw ether $mac 2>/dev/null
33 ;;
34 wl341v3)
35 mac=$(ramips_get_mac_binary board-nvram 65440)
36 ifconfig eth0 hw ether $mac 2>/dev/null
37 ;;
38 esac
39 }
40
41 boot_hook_add preinit_main preinit_set_mac_address