From 17049cf4cecc9ce37e52b176f87c512b07db1446 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 22 Apr 2010 15:39:31 +0000 Subject: mac80211: update to wireless-testing 2010-04-21 SVN-Revision: 21089 --- .../patches/560-ath9k_tx_buf_return_cleanup.patch | 114 --------------------- 1 file changed, 114 deletions(-) delete mode 100644 package/mac80211/patches/560-ath9k_tx_buf_return_cleanup.patch (limited to 'package/mac80211/patches/560-ath9k_tx_buf_return_cleanup.patch') diff --git a/package/mac80211/patches/560-ath9k_tx_buf_return_cleanup.patch b/package/mac80211/patches/560-ath9k_tx_buf_return_cleanup.patch deleted file mode 100644 index a2ccf23e7c..0000000000 --- a/package/mac80211/patches/560-ath9k_tx_buf_return_cleanup.patch +++ /dev/null @@ -1,114 +0,0 @@ ---- a/drivers/net/wireless/ath/ath9k/xmit.c -+++ b/drivers/net/wireless/ath/ath9k/xmit.c -@@ -261,19 +261,40 @@ static void ath_tx_set_retry(struct ath_ - hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_RETRY); - } - --static struct ath_buf* ath_clone_txbuf(struct ath_softc *sc, struct ath_buf *bf) -+static struct ath_buf *ath_tx_get_buffer(struct ath_softc *sc) - { -- struct ath_buf *tbf; -+ struct ath_buf *bf = NULL; - - spin_lock_bh(&sc->tx.txbuflock); -- if (WARN_ON(list_empty(&sc->tx.txbuf))) { -+ -+ if (unlikely(list_empty(&sc->tx.txbuf))) { - spin_unlock_bh(&sc->tx.txbuflock); - return NULL; - } -- tbf = list_first_entry(&sc->tx.txbuf, struct ath_buf, list); -- list_del(&tbf->list); -+ -+ bf = list_first_entry(&sc->tx.txbuf, struct ath_buf, list); -+ list_del(&bf->list); -+ - spin_unlock_bh(&sc->tx.txbuflock); - -+ return bf; -+} -+ -+static void ath_tx_return_buffer(struct ath_softc *sc, struct ath_buf *bf) -+{ -+ spin_lock_bh(&sc->tx.txbuflock); -+ list_add_tail(&bf->list, &sc->tx.txbuf); -+ spin_unlock_bh(&sc->tx.txbuflock); -+} -+ -+static struct ath_buf* ath_clone_txbuf(struct ath_softc *sc, struct ath_buf *bf) -+{ -+ struct ath_buf *tbf; -+ -+ tbf = ath_tx_get_buffer(sc); -+ if (WARN_ON(!tbf)) -+ return NULL; -+ - ATH_TXBUF_RESET(tbf); - - tbf->aphy = bf->aphy; -@@ -1081,9 +1102,7 @@ void ath_draintxq(struct ath_softc *sc, - list_del(&bf->list); - spin_unlock_bh(&txq->axq_lock); - -- spin_lock_bh(&sc->tx.txbuflock); -- list_add_tail(&bf->list, &sc->tx.txbuf); -- spin_unlock_bh(&sc->tx.txbuflock); -+ ath_tx_return_buffer(sc, bf); - continue; - } - } -@@ -1325,25 +1344,6 @@ static void ath_tx_txqaddbuf(struct ath_ - txq->axq_depth++; - } - --static struct ath_buf *ath_tx_get_buffer(struct ath_softc *sc) --{ -- struct ath_buf *bf = NULL; -- -- spin_lock_bh(&sc->tx.txbuflock); -- -- if (unlikely(list_empty(&sc->tx.txbuf))) { -- spin_unlock_bh(&sc->tx.txbuflock); -- return NULL; -- } -- -- bf = list_first_entry(&sc->tx.txbuf, struct ath_buf, list); -- list_del(&bf->list); -- -- spin_unlock_bh(&sc->tx.txbuflock); -- -- return bf; --} -- - static void ath_tx_send_ampdu(struct ath_softc *sc, struct ath_atx_tid *tid, - struct list_head *bf_head, - struct ath_tx_control *txctl) -@@ -1825,9 +1825,7 @@ int ath_tx_start(struct ieee80211_hw *hw - } - spin_unlock_bh(&txq->axq_lock); - -- spin_lock_bh(&sc->tx.txbuflock); -- list_add_tail(&bf->list, &sc->tx.txbuf); -- spin_unlock_bh(&sc->tx.txbuflock); -+ ath_tx_return_buffer(sc, bf); - - return r; - } -@@ -2141,13 +2139,12 @@ static void ath_tx_processq(struct ath_s - txq->axq_depth--; - txok = !(ts.ts_status & ATH9K_TXERR_MASK); - txq->axq_tx_inprogress = false; -+ if (bf_held) -+ list_del(&bf_held->list); - spin_unlock_bh(&txq->axq_lock); - -- if (bf_held) { -- spin_lock_bh(&sc->tx.txbuflock); -- list_move_tail(&bf_held->list, &sc->tx.txbuf); -- spin_unlock_bh(&sc->tx.txbuflock); -- } -+ if (bf_held) -+ ath_tx_return_buffer(sc, bf_held); - - if (!bf_isampdu(bf)) { - /* -- cgit v1.2.3