Skip to content

Commit

Permalink
mac802154: tx: fix error handling while xmit
Browse files Browse the repository at this point in the history
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 <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Alexander Aring authored and Marcel Holtmann committed Oct 26, 2014
1 parent 18d60a0 commit cdb66be
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions net/mac802154/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cdb66be

Please sign in to comment.