Author: blogic
Date: 2016-01-01 22:19:21 +0100 (Fri, 01 Jan 2016)
New Revision: 48045

Modified:
   trunk/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh
Log:
lantiq: add the current profile to the stats output

Signed-off-by: Mathias Kresin <[email protected]>

Modified: trunk/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh
===================================================================
--- trunk/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh    
2016-01-01 21:19:12 UTC (rev 48044)
+++ trunk/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh    
2016-01-01 21:19:21 UTC (rev 48045)
@@ -631,10 +631,40 @@
        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
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to