Skip to content

Commit

Permalink
net: mhi: Add rx_length_errors stat
Browse files Browse the repository at this point in the history
This can be used by proto when packet len is incorrect.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Loic Poulain authored and David S. Miller committed Feb 10, 2021
1 parent 77e8080 commit 84c55f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/mhi/mhi.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ struct mhi_net_stats {
u64_stats_t rx_bytes;
u64_stats_t rx_errors;
u64_stats_t rx_dropped;
u64_stats_t rx_length_errors;
u64_stats_t tx_packets;
u64_stats_t tx_bytes;
u64_stats_t tx_errors;
Expand Down
1 change: 1 addition & 0 deletions drivers/net/mhi/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ static void mhi_ndo_get_stats64(struct net_device *ndev,
stats->rx_bytes = u64_stats_read(&mhi_netdev->stats.rx_bytes);
stats->rx_errors = u64_stats_read(&mhi_netdev->stats.rx_errors);
stats->rx_dropped = u64_stats_read(&mhi_netdev->stats.rx_dropped);
stats->rx_length_errors = u64_stats_read(&mhi_netdev->stats.rx_length_errors);
} while (u64_stats_fetch_retry_irq(&mhi_netdev->stats.rx_syncp, start));

do {
Expand Down

0 comments on commit 84c55f1

Please sign in to comment.