[PATCH] ltq-vdsl-vr9: fix upstream MINEFTR

Jan Hoffmann jan at 3e8.eu
Sat Jan 28 11:29:22 PST 2023


The upstream value read from the device seems to already be in bits per
second, so there is no need to multiply by 1000 again (which for typical
values causes an overflow of the 32-bit unsigned integer).

Signed-off-by: Jan Hoffmann <jan at 3e8.eu>
---

This patch is already applied for ltq-vdsl-vr11. It is not relevant for
ltq-adsl, as G.INP in upstream direction is only supported for VDSl2.

I tested on my own DTAG VDSL2 line, and it works here (upstream MINEFTR
is now close to the upstream data rate).

 package/kernel/lantiq/ltq-vdsl-vr9/Makefile   |  2 +-
 .../patches/210-fix-us-eftrmin.patch          | 22 +++++++++++++++++++
 2 files changed, 23 insertions(+), 1 deletion(-)
 create mode 100644 package/kernel/lantiq/ltq-vdsl-vr9/patches/210-fix-us-eftrmin.patch

diff --git a/package/kernel/lantiq/ltq-vdsl-vr9/Makefile b/package/kernel/lantiq/ltq-vdsl-vr9/Makefile
index da924e861e61..ebcb935a739d 100644
--- a/package/kernel/lantiq/ltq-vdsl-vr9/Makefile
+++ b/package/kernel/lantiq/ltq-vdsl-vr9/Makefile
@@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=ltq-vdsl-vr9
 PKG_VERSION:=4.17.18.6
-PKG_RELEASE:=7
+PKG_RELEASE:=8
 
 PKG_BASE_NAME:=drv_dsl_cpe_api
 PKG_SOURCE:=$(PKG_BASE_NAME)_vrx-$(PKG_VERSION).tar.gz
diff --git a/package/kernel/lantiq/ltq-vdsl-vr9/patches/210-fix-us-eftrmin.patch b/package/kernel/lantiq/ltq-vdsl-vr9/patches/210-fix-us-eftrmin.patch
new file mode 100644
index 000000000000..51651f476a32
--- /dev/null
+++ b/package/kernel/lantiq/ltq-vdsl-vr9/patches/210-fix-us-eftrmin.patch
@@ -0,0 +1,22 @@
+--- a/src/pm/drv_dsl_cpe_api_pm_vrx.c
++++ b/src/pm/drv_dsl_cpe_api_pm_vrx.c
+@@ -1435,9 +1435,16 @@ DSL_Error_t DSL_DRV_PM_DEV_ReTxCountersG
+       /* ignore zero value*/
+       if (nEftrMin)
+       {
+-         /* Fw Format:  kBit/s */
+-         /* API format: bit/s */
+-         pCounters->nEftrMin = nEftrMin*1000;
++         if (nDirection == DSL_NEAR_END)
++         {
++            /* Fw Format:  kBit/s */
++            /* API format: bit/s */
++            pCounters->nEftrMin = nEftrMin*1000;
++         }
++         else
++         {
++            pCounters->nEftrMin = nEftrMin;
++         }
+       }
+    }
+    else
-- 
2.39.1




More information about the openwrt-devel mailing list