lantiq: move common DSL setup into lantiq.sh
[openwrt/openwrt.git] / target / linux / lantiq / base-files / lib / functions / lantiq.sh
1 lantiq_is_vdsl_system() {
2 grep -qE "system type.*: (VR9|xRX200)" /proc/cpuinfo
3 }
4
5 lantiq_setup_dsl_helper() {
6 local annex="$1"
7
8 ls /lib/modules/$(uname -r)/ltq_atm* 1> /dev/null 2>&1 && \
9 ucidef_add_atm_bridge "1" "32" "llc" "bridged" "dsl"
10
11 if lantiq_is_vdsl_system; then
12 ucidef_add_vdsl_modem "$annex" "av"
13 else
14 ucidef_add_adsl_modem "$annex" "/lib/firmware/adsl.bin"
15 fi
16
17 ucidef_set_interface_wan "dsl0" "pppoe"
18 }