aboutsummaryrefslogtreecommitdiff
path: root/net/mac80211/wep.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-11-26 15:28:40 -0800
committerDavid S. Miller <davem@davemloft.net>2008-11-26 15:28:40 -0800
commitb5ddedc9cc01b1d86015af08c5f1694191804530 (patch)
treedb08f24da9ef4dcec0976ee4de4d77e5e596057e /net/mac80211/wep.c
parent244e6c2d0724bc4908a1995804704bdee3b31528 (diff)
parentb235507cc5e552b9e75678d596727249e8fba01b (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'net/mac80211/wep.c')
-rw-r--r--net/mac80211/wep.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c
index 7bbb98e846a..7043ddc7549 100644
--- a/net/mac80211/wep.c
+++ b/net/mac80211/wep.c
@@ -17,6 +17,7 @@
#include <linux/err.h>
#include <linux/mm.h>
#include <linux/scatterlist.h>
+#include <asm/unaligned.h>
#include <net/mac80211.h>
#include "ieee80211_i.h"
@@ -125,10 +126,10 @@ void ieee80211_wep_encrypt_data(struct crypto_blkcipher *tfm, u8 *rc4key,
{
struct blkcipher_desc desc = { .tfm = tfm };
struct scatterlist sg;
- __le32 *icv;
+ __le32 icv;
- icv = (__le32 *)(data + data_len);
- *icv = cpu_to_le32(~crc32_le(~0, data, data_len));
+ icv = cpu_to_le32(~crc32_le(~0, data, data_len));
+ put_unaligned(icv, (__le32 *)(data + data_len));
crypto_blkcipher_setkey(tfm, rc4key, klen);
sg_init_one(&sg, data, data_len + WEP_ICV_LEN);