msm8916-openwrt/package/kernel/lantiq/ltq-vdsl-vr9/patches/210-fix-us-eftrmin.patch
Jan Hoffmann 723963543a ltq-vdsl-vr9: fix upstream MINEFTR
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@3e8.eu>
2023-02-03 13:33:36 +01:00

23 lines
615 B
Diff

--- 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