mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
Update net/ to use sg helpers
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
60c74f8193
commit
fa05f1286b
9 changed files with 25 additions and 33 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue