From patchwork Wed Jul 29 14:29:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Copeland X-Patchwork-Id: 38166 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6TEUQ6e029884 for ; Wed, 29 Jul 2009 14:30:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753301AbZG2OaH (ORCPT ); Wed, 29 Jul 2009 10:30:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753282AbZG2OaH (ORCPT ); Wed, 29 Jul 2009 10:30:07 -0400 Received: from mail.deathmatch.net ([72.66.92.28]:4888 "EHLO mail.deathmatch.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753229AbZG2OaG (ORCPT ); Wed, 29 Jul 2009 10:30:06 -0400 Received: from hash ([72.83.200.195]) (authenticated user bob@bobcopeland.com) by mail.deathmatch.net (using TLSv1/SSLv3 with cipher AES256-SHA (256 bits)); Wed, 29 Jul 2009 10:29:51 -0400 Received: from bob by hash with local (Exim 4.69) (envelope-from ) id 1MWA9R-0001tf-40; Wed, 29 Jul 2009 10:29:05 -0400 From: Bob Copeland To: linville@tuxdriver.com, jirislaby@gmail.com, mickflemm@gmail.com, lrodriguez@atheros.com Cc: linux-wireless@vger.kernel.org, ath5k-devel@venema.h4ckr.net, Bob Copeland Subject: [PATCH 2/2] ath5k: fix CAB queue operation Date: Wed, 29 Jul 2009 10:29:04 -0400 Message-Id: <1248877744-7273-2-git-send-email-me@bobcopeland.com> X-Mailer: git-send-email 1.5.4.1 In-Reply-To: <1248877744-7273-1-git-send-email-me@bobcopeland.com> References: <1248877744-7273-1-git-send-email-me@bobcopeland.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org We need to process tx descriptors for all queues (currently main tx queue and cabq) which may have triggered the TX completion interrupt. Otherwise, the queues can get stuck after sending a few frames. Also, the CAB queue does need to be DBA (DMA beacon alert) gated, as in ath9k and madwifi, instead of beacon sent gated or the CAB frames may not be sent at the right time. Signed-off-by: Bob Copeland --- drivers/net/wireless/ath/ath5k/base.c | 5 ++++- drivers/net/wireless/ath/ath5k/qcu.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 55ee976..3a1c156 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -2000,9 +2000,12 @@ ath5k_tx_processq(struct ath5k_softc *sc, struct ath5k_txq *txq) static void ath5k_tasklet_tx(unsigned long data) { + int i; struct ath5k_softc *sc = (void *)data; - ath5k_tx_processq(sc, sc->txq); + for (i=0; i < AR5K_NUM_TX_QUEUES; i++) + if (sc->txqs[i].setup && (sc->ah->ah_txq_isr & BIT(i))) + ath5k_tx_processq(sc, &sc->txqs[i]); } diff --git a/drivers/net/wireless/ath/ath5k/qcu.c b/drivers/net/wireless/ath/ath5k/qcu.c index 6d5aaf0..d7d5d11 100644 --- a/drivers/net/wireless/ath/ath5k/qcu.c +++ b/drivers/net/wireless/ath/ath5k/qcu.c @@ -409,7 +409,7 @@ int ath5k_hw_reset_tx_queue(struct ath5k_hw *ah, unsigned int queue) case AR5K_TX_QUEUE_CAB: AR5K_REG_ENABLE_BITS(ah, AR5K_QUEUE_MISC(queue), - AR5K_QCU_MISC_FRSHED_BCN_SENT_GT | + AR5K_QCU_MISC_FRSHED_DBA_GT | AR5K_QCU_MISC_CBREXP_DIS | AR5K_QCU_MISC_CBREXP_BCN_DIS);