aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-09-20 07:45:36 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-09-21 11:05:30 -0400
commit81ee13ba7ef8c9eaebe91ed06edb844ab6403d4e (patch)
tree97367274292719e8238296c3f0d26c4c56f38b4b /drivers/net/wireless/ath/ath9k
parent9ee82d541095cb64bf16a1f5d7573a8cddc125aa (diff)
ath9k: clean up block ack window handling
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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-rw-r--r--drivers/net/wireless/ath/ath9k/ath9k.h2
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c8
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 98b57e6c614e..79217c3c92e5 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 {
254 struct list_head buf_q; 254 struct list_head buf_q;
255 struct ath_node *an; 255 struct ath_node *an;
256 struct ath_atx_ac *ac; 256 struct ath_atx_ac *ac;
257 struct ath_buf *tx_buf[ATH_TID_MAX_BUFS]; 257 unsigned long tx_buf[BITS_TO_LONGS(ATH_TID_MAX_BUFS)];
258 u16 seq_start; 258 u16 seq_start;
259 u16 seq_next; 259 u16 seq_next;
260 u16 baw_size; 260 u16 baw_size;
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 457f07692ac7..5323a4d9ebb8 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,
168 index = ATH_BA_INDEX(tid->seq_start, seqno); 168 index = ATH_BA_INDEX(tid->seq_start, seqno);
169 cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1); 169 cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
170 170
171 tid->tx_buf[cindex] = NULL; 171 __clear_bit(cindex, tid->tx_buf);
172 172
173 while (tid->baw_head != tid->baw_tail && !tid->tx_buf[tid->baw_head]) { 173 while (tid->baw_head != tid->baw_tail && !test_bit(tid->baw_head, tid->tx_buf)) {
174 INCR(tid->seq_start, IEEE80211_SEQ_MAX); 174 INCR(tid->seq_start, IEEE80211_SEQ_MAX);
175 INCR(tid->baw_head, ATH_TID_MAX_BUFS); 175 INCR(tid->baw_head, ATH_TID_MAX_BUFS);
176 } 176 }
@@ -186,9 +186,7 @@ static void ath_tx_addto_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
186 186
187 index = ATH_BA_INDEX(tid->seq_start, bf->bf_seqno); 187 index = ATH_BA_INDEX(tid->seq_start, bf->bf_seqno);
188 cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1); 188 cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
189 189 __set_bit(cindex, tid->tx_buf);
190 BUG_ON(tid->tx_buf[cindex] != NULL);
191 tid->tx_buf[cindex] = bf;
192 190
193 if (index >= ((tid->baw_tail - tid->baw_head) & 191 if (index >= ((tid->baw_tail - tid->baw_head) &
194 (ATH_TID_MAX_BUFS - 1))) { 192 (ATH_TID_MAX_BUFS - 1))) {