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(-fw): Makefile clean-up and fixes 2020-04-24 17:59:22 +02:00
ltq-adsl-mei kernel: drop outdated kernel version switches for local code 2020-05-17 18:35:51 +02:00
ltq-atm ltq-atm/ltq-ptm: avoid unnecessary build dependencies 2022-05-04 01:38:04 +01:00
ltq-deu ltq-deu: disable arc4 algorithm 2022-01-06 00:23:15 +01:00
ltq-ifxos ltq-ifxos: update to 1.7.1 2022-01-08 00:49:59 +01:00
ltq-ptm ltq-atm/ltq-ptm: avoid unnecessary build dependencies 2022-05-04 01:38:04 +01:00
ltq-tapi lantiq: ltq-tapi: add kernel 5.10 compatiblity 2021-04-12 23:23:09 +02:00
ltq-vdsl ltq-vdsl/ltq-adsl: fix elapsed time calculation 2022-05-04 01:38:04 +01:00
ltq-vdsl-fw ltq-vdsl-fw: update w921v firmware download URL 2021-11-15 15:18:03 +00:00
ltq-vdsl-mei ltq-vdsl-mei: add locking to interrupt handler 2022-03-21 12:28:37 +00:00
ltq-vectoring ltq-vectoring: add driver 2022-03-21 12:28:26 +00:00
ltq-vmmc kernel: lantiq: fix Module.symvers handling 2021-02-18 08:43:08 +01:00