aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/base-files/etc/uci-defaults
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2012-02-14 15:05:49 +0000
committerJohn Crispin <blogic@openwrt.org>2012-02-14 15:05:49 +0000
commitce45d49f3c7d6558b634bbb978e9eb123f08010f (patch)
treeb54b6f1287e191db6718793286e8d0286236c78c /target/linux/lantiq/base-files/etc/uci-defaults
parent1c8bb38b682989c69feab90355c84266c8106f56 (diff)
downloadmaster-187ad058-ce45d49f3c7d6558b634bbb978e9eb123f08010f.tar.gz
master-187ad058-ce45d49f3c7d6558b634bbb978e9eb123f08010f.tar.bz2
master-187ad058-ce45d49f3c7d6558b634bbb978e9eb123f08010f.zip
[ltq-dsl] add annex selection support to ltq_dsl package
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30518 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq/base-files/etc/uci-defaults')
-rwxr-xr-xtarget/linux/lantiq/base-files/etc/uci-defaults/network28
1 files changed, 23 insertions, 5 deletions
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/network b/target/linux/lantiq/base-files/etc/uci-defaults/network
index 3b7fe26621..09f6bd7bff 100755
--- a/target/linux/lantiq/base-files/etc/uci-defaults/network
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/network
@@ -52,7 +52,6 @@ set_atm_wan() {
local vci=$2
local encaps=$3
local payload=$4
-
uci batch <<EOF
set network.atm='atm-bridge'
set network.atm.unit='0'
@@ -60,6 +59,8 @@ set network.atm.vpi='$vpi'
set network.atm.vci='$vci'
set network.atm.encaps='$encaps'
set network.atm.payload='$payload'
+set network.atm.fwannex='$annex'
+set network.atm.annex='$annex'
set network.wan='interface'
set network.wan.ifname='nas0'
set network.wan.proto='pppoe'
@@ -68,6 +69,16 @@ set network.wan.password='bar'
EOF
}
+set_adsl() {
+ local fwannex=$1
+ local annex=$2
+ uci batch <<EOF
+set network.adsl='adsl-device'
+set network.adsl.fwannex='$fwannex'
+set network.adsl.annex='$annex'
+EOF
+}
+
set_interfaces_lan_wan() {
local lan_ifname=$1
local wan_ifname=$2
@@ -109,17 +120,20 @@ touch /etc/config/network
set_interface_loopback
set_interface_lan 'eth0'
-dsl=$(lantiq_soc_has_adsl)
-[ -z "$dsl" ] || set_atm_wan '1' '32' 'llc' 'bridged'
-board=$(lantiq_board_name)
+vpi=1
+vci=32
+encaps="llc"
+payload="bridged"
+fwannex=$(lantiq_dsl_fwannex)
+annex="$fwannex"
+board=$(lantiq_board_name)
case "$board" in
GIGASX76X)
set_interface_lan "eth0.1"
add_switch "eth0" "1" "1"
add_switch_vlan "eth0" "1" "1 2 3 4 5t"
- set_atm_wan "1" "32" "llc" "bridged"
;;
*)
@@ -128,6 +142,10 @@ GIGASX76X)
;;
esac
+dsl=$(lantiq_soc_has_adsl)
+[ -z "$dsl" ] || set_atm_wan "$vpi" "vci" "$encaps" "$payload" "$annex"
+[ -z "$fwannex" ] || set_adsl "$fwannex" "$annex"
+
uci commit network
exit 0