diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-10-22 19:44:26 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-10-22 21:19:56 +0200 |
commit | fa05f1286be25a8ce915c5dd492aea61126b3f33 (patch) | |
tree | 07d6d32733f3272d588410a64c0cfa25d794e3be /net/mac80211 | |
parent | 60c74f81933635bb4ccb4ee6f31909c51f5cd230 (diff) | |
download | kernel_samsung_espresso10-fa05f1286be25a8ce915c5dd492aea61126b3f33.zip kernel_samsung_espresso10-fa05f1286be25a8ce915c5dd492aea61126b3f33.tar.gz kernel_samsung_espresso10-fa05f1286be25a8ce915c5dd492aea61126b3f33.tar.bz2 |
Update net/ to use sg helpers
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/wep.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c index 6675261..cc806d6 100644 --- a/net/mac80211/wep.c +++ b/net/mac80211/wep.c @@ -138,9 +138,7 @@ void ieee80211_wep_encrypt_data(struct crypto_blkcipher *tfm, u8 *rc4key, *icv = cpu_to_le32(~crc32_le(~0, data, data_len)); crypto_blkcipher_setkey(tfm, rc4key, klen); - sg.page = virt_to_page(data); - sg.offset = offset_in_page(data); - sg.length = data_len + WEP_ICV_LEN; + sg_init_one(&sg, data, data_len + WEP_ICV_LEN); crypto_blkcipher_encrypt(&desc, &sg, &sg, sg.length); } @@ -204,9 +202,7 @@ int ieee80211_wep_decrypt_data(struct crypto_blkcipher *tfm, u8 *rc4key, __le32 crc; crypto_blkcipher_setkey(tfm, rc4key, klen); - sg.page = virt_to_page(data); - sg.offset = offset_in_page(data); - sg.length = data_len + WEP_ICV_LEN; + sg_init_one(&sg, data, data_len + WEP_ICV_LEN); crypto_blkcipher_decrypt(&desc, &sg, &sg, sg.length); crc = cpu_to_le32(~crc32_le(~0, data, data_len)); |