From: Felix Fietkau Date: Tue, 17 Aug 2010 13:24:33 +0000 (+0000) Subject: ath9k: remove an unnecessary BUG_ON in the aggregation code and clean up block ack... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1d1b83fa4c5a70423a403b2c52629db724de90aa;p=openwrt%2Fstaging%2Fblocktrron.git ath9k: remove an unnecessary BUG_ON in the aggregation code and clean up block ack window tracking to use less memory SVN-Revision: 22688 --- diff --git a/package/mac80211/patches/560-ath9k_baw_fix.patch b/package/mac80211/patches/560-ath9k_baw_fix.patch new file mode 100644 index 0000000000..50e4b99e45 --- /dev/null +++ b/package/mac80211/patches/560-ath9k_baw_fix.patch @@ -0,0 +1,36 @@ +--- 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; +--- 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 + 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_ + + 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))) {