linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 1/2] ath9k: use ieee80211_free_txskb
@ 2012-02-27 16:10 Christian Lamparter
  2012-02-27 16:32 ` [RFC 2/2] ath9k_htc: " Christian Lamparter
  2012-03-01  5:39 ` [RFC 1/2] ath9k: " Mohammed Shafi Shajakhan
  0 siblings, 2 replies; 10+ messages in thread
From: Christian Lamparter @ 2012-02-27 16:10 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath9k-devel, senthilb, vthiagar, mohammed, mcgrof

With the new tx status API: "mac80211: implement wifi TX status"
All skb originating from mac80211 needs to be given back to mac80211.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
---
It's high time we change all calls in the tx-path from
dev_kfree_skb into ieee80211_free_txskb.

The call in ath9k_tx is straightforward, but the one in
ath_tx_setup_buffer gives me headaches. I'm not sure if
we even need to check bf->bf_state.bfs_paprd at this
stage since ath_tx_start_dma sets bf->bf_state.bfs_paprd
"after" calling ath_tx_setup_buffer?!

Regards,
	Chr
---
 drivers/net/wireless/ath/ath9k/main.c |    2 +-
 drivers/net/wireless/ath/ath9k/xmit.c |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index c81304d..4471ed9 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1162,7 +1162,7 @@ static void ath9k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 
 	return;
 exit:
-	dev_kfree_skb_any(skb);
+	ieee80211_free_txskb(sc->hw, skb);
 }
 
 static void ath9k_stop(struct ieee80211_hw *hw)
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 3182408..0dadbc3 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1858,7 +1858,11 @@ static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc,
 	return bf;
 
 error:
-	dev_kfree_skb_any(skb);
+
+	if (bf->bf_state.bfs_paprd)
+		dev_kfree_skb_any(skb);
+	else
+		ieee80211_free_txskb(sc->hw, skb);
 	return NULL;
 }
 
-- 
1.7.9.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-03-06  5:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-27 16:10 [RFC 1/2] ath9k: use ieee80211_free_txskb Christian Lamparter
2012-02-27 16:32 ` [RFC 2/2] ath9k_htc: " Christian Lamparter
2012-03-01 13:58   ` Mohammed Shafi Shajakhan
2012-03-01  5:39 ` [RFC 1/2] ath9k: " Mohammed Shafi Shajakhan
2012-03-01 11:42   ` Mohammed Shafi Shajakhan
2012-03-01 13:46     ` Mohammed Shafi Shajakhan
2012-03-05 15:00       ` Mohammed Shafi Shajakhan
2012-03-05 15:01       ` Mohammed Shafi Shajakhan
2012-03-05 18:43         ` Christian Lamparter
2012-03-06  5:06           ` Mohammed Shafi Shajakhan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).