Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cdb66bea authored by Alexander Aring's avatar Alexander Aring Committed by Marcel Holtmann
Browse files

mac802154: tx: fix error handling while xmit



In case of an error we should call kfree_skb instead of consume_skb which
is called by ieee802154_xmit_complete function.

Signed-off-by: default avatarAlexander Aring <alex.aring@gmail.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 18d60a0d
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -51,12 +51,16 @@ static void mac802154_xmit_worker(struct work_struct *work)
	int res;

	res = local->ops->xmit(&local->hw, skb);
	if (res)
	if (res) {
		pr_debug("transmission failed\n");

		/* Restart the netif queue on each sub_if_data object. */
		ieee802154_wake_queue(&local->hw);
		kfree_skb(skb);
	} else {
		/* Restart the netif queue on each sub_if_data object. */
		ieee802154_xmit_complete(&local->hw, skb);
	}
}

static netdev_tx_t
mac802154_tx(struct ieee802154_local *local, struct sk_buff *skb)