diff mbox series

[v3,19/41] net: ieee802154: ca8210: Call the complete helper when a transmission is over

Message ID 20220117115440.60296-20-miquel.raynal@bootlin.com
State New
Headers show
Series IEEE 802.15.4 scan support | expand

Commit Message

Miquel Raynal Jan. 17, 2022, 11:54 a.m. UTC
ieee802154_xmit_complete() is the right helper to call when a
transmission is over. The fact that it completed or not is not really a
question, but drivers must tell the core that the completion is over,
even if it was canceled. Do not call ieee802154_wake_queue() manually,
in order to let full control of this task to the core.

Here the two paths are equivalent of calling *_xmit_complete() with its
ifs_handling parameter set to true or false, so let's use it instead of
open coding it.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 drivers/net/ieee802154/ca8210.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
index d3a9e4fe05f4..374827f51dff 100644
--- a/drivers/net/ieee802154/ca8210.c
+++ b/drivers/net/ieee802154/ca8210.c
@@ -1750,6 +1750,7 @@  static int ca8210_async_xmit_complete(
 	u8                     status)
 {
 	struct ca8210_priv *priv = hw->priv;
+	bool ifs_handling = true;
 
 	if (priv->nextmsduhandle != msduhandle) {
 		dev_err(
@@ -1770,10 +1771,8 @@  static int ca8210_async_xmit_complete(
 			"Link transmission unsuccessful, status = %d\n",
 			status
 		);
-		if (status != MAC_TRANSACTION_OVERFLOW) {
-			ieee802154_wake_queue(priv->hw);
-			return 0;
-		}
+		if (status != MAC_TRANSACTION_OVERFLOW)
+			ifs_handling = false;
 	}
 	ieee802154_xmit_complete(priv->hw, priv->tx_skb, true);