mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
18d60a0d49
commit
cdb66beaa0
1 changed files with 8 additions and 4 deletions
|
@ -51,11 +51,15 @@ static void mac802154_xmit_worker(struct work_struct *work)
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
res = local->ops->xmit(&local->hw, skb);
|
res = local->ops->xmit(&local->hw, skb);
|
||||||
if (res)
|
if (res) {
|
||||||
pr_debug("transmission failed\n");
|
pr_debug("transmission failed\n");
|
||||||
|
/* Restart the netif queue on each sub_if_data object. */
|
||||||
/* Restart the netif queue on each sub_if_data object. */
|
ieee802154_wake_queue(&local->hw);
|
||||||
ieee802154_xmit_complete(&local->hw, skb);
|
kfree_skb(skb);
|
||||||
|
} else {
|
||||||
|
/* Restart the netif queue on each sub_if_data object. */
|
||||||
|
ieee802154_xmit_complete(&local->hw, skb);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static netdev_tx_t
|
static netdev_tx_t
|
||||||
|
|
Loading…
Add table
Reference in a new issue