diff options
author | Julia Lawall <julia@diku.dk> | 2009-05-05 13:47:06 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-19 18:00:38 (GMT) |
commit | 1611a52c395e6036725104af3a74a0cef8ea42b8 (patch) | |
tree | ea42d6549209446f2a6ddb81c86f581b8c07bf0b /drivers/staging/wlan-ng/p80211wext.c | |
parent | f2b50b40d1241b443da43fa66ae53bae93df910a (diff) | |
download | linux-fsl-qoriq-1611a52c395e6036725104af3a74a0cef8ea42b8.tar.xz |
Staging: wlan-ng: p80211wext.c: problem with IW_ENCODE_ALG_WEP
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>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/wlan-ng/p80211wext.c')
-rw-r--r-- | 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 3a96fce..e73123b 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) { |