diff options
author | Luka Perkov <luka@openwrt.org> | 2012-07-11 23:38:14 +0000 |
---|---|---|
committer | Luka Perkov <luka@openwrt.org> | 2012-07-11 23:38:14 +0000 |
commit | 283021ac15faec84a1764d7883cfb47db7847d0c (patch) | |
tree | 650deb33e8131cc58fffb4f50ee3a1727ca4dfc3 /target/linux/generic/files/crypto/ocf/kirkwood/cesa_ocf_drv.c | |
parent | 5e4100bcf905e6d7888a30f65444ea9f326fea47 (diff) | |
download | mtk-20170518-283021ac15faec84a1764d7883cfb47db7847d0c.zip mtk-20170518-283021ac15faec84a1764d7883cfb47db7847d0c.tar.gz mtk-20170518-283021ac15faec84a1764d7883cfb47db7847d0c.tar.bz2 |
ocf: update to version 20120127
SVN-Revision: 32672
Diffstat (limited to 'target/linux/generic/files/crypto/ocf/kirkwood/cesa_ocf_drv.c')
-rw-r--r-- | target/linux/generic/files/crypto/ocf/kirkwood/cesa_ocf_drv.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/target/linux/generic/files/crypto/ocf/kirkwood/cesa_ocf_drv.c b/target/linux/generic/files/crypto/ocf/kirkwood/cesa_ocf_drv.c index 1d889ff..e689f24 100644 --- a/target/linux/generic/files/crypto/ocf/kirkwood/cesa_ocf_drv.c +++ b/target/linux/generic/files/crypto/ocf/kirkwood/cesa_ocf_drv.c @@ -92,6 +92,11 @@ extern int cesaReqResources; #define CESA_OCF_MAX_SES 128 #define CESA_Q_SIZE 64 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) +#define FRAG_PAGE(f) (f).p +#else +#define FRAG_PAGE(f) (f) +#endif /* data structures */ struct cesa_ocf_data { @@ -415,7 +420,7 @@ cesa_ocf_process(device_t dev, struct cryptop *crp, int hint) for ( i = 0; i < skb_shinfo(skb)->nr_frags; i++ ) { skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; p_buf_info->bufSize = frag->size; - p_buf_info->bufVirtPtr = page_address(frag->page) + frag->page_offset; + p_buf_info->bufVirtPtr = page_address(FRAG_PAGE(frag->page)) + frag->page_offset; p_buf_info++; } p_mbuf_info->numFrags = skb_shinfo(skb)->nr_frags + 1; |