diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-12-04 09:56:55 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-12-04 09:56:55 +0000 |
commit | 6c8daa6ba3e39cfb5373eff1297c798676ef76eb (patch) | |
tree | 544aa2f43005c3cfd7096ac88238241146869b28 /package/base-files/files/lib/functions | |
parent | 813227d9924b75d393a7a372ee09d0543d12f2c2 (diff) | |
download | upstream-6c8daa6ba3e39cfb5373eff1297c798676ef76eb.tar.gz upstream-6c8daa6ba3e39cfb5373eff1297c798676ef76eb.tar.bz2 upstream-6c8daa6ba3e39cfb5373eff1297c798676ef76eb.zip |
base-files: board.d: support dsl modems, atm bridges and pppoe protocol
This adds support for specifying the dsl modem, atm bridge configs and setting
the pppoe protocol for wan.
These additions are required to port the Lantiq target to board.d.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 47750
Diffstat (limited to 'package/base-files/files/lib/functions')
-rwxr-xr-x | package/base-files/files/lib/functions/uci-defaults-new.sh | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/package/base-files/files/lib/functions/uci-defaults-new.sh b/package/base-files/files/lib/functions/uci-defaults-new.sh index 919aac88d3..b970383049 100755 --- a/package/base-files/files/lib/functions/uci-defaults-new.sh +++ b/package/base-files/files/lib/functions/uci-defaults-new.sh @@ -39,7 +39,7 @@ _ucidef_set_interface() { if ! json_is_a protocol string; then case "$proto" in - static|dhcp|none) : ;; + static|dhcp|none|pppoe) : ;; *) case "$name" in lan) proto="static" ;; @@ -304,6 +304,52 @@ ucidef_set_interface_macaddr() { json_select .. } +ucidef_add_atm_bridge() { + local vpi="$1" + local vci="$2" + local encaps="$3" + local payload="$4" + + json_select_object dsl + json_select_object atmbridge + json_add_int vpi "$vpi" + json_add_int vci "$vci" + json_add_string encaps "$encaps" + json_add_string payload "$payload" + json_select .. + json_select .. +} + +ucidef_add_adsl_modem() { + local annex="$1" + local firmware="$2" + + json_select_object dsl + json_select_object modem + json_add_string type "adsl" + json_add_string annex "$annex" + json_add_string firmware "$firmware" + json_select .. + json_select .. +} + +ucidef_add_vdsl_modem() { + local annex="$1" + local firmware="$2" + local tone="$3" + local xfer_mode="$4" + + json_select_object dsl + json_select_object modem + json_add_string type "vdsl" + json_add_string annex "$annex" + json_add_string firmware "$firmware" + json_add_string tone "$tone" + json_add_string xfer_mode "$xfer_mode" + json_select .. + json_select .. +} + ucidef_set_led_netdev() { local cfg="led_$1" local name="$2" |