提交 cdb66bea 编写于 作者: A Alexander Aring 提交者: Marcel Holtmann

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: NAlexander Aring <alex.aring@gmail.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 18d60a0d
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册