openwrt/package/kernel/lantiq/ltq-adsl/patches
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
..
020-not-leak-cflags.patch lantiq: ltq-adsl: Do not leak user space CFLAGS into kernel space 2018-03-03 12:58:55 +01:00
100-dsl_compat.patch ltq-adsl: fix compilation with Linux 5.0+ 2020-03-16 22:28:16 +01:00
110-fix_status_polling_loop.patch packages: clean up the package folder 2013-06-21 16:54:37 +00:00
120-platform.patch ltq-adsl: fix compilation with Linux 5.0+ 2020-03-16 22:28:16 +01:00
130-linux3.8.patch ltq-adsl: fix compilation with Linux 5.0+ 2020-03-16 22:28:16 +01:00
140-linux_3.18.patch lantiq: ltq-adsl: Do not leak user space CFLAGS into kernel space 2018-03-03 12:58:55 +01:00
150-linux_5.9.patch lantiq: ltq-adsl: add kernel 5.10 compatiblity 2021-04-12 23:23:09 +02:00
200-fix-elapsed-time.patch ltq-vdsl/ltq-adsl: fix elapsed time calculation 2022-05-04 01:38:04 +01:00