aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac802154
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-10-26 04:37:07 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-10-26 12:24:04 -0400
commitcdb66beaa0da7d326069b10bef090645d61d813f (patch)
treef1bdaa5cffc17bb476b31d2d1de87147141829ab /net/mac802154
parent18d60a0d49ef3eb2d31f65cf5b652702d9c6e710 (diff)
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 <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/mac802154')
-rw-r--r--net/mac802154/tx.c12
1 files 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)
51 int res; 51 int res;
52 52
53 res = local->ops->xmit(&local->hw, skb); 53 res = local->ops->xmit(&local->hw, skb);
54 if (res) 54 if (res) {
55 pr_debug("transmission failed\n"); 55 pr_debug("transmission failed\n");
56 56 /* Restart the netif queue on each sub_if_data object. */
57 /* Restart the netif queue on each sub_if_data object. */ 57 ieee802154_wake_queue(&local->hw);
58 ieee802154_xmit_complete(&local->hw, skb); 58 kfree_skb(skb);
59 } else {
60 /* Restart the netif queue on each sub_if_data object. */
61 ieee802154_xmit_complete(&local->hw, skb);
62 }
59} 63}
60 64
61static netdev_tx_t 65static netdev_tx_t