0085-net-next-mediatek-dropped-rx-packets-are-not-being-c.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. From 98aac832925a99afee8722cdfd5a848dd6086b8f Mon Sep 17 00:00:00 2001
  2. From: John Crispin <john@phrozen.org>
  3. Date: Sat, 23 Apr 2016 09:28:25 +0200
  4. Subject: [PATCH 085/102] net-next: mediatek: dropped rx packets are not being
  5. counted properly
  6. There are 2 places inside mtk_poll_rx where rx_dropped is not being
  7. incremented properly. Fix this by adding the missing code to increment
  8. the counter.
  9. Signed-off-by: Sean Wang <keyhaede@gmail.com>
  10. Signed-off-by: John Crispin <john@phrozen.org>
  11. ---
  12. drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++
  13. 1 file changed, 2 insertions(+)
  14. --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
  15. +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
  16. @@ -841,6 +841,7 @@ static int mtk_poll_rx(struct napi_struc
  17. DMA_FROM_DEVICE);
  18. if (unlikely(dma_mapping_error(&netdev->dev, dma_addr))) {
  19. skb_free_frag(new_data);
  20. + netdev->stats.rx_dropped++;
  21. goto release_desc;
  22. }
  23. @@ -848,6 +849,7 @@ static int mtk_poll_rx(struct napi_struc
  24. skb = build_skb(data, ring->frag_size);
  25. if (unlikely(!skb)) {
  26. put_page(virt_to_head_page(new_data));
  27. + netdev->stats.rx_dropped++;
  28. goto release_desc;
  29. }
  30. skb_reserve(skb, NET_SKB_PAD + NET_IP_ALIGN);