net: stats: Fix RX time statistics update

The commit 8892406c1d ("kernel/sys_clock.h: Deprecate and convert
uses of old conversions") changed code to not use deprecated macro.
Unfortunately there was some changes done to RX stats update that were
missing from that commit. This commit fixes the issue and removes use
of the deprecated SYS_CLOCK_HW_CYCLES_TO_NS64() macro.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2019-12-17 13:30:45 +02:00 committed by Anas Nashif
parent 5a703c8d58
commit 5bbdf56769

View File

@ -342,7 +342,7 @@ static inline void net_stats_update_rx_time(struct net_if *iface,
u32_t diff = end_time - start_time;
UPDATE_STAT(iface, stats.rx_time.sum +=
SYS_CLOCK_HW_CYCLES_TO_NS64(diff) / NSEC_PER_USEC);
k_cyc_to_ns_floor64(diff) / 1000);
UPDATE_STAT(iface, stats.rx_time.count += 1);
}
#else