linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFT] tkip: fix iv32 calculation in ieee80211_get_tkip_key()
@ 2008-04-25  0:00 Pavel Roskin
  2008-04-26 15:25 ` Tomas Winkler
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Roskin @ 2008-04-25  0:00 UTC (permalink / raw)
  To: linux-wireless

Signed-off-by: Pavel Roskin <proski@gnu.org>
---
It's a side product of testing a sparse patch by Linus Torvalds.
Compile tested only.

 net/mac80211/tkip.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/net/mac80211/tkip.c b/net/mac80211/tkip.c
index dddbfd6..b9ecd65 100644
--- a/net/mac80211/tkip.c
+++ b/net/mac80211/tkip.c
@@ -231,9 +231,9 @@ void ieee80211_get_tkip_key(struct ieee80211_key_conf *keyconf,
 	iv16 = data[hdr_len] << 8;
 	iv16 += data[hdr_len + 2];
 	iv32 = data[hdr_len + 4] +
-		(data[hdr_len + 5] >> 8) +
-		(data[hdr_len + 6] >> 16) +
-		(data[hdr_len + 7] >> 24);
+		(data[hdr_len + 5] << 8) +
+		(data[hdr_len + 6] << 16) +
+		(data[hdr_len + 7] << 24);
 
 #ifdef CONFIG_TKIP_DEBUG
 	printk(KERN_DEBUG "TKIP encrypt: iv16 = 0x%04x, iv32 = 0x%08x\n",


-- 
Regards,
Pavel Roskin

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-04-26 17:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-25  0:00 [PATCH RFT] tkip: fix iv32 calculation in ieee80211_get_tkip_key() Pavel Roskin
2008-04-26 15:25 ` Tomas Winkler
2008-04-26 16:10   ` Johannes Berg
2008-04-26 17:05     ` Tomas Winkler

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