summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorNikhil Agarwal <Nikhil.Agarwal@freescale.com>2014-08-12 09:30:36 (GMT)
committerMatthew Weigel <Matthew.Weigel@freescale.com>2014-12-11 18:38:44 (GMT)
commitfbe021ba3afcb83561625813e1c089625e66e05e (patch)
tree0c4f53e34030ddd8fe540f1159f2eff02c5e6cbd /drivers
parent2465e9fc678e3058febd484c98388b75a027f8fd (diff)
downloadlinux-fsl-qoriq-fbe021ba3afcb83561625813e1c089625e66e05e.tar.xz
ASFIPSEC: Porting ASF to LS1.
Adding PDB endianness independent. Signed-off-by: Nikhil Agarwal <Nikhil.Agarwal@freescale.com> Change-Id: I44bfc921ba1460dd2785c21252898b55953d8385 Reviewed-on: http://git.am.freescale.net:8181/17497 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Sandeep Malik <Sandeep.Malik@freescale.com> Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com> Tested-by: Zhengxiong Jin <Jason.Jin@freescale.com> (cherry picked from commit 16e2ab4fab053e020d4857f14fe8bd35616ad304) Reviewed-on: http://git.am.freescale.net:8181/21354
Diffstat (limited to 'drivers')
-rw-r--r--drivers/crypto/caam/pdb.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/crypto/caam/pdb.h b/drivers/crypto/caam/pdb.h
index 0680b30..faab55b 100644
--- a/drivers/crypto/caam/pdb.h
+++ b/drivers/crypto/caam/pdb.h
@@ -66,9 +66,15 @@ struct ipsec_encap_ctr {
struct ipsec_encap_ccm {
u32 salt; /* lower 24 bits */
+#ifdef CONFIG_CPU_BIG_ENDIAN
u8 b0_flags;
u8 ctr_flags;
u16 ctr_initial;
+#else
+ u16 ctr_initial;
+ u8 ctr_flags;
+ u8 b0_flags;
+#endif
u32 iv[2];
};
@@ -79,10 +85,17 @@ struct ipsec_encap_gcm {
};
struct ipsec_encap_pdb {
+#ifdef CONFIG_CPU_BIG_ENDIAN
u8 hmo_rsvd;
u8 ip_nh;
u8 ip_nh_offset;
u8 options;
+#else
+ u8 options;
+ u8 ip_nh_offset;
+ u8 ip_nh;
+ u8 hmo_rsvd;
+#endif
u32 seq_num_ext_hi;
u32 seq_num;
union {
@@ -92,8 +105,13 @@ struct ipsec_encap_pdb {
struct ipsec_encap_gcm gcm;
};
u32 spi;
+#ifdef CONFIG_CPU_BIG_ENDIAN
u16 rsvd1;
u16 ip_hdr_len;
+#else
+ u16 ip_hdr_len;
+ u16 rsvd1;
+#endif
u32 ip_hdr[0]; /* optional IP Header content */
};
@@ -108,9 +126,15 @@ struct ipsec_decap_ctr {
struct ipsec_decap_ccm {
u32 salt;
+#ifdef CONFIG_CPU_BIG_ENDIAN
u8 iv_flags;
u8 ctr_flags;
u16 ctr_initial;
+#else
+ u16 ctr_initial;
+ u8 ctr_flags;
+ u8 iv_flags;
+#endif
};
struct ipsec_decap_gcm {
@@ -119,9 +143,15 @@ struct ipsec_decap_gcm {
};
struct ipsec_decap_pdb {
+#ifdef CONFIG_CPU_BIG_ENDIAN
u16 hmo_ip_hdr_len;
u8 ip_nh_offset;
u8 options;
+#else
+ u8 options;
+ u8 ip_nh_offset;
+ u16 hmo_ip_hdr_len;
+#endif
union {
struct ipsec_decap_cbc cbc;
struct ipsec_decap_ctr ctr;