X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/c5552ad03973839d83d32d7108f20c00f192633b..e2bae31171dc8902098c6e79b3f651d2fb4899ef:/target/linux/generic/files/crypto/ocf/criov.c diff --git a/target/linux/generic/files/crypto/ocf/criov.c b/target/linux/generic/files/crypto/ocf/criov.c index 6d7d3ad45..cdc731e29 100644 --- a/target/linux/generic/files/crypto/ocf/criov.c +++ b/target/linux/generic/files/crypto/ocf/criov.c @@ -34,7 +34,8 @@ __FBSDID("$FreeBSD: src/sys/opencrypto/criov.c,v 1.5 2006/06/04 22:15:13 pjd Exp $"); */ -#ifndef AUTOCONF_INCLUDED +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) #include #endif #include @@ -155,7 +156,7 @@ skb_copy_bits_back(struct sk_buff *skb, int offset, caddr_t cp, int len) offset -= skb_headlen(skb); for (i = 0; len > 0 && i < skb_shinfo(skb)->nr_frags; i++) { if (offset < skb_shinfo(skb)->frags[i].size) { - memcpy(page_address(skb_shinfo(skb)->frags[i].page) + + memcpy(page_address(skb_frag_page(&skb_shinfo(skb)->frags[i])) + skb_shinfo(skb)->frags[i].page_offset, cp, min_t(int, skb_shinfo(skb)->frags[i].size, len)); len -= skb_shinfo(skb)->frags[i].size;