ipq40xx: add Cisco Meraki MR33 Support
[oweals/openwrt.git] / target / linux / ipq40xx / base-files / etc / board.d / 02_network
1 #!/bin/sh
2 #
3 # Copyright (c) 2015 The Linux Foundation. All rights reserved.
4 # Copyright (c) 2011-2015 OpenWrt.org
5 #
6
7 . /lib/functions/uci-defaults.sh
8 . /lib/functions/system.sh
9
10 board_config_update
11
12 board=$(board_name)
13
14 case "$board" in
15 asus,rt-ac58u)
16         CI_UBIPART=UBI_DEV
17         wan_mac_addr=$(mtd_get_mac_binary_ubi Factory 20486)
18         lan_mac_addr=$(mtd_get_mac_binary_ubi Factory 4102)
19         ucidef_set_interfaces_lan_wan "eth0" "eth1"
20         ucidef_add_switch "switch0" \
21                 "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
22         ucidef_set_interface_macaddr "lan" "$lan_mac_addr"
23         ucidef_set_interface_macaddr "wan" "$wan_mac_addr"
24         ;;
25 avm,fritzbox-4040)
26         ucidef_set_interfaces_lan_wan "eth0" "eth1"
27         ucidef_add_switch "switch0" \
28                 "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
29         ;;
30 glinet,gl-b1300)
31         ucidef_set_interfaces_lan_wan "eth0" "eth1"
32         ucidef_add_switch "switch0" \
33                 "0u@eth0" "3:lan" "4:lan"
34         ;;
35 openmesh,a42)
36         ucidef_set_interfaces_lan_wan "eth1" "eth0"
37         ;;
38
39 meraki,mr33)
40         ucidef_set_interface_lan "eth0"
41         ;;
42 *)
43         echo "Unsupported hardware. Network interfaces not intialized"
44         ;;
45 esac
46
47 board_config_flush
48
49 exit 0