diff options
author | Felix Fietkau <nbd@nbd.name> | 2018-07-12 17:18:37 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2018-07-13 16:39:46 +0200 |
commit | 0e6cfb6919149267202c6dbaf9e5aab3ab6d6b1d (patch) | |
tree | 9e6f324dfc0467c83a617f9e47242872d2a119b8 | |
parent | 514a4b3e1b4e42fa796d1c908259ee9e215a77da (diff) | |
download | mtk-20170518-0e6cfb6919149267202c6dbaf9e5aab3ab6d6b1d.zip mtk-20170518-0e6cfb6919149267202c6dbaf9e5aab3ab6d6b1d.tar.gz mtk-20170518-0e6cfb6919149267202c6dbaf9e5aab3ab6d6b1d.tar.bz2 |
ramips: ethernet: use skb_free_frag to free fragments
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | target/linux/ramips/files-4.14/drivers/net/ethernet/mtk/mtk_eth_soc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mtk/mtk_eth_soc.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mtk/mtk_eth_soc.c index c806e28..8dde2b8 100644 --- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mtk/mtk_eth_soc.c +++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mtk/mtk_eth_soc.c @@ -230,7 +230,7 @@ static void fe_clean_rx(struct fe_priv *priv) ring->rx_dma[i].rxd1, ring->rx_buf_size, DMA_FROM_DEVICE); - put_page(virt_to_head_page(ring->rx_data[i])); + skb_free_frag(ring->rx_data[i]); } kfree(ring->rx_data); @@ -856,14 +856,14 @@ static int fe_poll_rx(struct napi_struct *napi, int budget, ring->rx_buf_size, DMA_FROM_DEVICE); if (unlikely(dma_mapping_error(&netdev->dev, dma_addr))) { - put_page(virt_to_head_page(new_data)); + skb_free_frag(new_data); goto release_desc; } /* receive data */ skb = build_skb(data, ring->frag_size); if (unlikely(!skb)) { - put_page(virt_to_head_page(new_data)); + skb_free_frag(new_data); goto release_desc; } skb_reserve(skb, NET_SKB_PAD + NET_IP_ALIGN); |