Search Linux Wireless

[PATCH RFT] tkip: fix iv32 calculation in ieee80211_get_tkip_key()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Roskin <proski@xxxxxxx>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux