From: Ivo van Doorn <ivdoorn@gmail.com>
To: Jochen Friedrich <jochen@scram.de>
Cc: linux-wireless@vger.kernel.org, rt2400-devel@lists.sourceforge.net
Subject: Re: [PATCH] rt2x00: Fix txdone_entry_desc_flags
Date: Fri, 8 Aug 2008 20:44:30 +0200 [thread overview]
Message-ID: <200808082044.31123.IvDoorn@gmail.com> (raw)
In-Reply-To: <489C65B7.9020305@scram.de>
On Friday 08 August 2008, Jochen Friedrich wrote:
> txdone_entry_desc_flags is used with __set_bit and test_bit which
> bit-shift the values, so don't bit-shift the flags in the enum.
> Also make sure flags are initialized before being used.
Good catch,
Applied to rt2x00.git
Thanks,
Ivo
> Signed-off-by: Jochen Friedrich <jochen@scram.de>
> ---
> drivers/net/wireless/rt2x00/rt2x00queue.h | 8 ++++----
> drivers/net/wireless/rt2x00/rt2x00usb.c | 1 +
> 2 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h
> index 01a6567..37f3f98 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00queue.h
> +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h
> @@ -191,10 +191,10 @@ struct rxdone_entry_desc {
> * frame transmission failed due to excessive retries.
> */
> enum txdone_entry_desc_flags {
> - TXDONE_UNKNOWN = 1 << 0,
> - TXDONE_SUCCESS = 1 << 1,
> - TXDONE_FAILURE = 1 << 2,
> - TXDONE_EXCESSIVE_RETRY = 1 << 3,
> + TXDONE_UNKNOWN,
> + TXDONE_SUCCESS,
> + TXDONE_FAILURE,
> + TXDONE_EXCESSIVE_RETRY,
> };
>
> /**
> diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
> index 8d76bb2..2050227 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00usb.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
> @@ -181,6 +181,7 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb)
> * (Only indirectly by looking at the failed TX counters
> * in the register).
> */
> + txdesc.flags = 0;
> if (!urb->status)
> __set_bit(TXDONE_UNKNOWN, &txdesc.flags);
> else
prev parent reply other threads:[~2008-08-08 18:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-08 15:26 [PATCH] rt2x00: Fix txdone_entry_desc_flags Jochen Friedrich
2008-08-08 18:44 ` Ivo van Doorn [this message]
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=200808082044.31123.IvDoorn@gmail.com \
--to=ivdoorn@gmail.com \
--cc=jochen@scram.de \
--cc=linux-wireless@vger.kernel.org \
--cc=rt2400-devel@lists.sourceforge.net \
/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).