From cdb66beaa0da7d326069b10bef090645d61d813f Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Sun, 26 Oct 2014 09:37:07 +0100 Subject: 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: Alexander Aring Signed-off-by: Marcel Holtmann --- net/mac802154/tx.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c index 8e2f429a4546..23139cae0764 100644 --- a/net/mac802154/tx.c +++ b/net/mac802154/tx.c @@ -51,11 +51,15 @@ 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_xmit_complete(&local->hw, skb); + /* 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 -- cgit v1.2.3