#!/bin/sh /etc/rc.common
# Copyright (C) 2012 OpenWrt.org
-# needs to start before the atm layer which starts at 50
-START=48
+START=97
USE_PROCD=1
-EXTRA_COMMANDS="status lucistat"
-EXTRA_HELP=" status Get DSL status information
- lucistat Get status information if lua friendly format"
+EXTRA_COMMANDS="dslstat lucistat"
+EXTRA_HELP=" dslstat Get DSL status information
+ lucistat Get status information in lua friendly format"
-[ -f /lib/functions/lantiq_dsl.sh ] && . /lib/functions/lantiq_dsl.sh
+. /lib/functions/lantiq_dsl.sh
#
# ITU-T G.997.1 (06/2012) - Section 7.3.1.1.1 (xTU transmission system enabling (XTSE))
}
[Common]={
-}" > /tmp/adsl.scr
+}" > /tmp/dsl.scr
}
lowlevel_cfg() {
local xtse
local xfer_mode
local line_mode
+ local tc_layer
local mode
local lowlevel
local snr
eval "xtse=\"\${xtse_xdsl_$annex}\""
- [ -z "${xfer_mode}" ] && xfer_mode=ptm
-
case "${xfer_mode}" in
atm)
- # in most cases atm is used on top of adsl
- [ -z "${line_mode}" ] && line_mode=adsl
+ tc_layer="-T1:0x1:0x1_1:0x1:0x1"
;;
- *)
- # in most cases ptm is used on top of vdsl
- [ -z "${line_mode}" ] && line_mode=vdsl
+ ptm)
+ tc_layer="-T2:0x1:0x1_2:0x1:0x1"
;;
esac
case "${line_mode}" in
adsl)
- mode=1
+ mode="-M1"
- # mask out VDSL bits when ATM is requested
+ # mask out VDSL bits when ADSL is requested
xtse="${xtse%_*}_00"
;;
- *)
- mode=2
+ vdsl)
+ mode="-M2"
+
+ # mask out ADSL bits when VDSL is requested
+ xtse="00_00_00_00_00_00_00_${xtse##*_}"
;;
esac
fi
;;
b*|j*)
- if [ -f "/lib/firmware/lantiq-vrx200-b.bin" ]; then
+ if [ -f "/lib/firmware/vr9_dsl_fw_annex_b.bin" ]; then
+ firmware="/lib/firmware/vr9_dsl_fw_annex_b.bin"
+ elif [ -f "/lib/firmware/lantiq-vrx200-b.bin" ]; then
firmware="/lib/firmware/lantiq-vrx200-b.bin"
elif [ -f "/tmp/lantiq-vrx200-b.bin" ]; then
firmware="/tmp/lantiq-vrx200-b.bin"
[ -z "${snr}" ] || {
# for SNR offset setting
autoboot_script "$snr"
- autoboot="-a /tmp/adsl.scr"
+ autoboot="-a /tmp/dsl.scr -A /tmp/dsl.scr"
}
procd_open_instance
-n /sbin/dsl_notify.sh \
-f ${firmware} \
$lowlevel \
- -M ${mode} \
+ ${mode} \
+ ${tc_layer} \
$autoboot
procd_close_instance
}