Skip to content

Commit

Permalink
wl1271: Fix memory leak in firmware crash scenario
Browse files Browse the repository at this point in the history
The driver tx-queue flush operation leaks broadcast-frames. This leak occurs
if the driver is shut down while there are frames in TX buffers (such as in
a firmware crash scenario.) Fix the leak.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Mar 31, 2010
1 parent 64e29e4 commit cbf7f30
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/net/wireless/wl12xx/wl1271_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,10 @@ void wl1271_tx_flush(struct wl1271 *wl)

wl1271_debug(DEBUG_TX, "flushing skb 0x%p", skb);

if (!(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS))
continue;
if (!(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) {
kfree_skb(skb);
continue;
}

ieee80211_tx_status(wl->hw, skb);
}
Expand All @@ -437,8 +439,10 @@ void wl1271_tx_flush(struct wl1271 *wl)
skb = wl->tx_frames[i];
info = IEEE80211_SKB_CB(skb);

if (!(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS))
if (!(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) {
kfree_skb(skb);
continue;
}

ieee80211_tx_status(wl->hw, skb);
wl->tx_frames[i] = NULL;
Expand Down

0 comments on commit cbf7f30

Please sign in to comment.