@@ -1765,17 +1765,19 @@ static int ca8210_async_xmit_complete(
priv->nextmsduhandle++;
if (status) {
+ bool ifs_handling =
+ status == MAC_TRANSACTION_OVERFLOW ? true : false;
+
dev_err(
&priv->spi->dev,
"Link transmission unsuccessful, status = %d\n",
status
);
- if (status != MAC_TRANSACTION_OVERFLOW) {
- ieee802154_wake_queue(priv->hw);
- dev_kfree_skb_any(atusb->tx_skb);
- return 0;
- }
+
+ ieee802154_xmit_error(priv->hw, priv->tx_skb, ifs_handling);
+ return 0;
}
+
ieee802154_xmit_complete(priv->hw, priv->tx_skb, true);
return 0;
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> --- drivers/net/ieee802154/ca8210.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)