3 # Copyright (c) 2015 The Linux Foundation. All rights reserved.
4 # Copyright (c) 2011-2015 OpenWrt.org
7 .
/lib
/functions
/uci-defaults.sh
8 .
/lib
/functions
/system.sh
10 ipq40xx_setup_interfaces
()
16 alfa-network
,ap120c-ac|\
18 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
23 ucidef_set_interfaces_lan_wan
"eth1" "eth0"
27 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
28 ucidef_add_switch
"switch0" \
29 "0u@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
33 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
34 ucidef_add_switch
"switch0" \
35 "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
38 ucidef_add_switch
"switch0" \
39 "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
41 avm
,fritzrepeater-3000|\
43 ucidef_set_interface_lan
"eth0 eth1"
50 ucidef_set_interface_lan
"eth0"
53 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
54 ucidef_add_switch
"switch0" \
55 "0u@eth0" "3:lan" "4:lan"
59 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
60 ucidef_add_switch
"switch0" \
61 "0u@eth0" "3:lan" "4:lan" "0u@eth1" "5:wan"
64 echo "Unsupported hardware. Network interfaces not initialized"
76 wan_mac
=$
(mtd_get_mac_binary_ubi Factory
20486)
77 lan_mac
=$
(mtd_get_mac_binary_ubi Factory
4102)
80 wan_mac
=$
(mtd_get_mac_ascii u-boot-env ethaddr
)
81 lan_mac
=$
(macaddr_add
"$wan_mac" 1)
84 wan_mac
=$
(mtd_get_mac_ascii devinfo hw_mac_addr
)
85 lan_mac
=$
(macaddr_add
"$wan_mac" 1)
89 [ -n "$lan_mac" ] && ucidef_set_interface_macaddr
"lan" $lan_mac
90 [ -n "$wan_mac" ] && ucidef_set_interface_macaddr
"wan" $wan_mac
95 ipq40xx_setup_interfaces
$board
96 ipq40xx_setup_macs
$board