aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorMohammed Shafi Shajakhan <mshajakhan@atheros.com>2011-01-31 02:55:29 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-02-01 11:06:00 -0500
commit479600777bb588724d044815415f7d708d06644b (patch)
tree52774b3948936662d0ee33effbc659364a40d87f /drivers/net/wireless
parent9b00b4157f7b3265de291ac8979a5f1611ce64ab (diff)
ath9k: Fix memory leak due to failed PAPRD frames
free the skb's when the Tx of PAPRD frames fails and also add a debug message indicating that. Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 568f7be2ec75..9040c2ff1909 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -325,6 +325,8 @@ static bool ath_paprd_send_frame(struct ath_softc *sc, struct sk_buff *skb, int
325{ 325{
326 struct ieee80211_hw *hw = sc->hw; 326 struct ieee80211_hw *hw = sc->hw;
327 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); 327 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
328 struct ath_hw *ah = sc->sc_ah;
329 struct ath_common *common = ath9k_hw_common(ah);
328 struct ath_tx_control txctl; 330 struct ath_tx_control txctl;
329 int time_left; 331 int time_left;
330 332
@@ -342,8 +344,12 @@ static bool ath_paprd_send_frame(struct ath_softc *sc, struct sk_buff *skb, int
342 init_completion(&sc->paprd_complete); 344 init_completion(&sc->paprd_complete);
343 sc->paprd_pending = true; 345 sc->paprd_pending = true;
344 txctl.paprd = BIT(chain); 346 txctl.paprd = BIT(chain);
345 if (ath_tx_start(hw, skb, &txctl) != 0) 347
348 if (ath_tx_start(hw, skb, &txctl) != 0) {
349 ath_dbg(common, ATH_DBG_XMIT, "PAPRD TX failed\n");
350 dev_kfree_skb_any(skb);
346 return false; 351 return false;
352 }
347 353
348 time_left = wait_for_completion_timeout(&sc->paprd_complete, 354 time_left = wait_for_completion_timeout(&sc->paprd_complete,
349 msecs_to_jiffies(ATH_PAPRD_TIMEOUT)); 355 msecs_to_jiffies(ATH_PAPRD_TIMEOUT));