linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] ath9k: clean up block ack window handling
@ 2010-09-20 11:45 Felix Fietkau
  2010-09-20 11:45 ` [PATCH 2/5] ath9k: fix an aggregation start related race condition Felix Fietkau
  0 siblings, 1 reply; 9+ messages in thread
From: Felix Fietkau @ 2010-09-20 11:45 UTC (permalink / raw)
  To: linux-wireless; +Cc: linville, lrodriguez

There's no reason to keep pointers to pending tx buffers around, if they're
only used to keep track of which frames are still pending. Use a bitfield
instead.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
 drivers/net/wireless/ath/ath9k/ath9k.h |    2 +-
 drivers/net/wireless/ath/ath9k/xmit.c  |    8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 5fe570b..9fddd80 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -254,7 +254,7 @@ struct ath_atx_tid {
 	struct list_head buf_q;
 	struct ath_node *an;
 	struct ath_atx_ac *ac;
-	struct ath_buf *tx_buf[ATH_TID_MAX_BUFS];
+	unsigned long tx_buf[BITS_TO_LONGS(ATH_TID_MAX_BUFS)];
 	u16 seq_start;
 	u16 seq_next;
 	u16 baw_size;
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 457f076..5323a4d 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -168,9 +168,9 @@ static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
 	index  = ATH_BA_INDEX(tid->seq_start, seqno);
 	cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
 
-	tid->tx_buf[cindex] = NULL;
+	__clear_bit(cindex, tid->tx_buf);
 
-	while (tid->baw_head != tid->baw_tail && !tid->tx_buf[tid->baw_head]) {
+	while (tid->baw_head != tid->baw_tail && !test_bit(tid->baw_head, tid->tx_buf)) {
 		INCR(tid->seq_start, IEEE80211_SEQ_MAX);
 		INCR(tid->baw_head, ATH_TID_MAX_BUFS);
 	}
@@ -186,9 +186,7 @@ static void ath_tx_addto_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
 
 	index  = ATH_BA_INDEX(tid->seq_start, bf->bf_seqno);
 	cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
-
-	BUG_ON(tid->tx_buf[cindex] != NULL);
-	tid->tx_buf[cindex] = bf;
+	__set_bit(cindex, tid->tx_buf);
 
 	if (index >= ((tid->baw_tail - tid->baw_head) &
 		(ATH_TID_MAX_BUFS - 1))) {
-- 
1.7.2.2


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

end of thread, other threads:[~2010-09-20 17:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-20 11:45 [PATCH 1/5] ath9k: clean up block ack window handling Felix Fietkau
2010-09-20 11:45 ` [PATCH 2/5] ath9k: fix an aggregation start related race condition Felix Fietkau
2010-09-20 11:45   ` [PATCH 3/5] ath9k: clean up / fix aggregation session flush Felix Fietkau
2010-09-20 11:45     ` [PATCH 4/5] ath9k: move ath_tx_aggr_check() to the rate control module Felix Fietkau
2010-09-20 11:45       ` [PATCH 5/5] ath9k: make the driver specific rate control module optional Felix Fietkau
2010-09-20 14:19   ` [PATCH 2/5] ath9k: fix an aggregation start related race condition Luis R. Rodriguez
2010-09-20 14:29     ` Felix Fietkau
2010-09-20 14:35       ` Luis R. Rodriguez
2010-09-20 17:35   ` [PATCH v2 " Felix Fietkau

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).