net/iface: Add PM suspend state statistics
Counting how many times it went suspended, for how long on the last one and on overage. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
e5912b074a
commit
00926e3899
5 changed files with 82 additions and 0 deletions
|
@ -3636,6 +3636,8 @@ int net_if_suspend(struct net_if *iface)
|
|||
return -EALREADY;
|
||||
}
|
||||
|
||||
net_stats_add_suspend_start_time(iface, k_cycle_get_32());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -3647,6 +3649,8 @@ int net_if_resume(struct net_if *iface)
|
|||
|
||||
net_if_flag_clear(iface, NET_IF_SUSPENDED);
|
||||
|
||||
net_stats_add_suspend_end_time(iface, k_cycle_get_32());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue