linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rndis_wlan: fix broken logic in add_wep_key()
@ 2009-08-20 18:00 Jussi Kivilinna
  0 siblings, 0 replies; only message in thread
From: Jussi Kivilinna @ 2009-08-20 18:00 UTC (permalink / raw)
  To: linux-wireless; +Cc: John W. Linville

add_wep_key() tries to check if key length is not 5 AND not 13
but uses (key_len != 5 || key_len != 13) instead. Fix this.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
---

 drivers/net/wireless/rndis_wlan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index d42692d..c5b921b 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -1214,7 +1214,7 @@ static int add_wep_key(struct usbnet *usbdev, char *key, int key_len, int index)
 	struct ndis_80211_wep_key ndis_key;
 	int cipher, ret;
 
-	if ((key_len != 5 || key_len != 13) || index < 0 || index > 3)
+	if ((key_len != 5 && key_len != 13) || index < 0 || index > 3)
 		return -EINVAL;
 
 	if (key_len == 5)


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-08-20 18:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-20 18:00 [PATCH] rndis_wlan: fix broken logic in add_wep_key() Jussi Kivilinna

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).