aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac802154
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2022-05-19 17:05:08 +0200
committerStefan Schmidt <stefan@datenfreihafen.org>2022-06-10 09:48:40 +0200
commitd08d951a9ae7e30fc0421a1af2b4193ce4aa6b3e (patch)
tree8d43231db0fcc41c5e89170b5256c92bbd9fef21 /net/mac802154
parent983a974b40f66d202b075ab8ac584c698a3fc141 (diff)
downloadlinux-d08d951a9ae7e30fc0421a1af2b4193ce4aa6b3e.tar.gz
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: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Alexander Aring <aahringo@redhat.com> Link: https://lore.kernel.org/r/20220519150516.443078-4-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Diffstat (limited to 'net/mac802154')
-rw-r--r--net/mac802154/tx.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c
index a01689ddd5470..4a46ce8d2ac83 100644
--- a/net/mac802154/tx.c
+++ b/net/mac802154/tx.c
@@ -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;
}