ipq40xx: fix GL.iNet GL-B1300 support
[openwrt/staging/dedeckeh.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 avm,fritzbox-4040)
16 ucidef_set_interfaces_lan_wan "eth0" "eth1"
17 ucidef_add_switch "switch0" \
18 "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
19 ;;
20 glinet,gl-b1300)
21 ucidef_set_interfaces_lan_wan "eth0" "eth1"
22 ucidef_add_switch "switch0" \
23 "0u@eth0" "3:lan" "4:lan"
24 ;;
25 openmesh,a42)
26 ucidef_set_interfaces_lan_wan "eth1" "eth0"
27 ;;
28 *)
29 echo "Unsupported hardware. Network interfaces not intialized"
30 ;;
31 esac
32
33 board_config_flush
34
35 exit 0