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"
34 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
35 ucidef_add_switch
"switch0" \
36 "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
39 ucidef_add_switch
"switch0" \
40 "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
42 avm
,fritzrepeater-1200|\
48 ucidef_set_interface_lan
"eth0"
50 avm
,fritzrepeater-3000|\
52 ucidef_set_interface_lan
"eth0 eth1"
55 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
56 ucidef_add_switch
"switch0" \
57 "0u@eth0" "3:lan" "4:lan"
61 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
62 ucidef_add_switch
"switch0" \
63 "0u@eth0" "3:lan" "4:lan" "0u@eth1" "5:wan"
66 echo "Unsupported hardware. Network interfaces not initialized"
78 wan_mac
=$
(mtd_get_mac_binary_ubi Factory
20486)
79 lan_mac
=$
(mtd_get_mac_binary_ubi Factory
4102)
82 wan_mac
=$
(mtd_get_mac_ascii u-boot-env ethaddr
)
83 lan_mac
=$
(macaddr_add
"$wan_mac" 1)
86 wan_mac
=$
(mtd_get_mac_ascii devinfo hw_mac_addr
)
87 lan_mac
=$
(macaddr_add
"$wan_mac" 1)
91 [ -n "$lan_mac" ] && ucidef_set_interface_macaddr
"lan" $lan_mac
92 [ -n "$wan_mac" ] && ucidef_set_interface_macaddr
"wan" $wan_mac
97 ipq40xx_setup_interfaces
$board
98 ipq40xx_setup_macs
$board