* p80211wext.c: possible problem with IW_ENCODE_ALG_WEP
@ 2009-05-05 11:30 Julia Lawall
2009-05-05 12:48 ` Richard Kennedy
0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2009-05-05 11:30 UTC (permalink / raw)
To: gregkh, linux-kernel, kernel-janitors
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: p80211wext.c: possible problem with IW_ENCODE_ALG_WEP
2009-05-05 11:30 p80211wext.c: possible problem with IW_ENCODE_ALG_WEP Julia Lawall
@ 2009-05-05 12:48 ` Richard Kennedy
0 siblings, 0 replies; 2+ messages in thread
From: Richard Kennedy @ 2009-05-05 12:48 UTC (permalink / raw)
To: Julia Lawall; +Cc: gregkh, linux-kernel, kernel-janitors
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-05 12:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-05 11:30 p80211wext.c: possible problem with IW_ENCODE_ALG_WEP Julia Lawall
2009-05-05 12:48 ` Richard Kennedy
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®