Skip to content

Commit

Permalink
net: ethernet: mtk-star-emac: return ok when xmit drops
Browse files Browse the repository at this point in the history
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: 8c7bd5a ("net: ethernet: mtk-star-emac: new driver")
Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Acked-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Link: https://lore.kernel.org/r/20201112084833.21842-1-vincent.stehle@laposte.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Vincent Stehlé authored and Jakub Kicinski committed Nov 13, 2020
1 parent 1922a46 commit e8aa6d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mediatek/mtk_star_emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e8aa6d5

Please sign in to comment.