Skip to contentSkip to conversation

mac80211: fix retransmit

PATCH New Johannes Berg 1 participant 1 message Dec 2, 2011 mac80211

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 mac80211: fix retransmit

From: Johannes Berg <[email protected]>

This fixes another regression from my "pass all fragments to driver at once" patches -- if the packet is being retransmitted then we don't go through all handlers, but we still need to move it to the skbs list, otherwise we run into the first warning in __ieee80211_tx() and leak the skb.

---
 net/mac80211/tx.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
net/mac80211/tx.c +4 -1
@@ -1326,8 +1326,11 @@ static int invoke_tx_handlers(struct iee
 	if (!(tx->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL))
 		CALL_TXH(ieee80211_tx_h_rate_ctrl);
 
-	if (unlikely(info->flags & IEEE80211_TX_INTFL_RETRANSMISSION))
+	if (unlikely(info->flags & IEEE80211_TX_INTFL_RETRANSMISSION)) {
+		__skb_queue_tail(&tx->skbs, tx->skb);
+		tx->skb = NULL;
 		goto txh_done;
+	}
 
 	CALL_TXH(ieee80211_tx_h_michael_mic_add);
 	CALL_TXH(ieee80211_tx_h_sequence);