From patchwork Thu Mar 3 18:46:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivo van Doorn X-Patchwork-Id: 607041 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p23Imj2u021009 for ; Thu, 3 Mar 2011 18:49:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932294Ab1CCStT (ORCPT ); Thu, 3 Mar 2011 13:49:19 -0500 Received: from mail-wy0-f174.google.com ([74.125.82.174]:35605 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932263Ab1CCStQ (ORCPT ); Thu, 3 Mar 2011 13:49:16 -0500 Received: by mail-wy0-f174.google.com with SMTP id 36so1356532wyg.19 for ; Thu, 03 Mar 2011 10:49:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id; bh=ps9g6JH5+ihSBvu9FkC9Anuaofl71YdZQs+81on2XjA=; b=ewrGdZ3KMy/qzSc4Is4EOw4kh7tUq2s69uS4uvIPAU1z8hoP53/Qzp5FqfUN6pOG2e xVoQGoqjOlUdcVWCysCD9HwqCdiP0hc1tgnPN+cQuTsjU6ASyB4r2SSz4c/E036FMEUn YdvV4U2DUU29PBc2am+6ObxpjHQdUSTrq/t8Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=QS+tPs0d7QvHcdVwWmg/QQninLJWHXXdaTorA6bvFj9GtyKkv2x72mS8YW5mUpmxUh eWL938bPjlQncFN2SKCL96qr118mD9dburOz3bJmr8jgFwUslNVEYEj94Xrp6da2Ba/l ZLgrpaJhaohy3JwudF1VRIOf3bIf9oq5X5epc= Received: by 10.216.150.195 with SMTP id z45mr1251102wej.8.1299178155622; Thu, 03 Mar 2011 10:49:15 -0800 (PST) Received: from localhost.localdomain (g121037.upc-g.chello.nl [80.57.121.37]) by mx.google.com with ESMTPS id j49sm738659wer.14.2011.03.03.10.49.13 (version=SSLv3 cipher=OTHER); Thu, 03 Mar 2011 10:49:14 -0800 (PST) From: Ivo van Doorn To: "John W. Linville" Subject: [PATCH 17/19] rt2x00: Include ATIM queue support in rt2x00queue_get_tx_queue. Date: Thu, 3 Mar 2011 19:46:29 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.32.26-175.fc12.x86_64; KDE/4.4.5; x86_64; ; ) Cc: linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com References: <201103031938.56423.IvDoorn@gmail.com> <201103031945.40473.IvDoorn@gmail.com> <201103031946.09972.IvDoorn@gmail.com> In-Reply-To: <201103031946.09972.IvDoorn@gmail.com> MIME-Version: 1.0 Message-Id: <201103031946.30487.IvDoorn@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 03 Mar 2011 18:49:21 +0000 (UTC) diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index d78d39e..329f328 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c @@ -1278,7 +1278,7 @@ static void rt2400pci_fill_rxdone(struct queue_entry *entry, static void rt2400pci_txdone(struct rt2x00_dev *rt2x00dev, const enum data_queue_qid queue_idx) { - struct data_queue *queue = rt2x00queue_get_queue(rt2x00dev, queue_idx); + struct data_queue *queue = rt2x00queue_get_tx_queue(rt2x00dev, queue_idx); struct queue_entry_priv_pci *entry_priv; struct queue_entry *entry; struct txdone_entry_desc txdesc; diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index 3fb0915..5cd6575 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c @@ -1410,7 +1410,7 @@ static void rt2500pci_fill_rxdone(struct queue_entry *entry, static void rt2500pci_txdone(struct rt2x00_dev *rt2x00dev, const enum data_queue_qid queue_idx) { - struct data_queue *queue = rt2x00queue_get_queue(rt2x00dev, queue_idx); + struct data_queue *queue = rt2x00queue_get_tx_queue(rt2x00dev, queue_idx); struct queue_entry_priv_pci *entry_priv; struct queue_entry *entry; struct txdone_entry_desc txdesc; diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 89a0b45..72f8ebf 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h @@ -1076,6 +1076,9 @@ rt2x00queue_get_tx_queue(struct rt2x00_dev *rt2x00dev, if (queue < rt2x00dev->ops->tx_queues && rt2x00dev->tx) return &rt2x00dev->tx[queue]; + if (queue == QID_ATIM) + return rt2x00dev->atim; + return NULL; } diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 67c99c3..7f58767 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c @@ -116,13 +116,13 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) goto exit_fail; /* - * Determine which queue to put packet on. + * Use the ATIM queue if appropriate and present. */ if (tx_info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM && test_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags)) - queue = rt2x00queue_get_queue(rt2x00dev, QID_ATIM); - else - queue = rt2x00queue_get_tx_queue(rt2x00dev, qid); + qid = QID_ATIM; + + queue = rt2x00queue_get_tx_queue(rt2x00dev, qid); if (unlikely(!queue)) { ERROR(rt2x00dev, "Attempt to send packet over invalid queue %d.\n"