From: Richard Kennedy <richard@rsk.demon.co.uk>
To: Julia Lawall <julia@diku.dk>
Cc: gregkh@suse.de, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: p80211wext.c: possible problem with IW_ENCODE_ALG_WEP
Date: Tue, 05 May 2009 13:48:19 +0100 [thread overview]
Message-ID: <4A003593.60001@rsk.demon.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.64.0905051330150.9552@pc-004.diku.dk>
Julia Lawall wrote:
> The file drivers/staging/wlan-ng/p80211wext.c contains the following code:
>
> (starting at line 1490 in a recent linux-next)
>
> if (!(ext->alg & IW_ENCODE_ALG_WEP)) {
> pr_debug("asked to set a non wep key :(");
> return -EINVAL;
> }
>
> The reference to IW_ENCODE_ALG_WEP seems to refer to the following
> definitions in include/linux/wireless.h
>
> /* struct iw_encode_ext ->alg */
> #define IW_ENCODE_ALG_NONE 0
> #define IW_ENCODE_ALG_WEP 1
> #define IW_ENCODE_ALG_TKIP 2
> #define IW_ENCODE_ALG_CCMP 3
> #define IW_ENCODE_ALG_PMK 4
> #define IW_ENCODE_ALG_AES_CMAC 5
>
> But if the alg field returns true for a bit and with IW_ENCODE_ALG_WEP,
> then it would also return true for a bit and with IW_ENCODE_ALG_CCMP and
> IW_ENCODE_ALG_AES_CMAC. Is this what is intended, or should the test be
> encoded in another way?
>
> julia
Hi Julia,
You're quite right, this is not what was intended.
The card only handles WEP keys so
if (ext->alg != IW_ENCODE_ALG_WEP) {...}
would be better.
Do you want to send a patch to correct this? If not, I can do it.
regards
Richard
prev parent reply other threads:[~2009-05-05 12:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-05 11:30 Julia Lawall
2009-05-05 12:48 ` Richard Kennedy [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=4A003593.60001@rsk.demon.co.uk \
--to=richard@rsk.demon.co.uk \
--cc=gregkh@suse.de \
--cc=julia@diku.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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®