diff options
author | John Crispin <blogic@openwrt.org> | 2016-01-01 21:19:21 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2016-01-01 21:19:21 +0000 |
commit | 065b3bb6edb1e5bcb9321759bb602f78a10955a4 (patch) | |
tree | 6bcb88e7142aede9cea268658a3045332282869e | |
parent | eebd3e46f491ee6beb613d04162884bb63cd5eeb (diff) | |
download | master-187ad058-065b3bb6edb1e5bcb9321759bb602f78a10955a4.tar.gz master-187ad058-065b3bb6edb1e5bcb9321759bb602f78a10955a4.tar.bz2 master-187ad058-065b3bb6edb1e5bcb9321759bb602f78a10955a4.zip |
lantiq: add the current profile to the stats output
Signed-off-by: Mathias Kresin <openwrt@kresin.me>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48045 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-x | target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh index 60ace44031..ec035df374 100755 --- a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh +++ b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh @@ -631,10 +631,40 @@ line_state() { fi } +# +# Which profile is used? +# +profile() { + local bpstg=$(dsl_cmd bpstg) + local profile=$(dsl_val "$bpstg" nProfile); + local s; + + case "$profile" in + "0") s="8a" ;; + "1") s="8b" ;; + "2") s="8c" ;; + "3") s="8d" ;; + "4") s="12a" ;; + "5") s="12b" ;; + "6") s="17a" ;; + "7") s="30a" ;; + "8") s="17b" ;; + "") s="";; + *) s="unknown" ;; + esac + + if [ "$action" = "lucistat" ]; then + echo "dsl.profile=${profile:-nil}" + else + echo "Profile: $s" + fi +} + status() { vendor chipset xtse + profile line_state errors power_mode |