[PATCH wpan-next 07/12] mac802154: tx: fix error handling on xmit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If error occur we should call kfree_skb instead of dev_kfree_skb or
consume_skb.

Signed-off-by: Alexander Aring <alex.aring@xxxxxxxxx>
---
 net/mac802154/tx.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c
index 5dc32dd..cae6fb5 100644
--- a/net/mac802154/tx.c
+++ b/net/mac802154/tx.c
@@ -54,8 +54,12 @@ static void mac802154_xmit_worker(struct work_struct *work)
 	int res;
 
 	res = drv_xmit(local, skb);
-	if (res)
+	if (res) {
 		pr_debug("transmission failed\n");
+		ieee802154_wake_queue(&local->hw);
+		kfree_skb(skb);
+		return;
+	}
 
 	/* Restart the netif queue on each sub_if_data object. */
 	ieee802154_xmit_complete(&local->hw, skb);
-- 
2.0.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux