From: Jakub Kicinski <moorray@wp.pl>
To: Gabor Juhos <juhosg@openwrt.org>
Cc: "John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com
Subject: Re: [rt2x00-users] [PATCH 1/7] rt2x00: rt2x00dev: use rt2x00dev->tx->limit
Date: Mon, 3 Jun 2013 19:09:59 +0200 [thread overview]
Message-ID: <20130603190959.70b1f4d2@north> (raw)
In-Reply-To: <1367421455-18463-2-git-send-email-juhosg@openwrt.org>
Hi Gabor!
On Wed, 1 May 2013 17:17:29 +0200, Gabor Juhos wrote:
> The TX data queue is initialized already when
> the rt2x00lib_probe_hw() function is called.
>
> Fetch the number of the queue entries from that
> instead of using the entry_num field of the data
> queue descriptor.
>
> The two values are the same, and the use of the
> rt2x00dev->tx->limit value allows us to get rid
> of a superfluous pointer dereference.
>
> Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
> ---
> drivers/net/wireless/rt2x00/rt2x00dev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
> index 90dc143..b287467 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00dev.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
> @@ -1077,7 +1077,7 @@ static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev)
> */
> int kfifo_size =
> roundup_pow_of_two(rt2x00dev->ops->tx_queues *
> - rt2x00dev->ops->tx->entry_num *
> + rt2x00dev->tx->limit *
> sizeof(u32));
>
> status = kfifo_alloc(&rt2x00dev->txstatus_fifo, kfifo_size,
Unfortunately this does not work without your "get rid of
static data queue descriptors" series as well.
queue->limit is set when rt2x00lib_start is called, not on
probe. kfifo_alloc will fail with EINVAL here. As a result
support for all rt2x00 devices is broken on wireless-testing.
Maybe you can just post the mentioned series for inclusion?
I have been running with it since you posted it as RFC and
I did not notice any problems so far...
-- kuba
next prev parent reply other threads:[~2013-06-03 17:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-01 15:17 [PATCH 0/7] rt2x00: avoid a few superfluous pointer dereferences Gabor Juhos
2013-05-01 15:17 ` [PATCH 1/7] rt2x00: rt2x00dev: use rt2x00dev->tx->limit Gabor Juhos
2013-05-01 20:05 ` Gertjan van Wingerde
2013-06-03 17:09 ` Jakub Kicinski [this message]
2013-06-03 20:32 ` [rt2x00-users] " Gabor Juhos
2013-05-01 15:17 ` [PATCH 2/7] rt2x00: rt61pci: " Gabor Juhos
2013-05-01 20:06 ` Gertjan van Wingerde
2013-05-01 15:17 ` [PATCH 3/7] rt2x00: rt2800pci: " Gabor Juhos
2013-05-01 20:06 ` Gertjan van Wingerde
2013-05-01 15:17 ` [PATCH 4/7] rt2x00: rt2800usb: use rt2x00dev->rx->limit Gabor Juhos
2013-05-01 20:07 ` Gertjan van Wingerde
2013-05-01 15:17 ` [PATCH 5/7] rt2x00: rt2800lib: use rt2x00dev->bcn->winfo_size Gabor Juhos
2013-05-01 20:07 ` Gertjan van Wingerde
2013-05-01 15:17 ` [PATCH 6/7] rt2x00: rt2x00dev: defer operational mode detection Gabor Juhos
2013-05-01 20:08 ` Gertjan van Wingerde
2013-05-01 15:17 ` [PATCH 7/7] rt2x00: rt2x00dev: use rt2x00dev->bcn->limit Gabor Juhos
2013-05-01 20:08 ` Gertjan van Wingerde
2013-05-02 7:36 ` Gabor Juhos
2013-05-22 18:53 ` John W. Linville
2013-05-01 20:10 ` [PATCH 0/7] rt2x00: avoid a few superfluous pointer dereferences Gertjan van Wingerde
2013-05-01 20:41 ` Gabor Juhos
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=20130603190959.70b1f4d2@north \
--to=moorray@wp.pl \
--cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.