diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/airo.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 4c11699bad9..750c0167539 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c @@ -35,6 +35,7 @@ #include <linux/interrupt.h> #include <linux/in.h> #include <linux/bitops.h> +#include <linux/scatterlist.h> #include <asm/io.h> #include <asm/system.h> @@ -1590,11 +1591,9 @@ static void emmh32_setseed(emmh32_context *context, u8 *pkey, int keylen, struct aes_counter[12] = (u8)(counter >> 24); counter++; memcpy (plain, aes_counter, 16); - sg[0].page = virt_to_page(plain); - sg[0].offset = ((long) plain & ~PAGE_MASK); - sg[0].length = 16; + sg_set_buf(sg, plain, 16); crypto_cipher_encrypt(tfm, sg, sg, 16); - cipher = kmap(sg[0].page) + sg[0].offset; + cipher = kmap(sg->page) + sg->offset; for (j=0; (j<16) && (i< (sizeof(context->coeff)/sizeof(context->coeff[0]))); ) { context->coeff[i++] = ntohl(*(u32 *)&cipher[j]); j += 4; |