]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/xfrm/xfrm_algo.c
SG: Change sg_set_page() to take length and offset argument
[linux-2.6-omap-h63xx.git] / net / xfrm / xfrm_algo.c
index 313d4bed3aa9444d9817aa6f57adacfa1d49d75f..fa45989a716af7a7045ad56f9431908641d4897b 100644 (file)
@@ -553,9 +553,7 @@ int skb_icv_walk(const struct sk_buff *skb, struct hash_desc *desc,
                if (copy > len)
                        copy = len;
 
-               sg_set_page(&sg, virt_to_page(skb->data + offset));
-               sg.offset = (unsigned long)(skb->data + offset) % PAGE_SIZE;
-               sg.length = copy;
+               sg_set_buf(&sg, skb->data + offset, copy);
 
                err = icv_update(desc, &sg, copy);
                if (unlikely(err))
@@ -578,9 +576,8 @@ int skb_icv_walk(const struct sk_buff *skb, struct hash_desc *desc,
                        if (copy > len)
                                copy = len;
 
-                       sg_set_page(&sg, frag->page);
-                       sg.offset = frag->page_offset + offset-start;
-                       sg.length = copy;
+                       sg_set_page(&sg, frag->page, copy,
+                                       frag->page_offset + offset-start);
 
                        err = icv_update(desc, &sg, copy);
                        if (unlikely(err))