diff options
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/padlock-aes.c | 13 | ||||
-rw-r--r-- | drivers/crypto/padlock.h | 13 |
2 files changed, 14 insertions, 12 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 @@ | |||
59 | #define AES_EXTENDED_KEY_SIZE 64 /* in uint32_t units */ | 59 | #define AES_EXTENDED_KEY_SIZE 64 /* in uint32_t units */ |
60 | #define AES_EXTENDED_KEY_SIZE_B (AES_EXTENDED_KEY_SIZE * sizeof(uint32_t)) | 60 | #define AES_EXTENDED_KEY_SIZE_B (AES_EXTENDED_KEY_SIZE * sizeof(uint32_t)) |
61 | 61 | ||
62 | /* Control word. */ | ||
63 | struct cword { | ||
64 | unsigned int __attribute__ ((__packed__)) | ||
65 | rounds:4, | ||
66 | algo:3, | ||
67 | keygen:1, | ||
68 | interm:1, | ||
69 | encdec:1, | ||
70 | ksize:2; | ||
71 | } __attribute__ ((__aligned__(PADLOCK_ALIGNMENT))); | ||
72 | |||
62 | /* Whenever making any changes to the following | 73 | /* Whenever making any changes to the following |
63 | * structure *make sure* you keep E, d_data | 74 | * structure *make sure* you keep E, d_data |
64 | * and cword aligned on 16 Bytes boundaries!!! */ | 75 | * and cword aligned on 16 Bytes boundaries!!! */ |
@@ -473,7 +484,7 @@ static unsigned int aes_decrypt_cbc(const struct cipher_desc *desc, u8 *out, | |||
473 | static struct crypto_alg aes_alg = { | 484 | static struct crypto_alg aes_alg = { |
474 | .cra_name = "aes", | 485 | .cra_name = "aes", |
475 | .cra_driver_name = "aes-padlock", | 486 | .cra_driver_name = "aes-padlock", |
476 | .cra_priority = 300, | 487 | .cra_priority = PADLOCK_CRA_PRIORITY, |
477 | .cra_flags = CRYPTO_ALG_TYPE_CIPHER, | 488 | .cra_flags = CRYPTO_ALG_TYPE_CIPHER, |
478 | .cra_blocksize = AES_BLOCK_SIZE, | 489 | .cra_blocksize = AES_BLOCK_SIZE, |
479 | .cra_ctxsize = sizeof(struct aes_ctx), | 490 | .cra_ctxsize = sizeof(struct aes_ctx), |
diff --git a/drivers/crypto/padlock.h b/drivers/crypto/padlock.h index e2ee3b689dbd..7e3385b0904d 100644 --- a/drivers/crypto/padlock.h +++ b/drivers/crypto/padlock.h | |||
@@ -15,17 +15,8 @@ | |||
15 | 15 | ||
16 | #define PADLOCK_ALIGNMENT 16 | 16 | #define PADLOCK_ALIGNMENT 16 |
17 | 17 | ||
18 | /* Control word. */ | ||
19 | struct cword { | ||
20 | unsigned int __attribute__ ((__packed__)) | ||
21 | rounds:4, | ||
22 | algo:3, | ||
23 | keygen:1, | ||
24 | interm:1, | ||
25 | encdec:1, | ||
26 | ksize:2; | ||
27 | } __attribute__ ((__aligned__(PADLOCK_ALIGNMENT))); | ||
28 | |||
29 | #define PFX "padlock: " | 18 | #define PFX "padlock: " |
30 | 19 | ||
20 | #define PADLOCK_CRA_PRIORITY 300 | ||
21 | |||
31 | #endif /* _CRYPTO_PADLOCK_H */ | 22 | #endif /* _CRYPTO_PADLOCK_H */ |