Skip to content
Commit 121c6672 authored by Casper Andersson's avatar Casper Andersson Committed by David S. Miller
Browse files

net: microchip: sparx5: correctly free skb in xmit

consume_skb on transmitted, kfree_skb on dropped, do not free on
TX_BUSY.

Previously the xmit function could return -EBUSY without freeing, which
supposedly is interpreted as a drop. And was using kfree on successfully
transmitted packets.

sparx5_fdma_xmit and sparx5_inject returns error code, where -EBUSY
indicates TX_BUSY and any other error code indicates dropped.

Fixes: f3cad261

 ("net: sparx5: add hostmode with phylink support")
Signed-off-by: default avatarCasper Andersson <casper.casan@gmail.com>
Reviewed-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fbf33f5a
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