Skip to content

Commit cdb66be

Browse files
alexaringholtmann
authored andcommitted
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 <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 18d60a0 commit cdb66be

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

net/mac802154/tx.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,15 @@ static void mac802154_xmit_worker(struct work_struct *work)
5151
int res;
5252

5353
res = local->ops->xmit(&local->hw, skb);
54-
if (res)
54+
if (res) {
5555
pr_debug("transmission failed\n");
56-
57-
/* Restart the netif queue on each sub_if_data object. */
58-
ieee802154_xmit_complete(&local->hw, skb);
56+
/* Restart the netif queue on each sub_if_data object. */
57+
ieee802154_wake_queue(&local->hw);
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+
}
5963
}
6064

6165
static netdev_tx_t

0 commit comments

Comments
 (0)