summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/padlock-aes.c
diff options
context:
space:
mode:
authorMichal Ludvig <michal@logix.cz>2006-07-15 10:23:49 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2006-09-21 11:40:22 +1000
commitccc17c34d676f116bd09dd36a3b01627bc6a2f8a (patch)
tree458c6c6e7b187885c5fac80668c44583ce930ab1 /drivers/crypto/padlock-aes.c
parentdb5e9a42373ae6d84c4b0179c2fe0aba866474e8 (diff)
downloadtalos-obmc-linux-ccc17c34d676f116bd09dd36a3b01627bc6a2f8a.tar.gz
talos-obmc-linux-ccc17c34d676f116bd09dd36a3b01627bc6a2f8a.zip
[CRYPTO] padlock: Update private header file
PADLOCK_CRA_PRIORITY is shared between padlock-aes and padlock-sha so it should be in the header. On the other hand "struct cword" is only used in padlock-aes.c so it's unnecessary to have it in padlock.h Signed-off-by: Michal Ludvig <michal@logix.cz> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/padlock-aes.c')
-rw-r--r--drivers/crypto/padlock-aes.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c
index 241052da2787..149e54b0ea2e 100644
--- a/drivers/crypto/padlock-aes.c
+++ b/drivers/crypto/padlock-aes.c
@@ -59,6 +59,17 @@
#define AES_EXTENDED_KEY_SIZE 64 /* in uint32_t units */
#define AES_EXTENDED_KEY_SIZE_B (AES_EXTENDED_KEY_SIZE * sizeof(uint32_t))
+/* Control word. */
+struct cword {
+ unsigned int __attribute__ ((__packed__))
+ rounds:4,
+ algo:3,
+ keygen:1,
+ interm:1,
+ encdec:1,
+ ksize:2;
+} __attribute__ ((__aligned__(PADLOCK_ALIGNMENT)));
+
/* Whenever making any changes to the following
* structure *make sure* you keep E, d_data
* and cword aligned on 16 Bytes boundaries!!! */
@@ -473,7 +484,7 @@ static unsigned int aes_decrypt_cbc(const struct cipher_desc *desc, u8 *out,
static struct crypto_alg aes_alg = {
.cra_name = "aes",
.cra_driver_name = "aes-padlock",
- .cra_priority = 300,
+ .cra_priority = PADLOCK_CRA_PRIORITY,
.cra_flags = CRYPTO_ALG_TYPE_CIPHER,
.cra_blocksize = AES_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct aes_ctx),
OpenPOWER on IntegriCloud