linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gabor Juhos <juhosg@openwrt.org>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com,
	Gabor Juhos <juhosg@openwrt.org>
Subject: [PATCH 04/13] rt2x00: rt2x00queue: setup queue->threshold from queue->limit
Date: Tue,  4 Jun 2013 13:40:41 +0200	[thread overview]
Message-ID: <1370346050-7047-5-git-send-email-juhosg@openwrt.org> (raw)
In-Reply-To: <1370346050-7047-1-git-send-email-juhosg@openwrt.org>

Use the queue->limit value instead of the
qdesc->entry_num to compute the threshold.
The two source values are the same and the
data queue descriptor structure will be
removed by a later patch.

Also separate the computation from the rest
of the init code to make further changes
easier.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
---
 drivers/net/wireless/rt2x00/rt2x00queue.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index c12d1c8..3ae2264 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -1323,11 +1323,12 @@ static void rt2x00queue_init(struct rt2x00_dev *rt2x00dev,
 	BUG_ON(!qdesc);
 
 	queue->limit = qdesc->entry_num;
-	queue->threshold = DIV_ROUND_UP(qdesc->entry_num, 10);
 	queue->data_size = qdesc->data_size;
 	queue->desc_size = qdesc->desc_size;
 	queue->winfo_size = qdesc->winfo_size;
 	queue->priv_size = qdesc->priv_size;
+
+	queue->threshold = DIV_ROUND_UP(queue->limit, 10);
 }
 
 int rt2x00queue_allocate(struct rt2x00_dev *rt2x00dev)
-- 
1.7.10


  parent reply	other threads:[~2013-06-04 11:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-04 11:40 [PATCH 00/13] rt2x00: get rid of static data queue descriptors Gabor Juhos
2013-06-04 11:40 ` [PATCH 01/13] rt2x00: rt2x00queue: add priv_size field to struct data_queue Gabor Juhos
2013-06-04 11:40 ` [PATCH 02/13] rt2x00: rt2x00queue: remove qdesc parameter of rt2x00queue_alloc_entries Gabor Juhos
2013-06-04 11:40 ` [PATCH 03/13] rt2x00: rt2x00dev: use rt2x00dev->bcn->limit Gabor Juhos
2013-06-04 11:40 ` Gabor Juhos [this message]
2013-06-04 11:40 ` [PATCH 05/13] rt2x00: add queue_init callback to rt2x00_ops Gabor Juhos
2013-06-04 11:40 ` [PATCH 06/13] rt2x00: rt2800usb: implement queue_init callback Gabor Juhos
2013-06-04 11:40 ` [PATCH 07/13] rt2x00: rt2800pci: " Gabor Juhos
2013-06-04 11:40 ` [PATCH 08/13] rt2x00: rt73usb: " Gabor Juhos
2013-06-04 11:40 ` [PATCH 09/13] rt2x00: rt2400pci: " Gabor Juhos
2013-06-04 11:40 ` [PATCH 10/13] rt2x00: rt2500pci: " Gabor Juhos
2013-06-04 11:40 ` [PATCH 11/13] rt2x00: rt61pci: " Gabor Juhos
2013-06-04 11:40 ` [PATCH 12/13] rt2x00: rt2500usb: " Gabor Juhos
2013-06-04 11:40 ` [PATCH 13/13] rt2x00: remove data_queue_desc struct Gabor Juhos
2013-06-04 13:57 ` [PATCH 00/13] rt2x00: get rid of static data queue descriptors Stanislaw Gruszka
2013-06-11 18:29   ` Gertjan van Wingerde

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=1370346050-7047-5-git-send-email-juhosg@openwrt.org \
    --to=juhosg@openwrt.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=users@rt2x00.serialmonkey.com \
    /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).