3 .
/lib
/functions
/system.sh
4 .
/lib
/functions
/uci-defaults.sh
5 .
/lib
/functions
/k2t.sh
7 ath79_setup_interfaces
()
13 ucidef_set_interface_lan
"eth0" "dhcp"
21 ucidef_set_interface_lan
"eth0"
24 "embeddedwireless,dorin")
25 ucidef_add_switch
"switch0" \
26 "0@eth0" "1:wan" "2:lan:3" "3:lan:2"
30 ucidef_set_interfaces_lan_wan
"eth1" "eth0"
34 ucidef_set_interfaces_lan_wan
"eth1" "eth0"
39 ucidef_set_interfaces_lan_wan
"eth1.1" "eth0"
40 ucidef_add_switch
"switch0" \
41 "0@eth1" "1:lan" "2:lan" "3:lan:3" "4:lan:4"
44 "tplink,tl-archer-c7-v2")
45 ucidef_set_interfaces_lan_wan
"eth1.1" "eth0.2"
46 ucidef_add_switch
"switch0" \
47 "0@eth1" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth0" "1:wan"
50 "tplink,tl-mr3020-v1")
51 ucidef_set_interface_lan
"eth0.1"
52 ucidef_add_switch
"switch0" "0@eth0" "1:lan"
54 "tplink,tl-mr3220-v1"|\
55 "tplink,tl-mr3420-v1"|\
57 ucidef_set_interface_wan
"eth0"
58 ucidef_add_switch
"switch0" \
59 "0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
63 ucidef_add_switch
"switch0" \
64 "0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan"
67 "tplink,tl-wr740n-v2")
68 ucidef_set_interfaces_lan_wan
"eth1.1" "eth0"
69 ucidef_add_switch
"switch0" \
70 "0@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
73 "tplink,tl-wr1043nd-v1")
74 ucidef_add_switch
"switch0" \
75 "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "5@eth0"
77 "tplink,tl-wr1043nd-v4")
78 ucidef_add_switch
"switch0" \
79 "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
81 "tplink,tl-wr1043nd-v2"|\
82 "tplink,tl-wr1043nd-v3")
83 ucidef_set_interfaces_lan_wan
"eth1.1" "eth0.2"
84 ucidef_add_switch
"switch0" \
85 "0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" "6@eth0"
87 "tplink,tl-wr2543-v1")
88 ucidef_add_switch
"switch0" \
89 "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9@eth0"
92 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
93 ucidef_add_switch
"switch0" \
94 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5u@eth0"
96 ucidef_add_switch_attr
"switch0" "blinkrate" 2
97 ucidef_add_switch_port_attr
"switch0" 1 led
6
98 ucidef_add_switch_port_attr
"switch0" 2 led
9
99 ucidef_add_switch_port_attr
"switch0" 5 led
2
101 "buffalo,wzr-hp-g450h")
102 ucidef_add_switch
"switch0" \
103 "0@eth0" "2:lan" "3:lan" "4:lan" "5:lan" "1:wan"
106 ucidef_add_switch
"switch0" \
107 "0@eth0" "3:lan:1" "5:lan:2" "4:wan"
110 ucidef_add_switch
"switch0" \
111 "0@eth0" "2:lan" "3:wan"
114 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
125 lan_mac
=$
(fritz_tffs
-n maca
-i $
(find_mtd_part
"tffs (1)"))
128 lan_mac
=$
(k2t_get_mac
"lan_mac")
129 wan_mac
=$
(k2t_get_mac
"wan_mac")
131 "tplink,tl-wr1043nd-v4")
132 base_mac
=$
(mtd_get_mac_binary product-info
8)
133 wan_mac
=$
(macaddr_add
"$base_mac" 1)
137 [ -n "$lan_mac" ] && ucidef_set_interface_macaddr
"lan" $lan_mac
138 [ -n "$wan_mac" ] && ucidef_set_interface_macaddr
"wan" $wan_mac
143 ath79_setup_interfaces
$board
144 ath79_setup_macs
$board