From: Julia Lawall <julia@diku.dk>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: richard@rsk.demon.co.uk, gregkh@suse.de,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: p80211wext.c: problem with IW_ENCODE_ALG_WEP
Date: Tue, 5 May 2009 15:47:06 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.0905051545450.9552@pc-004.diku.dk> (raw)
In-Reply-To: <4A004088.7000907@gmail.com>
From: Julia Lawall <julia@diku.dk>
The expression !(ext->alg & IW_ENCODE_ALG_WEP) appears to be incorrect,
because there are several possible values for ext->alg that give 1 when
bit-anded with IW_ENCODE_ALG_WEP. Therefore Richard Kennedy suggested to
rewrite the code with !=
Added \n at the end of the debug string as well.
Signed-off-by: Julia Lawall <julia@diku.dk>
---
drivers/staging/wlan-ng/p80211wext.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c
index 96078b0..74eac34 100644
--- a/drivers/staging/wlan-ng/p80211wext.c
+++ b/drivers/staging/wlan-ng/p80211wext.c
@@ -1487,8 +1487,8 @@ static int p80211wext_set_encodeext(struct net_device *dev,
}
if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) {
- if (!(ext->alg & IW_ENCODE_ALG_WEP)) {
- pr_debug("asked to set a non wep key :(");
+ if (ext->alg != IW_ENCODE_ALG_WEP) {
+ pr_debug("asked to set a non wep key :(\n");
return -EINVAL;
}
if (idx) {
prev parent reply other threads:[~2009-05-05 13:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-05 13:22 Julia Lawall
2009-05-05 13:35 ` Jiri Slaby
2009-05-05 13:47 ` Julia Lawall [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=Pine.LNX.4.64.0905051545450.9552@pc-004.diku.dk \
--to=julia@diku.dk \
--cc=gregkh@suse.de \
--cc=jirislaby@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=richard@rsk.demon.co.uk \
/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
all inboxes | Powered by JetHome®