mac80211: properly free TX skbs when monitor TX fails
authorJohannes Berg <johannes.berg@intel.com>
Tue, 24 Nov 2015 14:41:50 +0000 (15:41 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 4 Dec 2015 13:43:32 +0000 (14:43 +0100)
We need to free all skbs here, not just the one we peeked
from the list.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/tx.c

index bdc224d5053ae3478a01565754ec6942c2d197a6..3311ce0f3d6c2f9c93c075458159935c631d144d 100644 (file)
@@ -1431,7 +1431,7 @@ static bool __ieee80211_tx(struct ieee80211_local *local,
                        info->hw_queue =
                                vif->hw_queue[skb_get_queue_mapping(skb)];
                } else if (ieee80211_hw_check(&local->hw, QUEUE_CONTROL)) {
-                       dev_kfree_skb(skb);
+                       ieee80211_purge_tx_queue(&local->hw, skbs);
                        return true;
                } else
                        vif = NULL;