Commit e8aa6d52 authored by Vincent Stehlé's avatar Vincent Stehlé Committed by Jakub Kicinski

net: ethernet: mtk-star-emac: return ok when xmit drops

The ndo_start_xmit() method must return NETDEV_TX_OK if the DMA mapping
fails, after freeing the socket buffer.
Fix the mtk_star_netdev_start_xmit() function accordingly.

Fixes: 8c7bd5a4 ("net: ethernet: mtk-star-emac: new driver")
Signed-off-by: default avatarVincent Stehlé <vincent.stehle@laposte.net>
Acked-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Link: https://lore.kernel.org/r/20201112084833.21842-1-vincent.stehle@laposte.netSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 1922a46b
......@@ -1053,7 +1053,7 @@ static int mtk_star_netdev_start_xmit(struct sk_buff *skb,
err_drop_packet:
dev_kfree_skb(skb);
ndev->stats.tx_dropped++;
return NETDEV_TX_BUSY;
return NETDEV_TX_OK;
}
/* Returns the number of bytes sent or a negative number on the first
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment