Commit d08d951a authored by Miquel Raynal's avatar Miquel Raynal Committed by Stefan Schmidt

net: mac802154: Enhance the error path in the main tx helper

Before adding more logic in the error path, let's move the wake queue
call there, rename the default label and create an additional one.

There is no functional change.
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Acked-by: default avatarAlexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20220519150516.443078-4-miquel.raynal@bootlin.comSigned-off-by: default avatarStefan Schmidt <stefan@datenfreihafen.org>
parent 983a974b
......@@ -65,7 +65,7 @@ ieee802154_tx(struct ieee802154_local *local, struct sk_buff *skb)
consume_skb(skb);
skb = nskb;
} else {
goto err_tx;
goto err_free_skb;
}
}
......@@ -84,10 +84,8 @@ ieee802154_tx(struct ieee802154_local *local, struct sk_buff *skb)
unsigned int len = skb->len;
ret = drv_xmit_async(local, skb);
if (ret) {
ieee802154_wake_queue(&local->hw);
goto err_tx;
}
if (ret)
goto err_wake_netif_queue;
dev->stats.tx_packets++;
dev->stats.tx_bytes += len;
......@@ -98,7 +96,9 @@ ieee802154_tx(struct ieee802154_local *local, struct sk_buff *skb)
return NETDEV_TX_OK;
err_tx:
err_wake_netif_queue:
ieee802154_wake_queue(&local->hw);
err_free_skb:
kfree_skb(skb);
return NETDEV_TX_OK;
}
......
Markdown is supported
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