From: "John W. Linville" <linville@tuxdriver.com>
To: Felix Fietkau <nbd@openwrt.org>
Cc: linux-wireless@vger.kernel.org, lrodriguez@atheros.com
Subject: Re: [PATCH 1/2] ath9k: unify edma and non-edma tx code, improve tx fifo handling
Date: Wed, 18 May 2011 15:07:34 -0400 [thread overview]
Message-ID: <20110518190733.GA2543@tuxdriver.com> (raw)
In-Reply-To: <1305719964-44292-1-git-send-email-nbd@openwrt.org>
CC [M] drivers/net/wireless/ath/ath9k/xmit.o
drivers/net/wireless/ath/ath9k/xmit.c: In function ‘ath_tx_edma_tasklet’:
drivers/net/wireless/ath/ath9k/xmit.c:2199:18: warning: ‘txq’ may be used uninitialized in this function
Please don't add warnings, especially not valid ones... :-)
On Wed, May 18, 2011 at 01:59:23PM +0200, Felix Fietkau wrote:
> EDMA based chips (AR9380+) have 8 Tx FIFO slots, which are used to fix the
> tx queue start/stop race conditions which have to be worked around for
> earlier chips by keeping the last descriptor in the queue. The current code
> stores all frames that do not fit onto the 8 FIFO slots in a separate
> list. Whenever a FIFO slot is freed up, the next frame (or A-MPDU) from the
> pending queue gets moved to that slot.
>
> This process is not only inefficient, but also unnecessary. The code can
> be improved visibly by keeping the pending queue fully linked, and moving
> the contents of the entire queue to a FIFO slot as it becomes available.
>
> This patch makes the necessary changes for that and also merges some code
> that was duplicated for EDMA vs non-EDMA. It changes txq->axq_link to point
> to the last descriptor instead of the link pointer, so that
> ath9k_hw_set_desc_link can be used, which works on all chips.
>
> With this patch, a small performance increase for non-aggregated traffic
> was observed on AR9380 based embedded hardware.
>
> Signed-off-by: Felix Fietkau <nbd@openwrt.org>
> diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
> index 97dd1fa..2bfa843 100644
> --- a/drivers/net/wireless/ath/ath9k/xmit.c
> +++ b/drivers/net/wireless/ath/ath9k/xmit.c
> @@ -2237,17 +2193,17 @@ void ath_tx_tasklet(struct ath_softc *sc)
>
> void ath_tx_edma_tasklet(struct ath_softc *sc)
> {
> - struct ath_tx_status txs;
> + struct ath_tx_status ts;
> struct ath_common *common = ath9k_hw_common(sc->sc_ah);
> struct ath_hw *ah = sc->sc_ah;
> struct ath_txq *txq;
> struct ath_buf *bf, *lastbf;
> struct list_head bf_head;
> int status;
> - int txok;
>
> + spin_lock_bh(&txq->axq_lock);
> for (;;) {
> - status = ath9k_hw_txprocdesc(ah, NULL, (void *)&txs);
> + status = ath9k_hw_txprocdesc(ah, NULL, (void *)&ts);
> if (status == -EINPROGRESS)
> break;
> if (status == -EIO) {
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
next prev parent reply other threads:[~2011-05-18 19:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-18 11:59 [PATCH 1/2] ath9k: unify edma and non-edma tx code, improve tx fifo handling Felix Fietkau
2011-05-18 11:59 ` [PATCH 2/2] ath9k_hw: remove ath9k_hw_get_desc_link Felix Fietkau
2011-05-18 19:07 ` John W. Linville [this message]
2011-05-19 9:00 ` [PATCH 1/2] ath9k: unify edma and non-edma tx code, improve tx fifo handling Felix Fietkau
2011-05-19 14:12 ` Larry Finger
2011-05-19 14:18 ` John W. Linville
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110518190733.GA2543@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=linux-wireless@vger.kernel.org \
--cc=lrodriguez@atheros.com \
--cc=nbd@openwrt.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).