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"
24 ucidef_set_interfaces_lan_wan
"eth1" "eth0"
28 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
29 ucidef_add_switch
"switch0" \
30 "0u@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
35 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
36 ucidef_add_switch
"switch0" \
37 "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
40 ucidef_add_switch
"switch0" \
41 "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
43 avm
,fritzrepeater-1200|\
49 ucidef_set_interface_lan
"eth0"
51 avm
,fritzrepeater-3000|\
54 ucidef_set_interface_lan
"eth0 eth1"
57 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
58 ucidef_add_switch
"switch0" \
59 "0u@eth0" "3:lan" "4:lan"
63 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
64 ucidef_add_switch
"switch0" \
65 "0u@eth0" "3:lan" "4:lan" "0u@eth1" "5:wan"
68 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
69 ucidef_add_switch
"switch0" \
70 "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "0u@eth1" "5:wan"
73 echo "Unsupported hardware. Network interfaces not initialized"
85 wan_mac
=$
(mtd_get_mac_binary_ubi Factory
0x5006)
86 lan_mac
=$
(mtd_get_mac_binary_ubi Factory
0x1006)
89 label_mac
=$
(mtd_get_mac_binary
"ART" 0x1006)
92 wan_mac
=$
(mtd_get_mac_ascii u-boot-env ethaddr
)
93 lan_mac
=$
(macaddr_add
"$wan_mac" 1)
96 wan_mac
=$
(mtd_get_mac_ascii devinfo hw_mac_addr
)
97 lan_mac
=$
(macaddr_add
"$wan_mac" 1)
101 [ -n "$lan_mac" ] && ucidef_set_interface_macaddr
"lan" $lan_mac
102 [ -n "$wan_mac" ] && ucidef_set_interface_macaddr
"wan" $wan_mac
103 [ -n "$label_mac" ] && ucidef_set_label_macaddr
$label_mac
108 ipq40xx_setup_interfaces
$board
109 ipq40xx_setup_macs
$board