]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: eth: Use right helper for SKB cleanup
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Sun, 24 May 2026 08:48:26 +0000 (10:48 +0200)
committerMarkus Stockhausen <markus.stockhausen@gmx.de>
Sat, 30 May 2026 06:50:00 +0000 (08:50 +0200)
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>
target/linux/realtek/files-6.18/drivers/net/ethernet/rtl838x_eth.c

index 017a59fdbea4be693e21d5bc5ceda694859d4a58..15f44b51532e6ba0873c6090b2825a42e1333dc4 100644 (file)
@@ -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);