diff options
author | John Crispin <john@phrozen.org> | 2016-06-10 13:28:01 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-11 08:29:29 +0200 |
commit | 94321a9fc9f5b6c6e949cc7c69741538f556ab74 (patch) | |
tree | 3ebe879aa582845b72a7b750b5e1cf05df82642b /drivers/net | |
parent | net: mediatek: invalid buffer lookup in mtk_tx_map() (diff) | |
download | linux-94321a9fc9f5b6c6e949cc7c69741538f556ab74.tar.xz linux-94321a9fc9f5b6c6e949cc7c69741538f556ab74.zip |
net: mediatek: dropped rx packets are not being counted properly
There are two places inside mtk_poll_rx where rx_dropped is not being
incremented properly. Fix this by adding the missing code to increment
the counter.
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index 8c3e54387948..b6d3c217722d 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -829,6 +829,7 @@ static int mtk_poll_rx(struct napi_struct *napi, int budget, DMA_FROM_DEVICE); if (unlikely(dma_mapping_error(&netdev->dev, dma_addr))) { skb_free_frag(new_data); + netdev->stats.rx_dropped++; goto release_desc; } @@ -836,6 +837,7 @@ static int mtk_poll_rx(struct napi_struct *napi, int budget, skb = build_skb(data, ring->frag_size); if (unlikely(!skb)) { put_page(virt_to_head_page(new_data)); + netdev->stats.rx_dropped++; goto release_desc; } skb_reserve(skb, NET_SKB_PAD + NET_IP_ALIGN); |