diff options
author | David Hardeman <david@2gen.com> | 2005-09-17 17:55:31 +1000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2005-10-30 11:19:43 +1100 |
commit | 378f058cc49bcda7fa63d3cd86d2f9a0a5188b1c (patch) | |
tree | ed99548aa459054c7b046f0ac96af2cc50683e6e /drivers/net/wireless/airo.c | |
parent | d32311fed70d12f14e585feb4653571b1e2b0e6d (diff) | |
download | linux-stable-378f058cc49bcda7fa63d3cd86d2f9a0a5188b1c.tar.gz linux-stable-378f058cc49bcda7fa63d3cd86d2f9a0a5188b1c.tar.bz2 linux-stable-378f058cc49bcda7fa63d3cd86d2f9a0a5188b1c.zip |
[PATCH] Use sg_set_buf/sg_init_one where applicable
This patch uses sg_set_buf/sg_init_one in some places where it was
duplicated.
Signed-off-by: David Hardeman <david@2gen.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Greg KH <greg@kroah.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/net/wireless/airo.c')
-rw-r--r-- | drivers/net/wireless/airo.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 4c11699bad91..1609ce11389d 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,9 +1591,7 @@ 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[0], plain, 16); crypto_cipher_encrypt(tfm, sg, sg, 16); cipher = kmap(sg[0].page) + sg[0].offset; for (j=0; (j<16) && (i< (sizeof(context->coeff)/sizeof(context->coeff[0]))); ) { |