ath79: add support for Aerohive HiveAP 121
[openwrt/staging/dedeckeh.git] / target / linux / ath79 / nand / base-files / etc / board.d / 02_network
1 #!/bin/sh
2
3 . /lib/functions/system.sh
4 . /lib/functions/uci-defaults.sh
5
6 ath79_setup_interfaces()
7 {
8 local board="$1"
9
10 case "$board" in
11 aerohive,hiveap-121)
12 ucidef_set_interface_lan "eth0"
13 ;;
14 *)
15 ucidef_set_interfaces_lan_wan "eth0" "eth1"
16 ;;
17 esac
18 }
19
20 ath79_setup_macs()
21 {
22 local board="$1"
23
24 case "$board" in
25 esac
26
27 [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
28 [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
29 [ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
30 }
31
32 board_config_update
33 board=$(board_name)
34 ath79_setup_interfaces $board
35 ath79_setup_macs $board
36 board_config_flush
37
38 exit 0