[Cerowrt-devel] Fwd: [bug #442] ath9k queue hang

Felix Fietkau nbd at openwrt.org
Wed Apr 16 17:05:54 EDT 2014

On 2014-04-16 19:38, Dave Taht wrote:
> On Wed, Apr 16, 2014 at 10:25 AM, Robert Bradley
> <robert.bradley1 at gmail.com> wrote:
>> On 16/04/2014 18:00, Dave Taht wrote:
>>> should I have said "de-protected"? in
>>> linux-3.14/drivers/net/wireless/ath/ath9k/xmit.c
>> <snip>
>>>         if (info->flags & IEEE80211_TX_CTL_PS_RESPONSE) {
>>>                 ath_txq_unlock(sc, txq);
>>>                 txq = sc->tx.uapsdq;
>>> ^^^^^^
>>>                 ath_txq_lock(sc, txq);
>>>         } else if (txctl->an &&
>> Isn't the point here that you're potentially switching txq and so need
>> to unlock the old one and then lock the new one?
> But it's happening after incrementing the old one and potentially stopping it...
> My take on this bit of code is that it needs to happen before the increment
> and potental stop, and it should validate the value of tx.uapsdq.
> but I am by no means the expert here! Felix is da man....
The txq switching handling wrt. pending_frames is correct. Since the
uapsd queue is used for powersave responses (both from the drv_tx
codepath and internal buffering), it is much better to credit these
packets to the queue that similar frames are normally meant to be
transmitted on. This is the txq before the switch.

To make that work, ath_txq_skb_done has an explicit check for the uapsd

- Felix

More information about the Cerowrt-devel mailing list