aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files-4.14/drivers
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2018-07-12 17:18:37 +0200
committerFelix Fietkau <nbd@nbd.name>2018-07-12 18:43:53 +0200
commit01df4a2565dd3d9bd7cd8e87ee72b6082369a7a1 (patch)
tree523665cd7ec529f5a0ef34ff7eb1dec172878e32 /target/linux/ramips/files-4.14/drivers
parent2eeb4b78c64a6541cf9f26d424a5520660f690bd (diff)
downloadupstream-01df4a2565dd3d9bd7cd8e87ee72b6082369a7a1.tar.gz
upstream-01df4a2565dd3d9bd7cd8e87ee72b6082369a7a1.tar.bz2
upstream-01df4a2565dd3d9bd7cd8e87ee72b6082369a7a1.zip
ramips: ethernet: use skb_free_frag to free fragments
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/ramips/files-4.14/drivers')
-rw-r--r--target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index e68ca204ed..8dcc17774b 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/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);
@@ -891,14 +891,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);