mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 08:21:14 +00:00
8f4b5fdd5f
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>
(cherry picked from commit
|
||
---|---|---|
.. | ||
020-not-leak-cflags.patch | ||
100-dsl_compat.patch | ||
110-fix_status_polling_loop.patch | ||
120-platform.patch | ||
130-linux3.8.patch | ||
140-linux_3.18.patch | ||
150-linux_5.9.patch | ||
200-fix-elapsed-time.patch |