summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2017-10-16 21:08:26 +0200
committerMathias Kresin <dev@kresin.me>2017-10-25 08:45:05 +0200
commitdacf6db2ee2fd4c7f5e6cb2df7d07143179f1b51 (patch)
treec0e709284e26a21854c49156e052a3f80d571736
parent63c436ea4b7a9946aaa24651a97c8c9e82d28591 (diff)
downloadmtk-20170518-dacf6db2ee2fd4c7f5e6cb2df7d07143179f1b51.zip
mtk-20170518-dacf6db2ee2fd4c7f5e6cb2df7d07143179f1b51.tar.gz
mtk-20170518-dacf6db2ee2fd4c7f5e6cb2df7d07143179f1b51.tar.bz2
ltq-adsl-app: add more script notifications
Backport HANDSHAKE and TRAINING notification from ltq-vdsl-app. It unifies the dsl led blinking pattern accross all subtargets and allows to get the current line status from the dsl led. Signed-off-by: Mathias Kresin <dev@kresin.me>
-rw-r--r--package/network/config/ltq-adsl-app/Makefile2
-rw-r--r--package/network/config/ltq-adsl-app/patches/100-add-more-script-notifications.patch42
2 files changed, 43 insertions, 1 deletions
diff --git a/package/network/config/ltq-adsl-app/Makefile b/package/network/config/ltq-adsl-app/Makefile
index 1b9de80..cf8eaf2 100644
--- a/package/network/config/ltq-adsl-app/Makefile
+++ b/package/network/config/ltq-adsl-app/Makefile
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=dsl_cpe_control_danube
PKG_VERSION:=3.24.4.4
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/dsl_cpe_control-$(PKG_VERSION)
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
diff --git a/package/network/config/ltq-adsl-app/patches/100-add-more-script-notifications.patch b/package/network/config/ltq-adsl-app/patches/100-add-more-script-notifications.patch
new file mode 100644
index 0000000..9d611c1
--- /dev/null
+++ b/package/network/config/ltq-adsl-app/patches/100-add-more-script-notifications.patch
@@ -0,0 +1,42 @@
+From 9d4f86ba2cf10304303011f4f5628fa68dc77624 Mon Sep 17 00:00:00 2001
+From: Mathias Kresin <dev@kresin.me>
+Date: Mon, 16 Oct 2017 21:08:26 +0200
+Subject: ltq-adsl-app: add more script notifications
+
+Backport HANDSHAKE and TRAINING notification from ltq-vdsl-app. It
+unifies the dsl led blinking pattern accross all subtargets and allows
+to get the current line status from the dsl led.
+
+Signed-off-by: Mathias Kresin <dev@kresin.me>
+---
+ .../100-add-more-script-notifications.patch | 27 ++++++++++++++++++++++
+ 1 file changed, 27 insertions(+)
+ create mode 100644 package/network/config/ltq-adsl-app/patches/100-add-more-script-notifications.patch
+
+--- a/src/dsl_cpe_control.c
++++ b/src/dsl_cpe_control.c
+@@ -3273,7 +3273,23 @@ DSL_CPE_STATIC DSL_int_t DSL_CPE_Event_S
+ #ifdef INCLUDE_SCRIPT_NOTIFICATION
+ if (g_sRcScript != DSL_NULL)
+ {
+- if ( (nLineState == DSL_LINESTATE_SHOWTIME_TC_SYNC) &&
++ if ( (nLineState == DSL_LINESTATE_HANDSHAKE) &&
++ (g_nPrevLineState[nDevice] != DSL_LINESTATE_HANDSHAKE) )
++ {
++ if (DSL_CPE_SetEnv("DSL_INTERFACE_STATUS", "HANDSHAKE") == DSL_SUCCESS)
++ {
++ bExec = DSL_TRUE;
++ }
++ }
++ else if ( (nLineState == DSL_LINESTATE_FULL_INIT) &&
++ (g_nPrevLineState[nDevice] != DSL_LINESTATE_FULL_INIT) )
++ {
++ if (DSL_CPE_SetEnv("DSL_INTERFACE_STATUS", "TRAINING") == DSL_SUCCESS)
++ {
++ bExec = DSL_TRUE;
++ }
++ }
++ else if ( (nLineState == DSL_LINESTATE_SHOWTIME_TC_SYNC) &&
+ (g_nPrevLineState[nDevice] != DSL_LINESTATE_SHOWTIME_TC_SYNC) )
+ {
+ if (DSL_CPE_SetEnv("DSL_INTERFACE_STATUS", "UP") == DSL_SUCCESS)