linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: Ben Greear <greearb@candelatech.com>
Cc: linux-wireless@vger.kernel.org, ath9k-devel@venema.h4ckr.net
Subject: Re: [PATCH] ath9k:  Restart xmit logic in xmit watchdog.
Date: Sun, 09 Jan 2011 22:02:27 -0700	[thread overview]
Message-ID: <4D2A92E3.6010403@openwrt.org> (raw)
In-Reply-To: <4D2A8D74.80304@candelatech.com>

On 2011-01-09 9:39 PM, Ben Greear wrote:
> On 01/09/2011 10:19 AM, Felix Fietkau wrote:
>>  On 2011-01-09 12:46 AM, greearb@candelatech.com wrote:
>>>  diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
>>>  index d9a4144..1b3a62c 100644
>>>  --- a/drivers/net/wireless/ath/ath9k/xmit.c
>>>  +++ b/drivers/net/wireless/ath/ath9k/xmit.c
>>>  @@ -1988,19 +1988,30 @@ static void ath_tx_rc_status(struct ath_buf *bf, struct ath_tx_status *ts,
>>>  tx_info->status.rates[tx_rateindex].count = ts->ts_longretry + 1;
>>>  }
>>>
>>>  -static void ath_wake_mac80211_queue(struct ath_softc *sc, int qnum)
>>>  +/* Has no locking. */
>>>  +static void __ath_wake_mac80211_queue(struct ath_softc *sc, struct ath_txq *txq)
>>>  {
>>>  - struct ath_txq *txq;
>>>  -
>>>  - txq = sc->tx.txq_map[qnum];
>>>  - spin_lock_bh(&txq->axq_lock);
>>>  if (txq->stopped&&  txq->pending_frames<  ATH_MAX_QDEPTH) {
>>>  - if (ath_mac80211_start_queue(sc, qnum))
>>>  + if (ath_mac80211_start_queue(sc, txq->axq_qnum))
>>>  txq->stopped = 0;
>>>  }
>>>  +}
>>  This part is quite broken, I think you got confused with various types of queue numbers. txq->axq_qnum refers to the atheros hw queue index, whereas the qnum
>>  argument to this function refers to the mac80211 queue index (which is also the correct index for sc->tx.txq_map - not to be confused with the sc->tx.txq array).
>
> Yeah, I am confused on all of this.  Looks like I should add a member to the txq struct to
> record it's mac80211 index and use that instead?
How about just passing the proper qnum? You can get it from the skb 
queue mapping anyway.

> In the upstream code, is this correct?  It seems to me that it should always
> be waking 'txq' since it just completed a packet.  Why the check
> against txq_map?
>
> 		if (txq == sc->tx.txq_map[qnum])
> 			ath_wake_mac80211_queue(sc, qnum);
Things like CAB (or maybe UAPSD at some point), where a frame might go 
out through a queue other than the 4 WMM data queues.

- Felix

  reply	other threads:[~2011-01-10  5:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-09  7:46 [PATCH] ath9k: Restart xmit logic in xmit watchdog greearb
2011-01-09 18:19 ` Felix Fietkau
2011-01-10  4:39   ` Ben Greear
2011-01-10  5:02     ` Felix Fietkau [this message]
2011-01-10  5:08       ` Ben Greear

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=4D2A92E3.6010403@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=ath9k-devel@venema.h4ckr.net \
    --cc=greearb@candelatech.com \
    --cc=linux-wireless@vger.kernel.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).