summaryrefslogtreecommitdiffstats
path: root/drivers/net/mhi
diff options
context:
space:
mode:
authorLoic Poulain <loic.poulain@linaro.org>2021-02-09 10:05:57 +0100
committerDavid S. Miller <davem@davemloft.net>2021-02-10 15:11:51 -0800
commit84c55f16dcd74af5be525aa9c1878bfaec4e8a7a (patch)
tree44ca55a8928ce075863b9e2447c263a8ee4b1e7d /drivers/net/mhi
parent77e8080e12721c9206aa592aa34985c897ee1a32 (diff)
downloadlinux-84c55f16dcd74af5be525aa9c1878bfaec4e8a7a.tar.gz
linux-84c55f16dcd74af5be525aa9c1878bfaec4e8a7a.tar.bz2
linux-84c55f16dcd74af5be525aa9c1878bfaec4e8a7a.zip
net: mhi: Add rx_length_errors stat
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>
Diffstat (limited to 'drivers/net/mhi')
-rw-r--r--drivers/net/mhi/mhi.h1
-rw-r--r--drivers/net/mhi/net.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/mhi/mhi.h b/drivers/net/mhi/mhi.h
index 5050e4a220d0..82210e073000 100644
--- a/drivers/net/mhi/mhi.h
+++ b/drivers/net/mhi/mhi.h
@@ -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;
diff --git a/drivers/net/mhi/net.c b/drivers/net/mhi/net.c
index 58b4b7c096f7..44cbfb39e557 100644
--- a/drivers/net/mhi/net.c
+++ b/drivers/net/mhi/net.c
@@ -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 {