net: ieee802154: ca8210: Call _xmit_error() when a transmission fails
authorMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 7 Apr 2022 10:09:03 +0000 (12:09 +0200)
committerStefan Schmidt <stefan@datenfreihafen.org>
Mon, 25 Apr 2022 18:52:22 +0000 (20:52 +0200)
ieee802154_xmit_error() is the right helper to call when a transmission
has failed. Let's use it instead of open-coding it.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20220407100903.1695973-11-miquel.raynal@bootlin.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
drivers/net/ieee802154/ca8210.c

index 116aece..3c00310 100644 (file)
@@ -1729,8 +1729,7 @@ static int ca8210_async_xmit_complete(
                        status
                );
                if (status != IEEE802154_TRANSACTION_OVERFLOW) {
-                       dev_kfree_skb_any(priv->tx_skb);
-                       ieee802154_wake_queue(priv->hw);
+                       ieee802154_xmit_error(priv->hw, priv->tx_skb, status);
                        return 0;
                }
        }