1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-18 21:48:23 +02:00
openwrt/package/kernel/lantiq
Jan Hoffmann db4bf4b968 ltq-vdsl/ltq-adsl: fix elapsed time calculation
The driver maintains elapsed times by repeatedly accumulating the time
since the previous update in a loop. For the elapsed showtime time, the
time difference is truncated to seconds before adding it, leading to a
sizable error over time.

Move the truncation to before calculation of the time difference in
order to remove this error. Also maintain the total elapsed time in the
same way in full seconds, to prevent the unsigned 32-bit counter from
wrapping around after about 50 days.

Testing on a VR9 device shows that the reported line uptime now matches
the actual elapsed wall time. The ADSL variant is only compile-tested,
but it should also work as the relevant code is identical.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2022-05-04 01:38:04 +01:00
..
ltq-adsl ltq-vdsl/ltq-adsl: fix elapsed time calculation 2022-05-04 01:38:04 +01:00
ltq-adsl-fw
ltq-adsl-mei
ltq-atm
ltq-deu
ltq-ifxos
ltq-ptm
ltq-tapi
ltq-vdsl ltq-vdsl/ltq-adsl: fix elapsed time calculation 2022-05-04 01:38:04 +01:00
ltq-vdsl-fw
ltq-vdsl-mei
ltq-vectoring
ltq-vmmc