3 # Copyright (C) 2011-2012 OpenWrt.org
6 [ -e /etc
/config
/network
] && exit 0
14 set network.atm='atm-bridge'
15 set network.atm.vpi='$vpi'
16 set network.atm.vci='$vci'
17 set network.atm.encaps='$encaps'
18 set network.atm.payload='$payload'
19 set network.wan='interface'
20 set network.wan.ifname='nas0'
21 set network.wan.proto='pppoe'
22 set network.wan.username='foo'
23 set network.wan.password='bar'
24 set network.wan.ipv6='1'
25 set network.wan6='interface'
26 set network.wan6.ifname='@wan'
27 set network.wan6.proto='dhcpv6'
31 .
/lib
/functions
/uci-defaults.sh
32 .
/lib
/functions
/lantiq.sh
34 touch /etc
/config
/network
36 ucidef_set_interface_loopback
37 ucidef_set_interface_lan
'eth0'
46 board
=$
(lantiq_board_id
)
51 lan_mac
=$
(mtd_get_mac_ascii uboot_env ethaddr
)
52 wan_mac
=$
(macaddr_add
"$lan_mac" 1)
53 ucidef_set_interface_lan
"eth0.1"
54 ucidef_add_switch
"switch0" "1" "1"
55 ucidef_add_switch_vlan
"switch0" "1" "3 2 1 0 5t"
59 ucidef_set_interface_lan
"eth0.1"
60 ucidef_add_switch
"switch0" "1" "1"
61 ucidef_add_switch_vlan
"switch0" "1" "3 2 1 0 5t"
65 ucidef_set_interface_lan
"eth0.1"
66 ucidef_add_switch
"switch0" "1" "1"
67 ucidef_add_switch_vlan
"switch0" "1" "4 3 2 1 5t"
71 ARV4519PW|ARV7510PW22|ARV7518PW|ARV752DPW22
)
72 ucidef_set_interface_lan
"eth0.1"
73 ucidef_add_switch
"switch0" "1" "1"
74 ucidef_add_switch_vlan
"switch0" "1" "0t 2 3 4 5"
78 ucidef_set_interface_lan
"eth0.1"
79 ucidef_add_switch
"switch0" "1" "1"
80 ucidef_add_switch_vlan
"switch0" "1" "0t 2 3 4 5"
84 ucidef_set_interface_lan
'eth0'
85 uci
set network.lan.
type='none'
89 lan_mac
=$
(mtd_get_mac_ascii uboot-env ethaddr
)
90 wan_mac
=$
(macaddr_add
"$lan_mac" 1)
91 ucidef_set_interface_lan
"eth0.1"
92 ucidef_add_switch
"switch0" "1" "1"
93 ucidef_add_switch_vlan
"switch0" "1" "3 2 1 0 5t"
97 ucidef_set_interface_wan
"eth0"
98 uci
set network.lan.ifname
=''
102 ucidef_set_interface_lan
"eth0.1"
103 ucidef_add_switch
"switch0" "1" "1"
104 ucidef_add_switch_vlan
"switch0" "1" "0 1 2 3 4t"
108 ucidef_set_interface_lan
"eth0.1"
109 ucidef_add_switch
"switch0" "1" "1"
110 ucidef_add_switch_vlan
"switch0" "1" "1 2 3 4 5t"
114 ucidef_set_interface_lan
'eth0.1'
115 ucidef_add_switch
"switch0" "1" "1"
116 ucidef_add_switch_vlan
"switch0" "1" "0 1 2 4 5 6t"
120 lan_mac
=$
(mtd_get_mac_binary boardconfig
61696)
121 wan_mac
=$
(macaddr_add
"$lan_mac" 1)
125 [ -z "$(ls /lib/modules/`uname -r`/ltq_atm*)" ] || set_atm_wan
"$vpi" "$vci" "$encaps" "$payload"
126 [ -n "$lan_mac" ] && ucidef_set_interface_macaddr lan
$lan_mac
127 [ -n "$wan_mac" ] && ucidef_set_interface_macaddr wan
$wan_mac