mirror of
https://github.com/openwrt/openwrt.git
synced 2026-06-17 17:01:44 +04:00
realtek: eth: Use right helper for SKB cleanup
There are two helpers to cleanup SKBs that call iternally dev_kfree_skb_any_reason() but with different error codes. - dev_kfree_skb_any() reason SKB_DROP_REASON_NOT_SPECIFIED - dev_consume_skb_any() reason SKB_CONSUMED The driver does not distinct between the two. Change this and clean up a SKB that was handed over to the hardware with dev_consume_skb_any(). This way kernel knows that everything went well. Link: https://github.com/openwrt/openwrt/pull/23483 Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
This commit is contained in:
@@ -966,7 +966,7 @@ static int rteth_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
if (likely(packet->skb)) {
|
||||
/* cleanup old data of this slot */
|
||||
dma_unmap_single(&ctrl->pdev->dev, packet->dma, packet->skb->len, DMA_TO_DEVICE);
|
||||
dev_kfree_skb_any(packet->skb);
|
||||
dev_consume_skb_any(packet->skb);
|
||||
}
|
||||
|
||||
packet->dma = dma_map_single(&ctrl->pdev->dev, skb->data, len, DMA_TO_DEVICE);
|
||||
|
||||
Reference in New Issue
Block a user