can: fix initial calculation of total rx/tx rate in CAN statistics
Subsystems (2)
Oliver Hartkopp
maintainerPATCH 1/1 can: fix initial calculation of total rx/tx rate in CAN statistics
The total rx/tx rate (TXR and RXR) only start working after a statistic reset. This patch initializes the referenced timer value to provide proper values for the total rx/tx rate directly from the start.
Signed-off-by Oliver Hartkopp <[email protected]>
--- net/can/af_can.c | 1 + 1 file changed, 1 insertion(+)
net/can/af_can.c +1 -0
@@ -917,6 +917,7 @@ static __init int can_init(void)setup_timer (&can_stattimer, can_stat_update,0 );mod_timer (&can_stattimer,round_jiffies (jiffies +HZ )); } + can_stats.jiffies_init = jiffies;can_init_proc (); }
Signature · 1 line
2.8.1