From: khc@pm.waw.pl (Krzysztof Halasa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 8/10] IXP4xx crypto: MOD_AES{128, 192, 256} already include key size.
Date: Thu, 20 Sep 2012 22:21:13 +0200 [thread overview]
Message-ID: <m3ehlw30p2.fsf@intrepid.localdomain> (raw)
In-Reply-To: <m3txus4hgm.fsf@intrepid.localdomain> (Krzysztof Halasa's message of "Thu, 20 Sep 2012 21:33:45 +0200")
--- a/drivers/crypto/ixp4xx_crypto.c
+++ b/drivers/crypto/ixp4xx_crypto.c
@@ -750,12 +750,12 @@ static int setup_cipher(struct crypto_tfm *tfm, int encrypt,
}
if (cipher_cfg & MOD_AES) {
switch (key_len) {
- case 16: keylen_cfg = MOD_AES128 | KEYLEN_128; break;
- case 24: keylen_cfg = MOD_AES192 | KEYLEN_192; break;
- case 32: keylen_cfg = MOD_AES256 | KEYLEN_256; break;
- default:
- *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
- return -EINVAL;
+ case 16: keylen_cfg = MOD_AES128; break;
+ case 24: keylen_cfg = MOD_AES192; break;
+ case 32: keylen_cfg = MOD_AES256; break;
+ default:
+ *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
+ return -EINVAL;
}
cipher_cfg |= keylen_cfg;
} else if (cipher_cfg & MOD_3DES) {
--
Krzysztof Halasa
next prev parent reply other threads:[~2012-09-20 20:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-20 19:33 My collection of IXP4xx patches for the next window Krzysztof Halasa
2012-09-20 20:16 ` [PATCH 1/10] IXP4xx: Fix Goramo MultiLink platform compilation Krzysztof Halasa
2012-09-20 20:16 ` [PATCH 2/10] IXP4xx: Fix off-by-one bug in Goramo MultiLink platform Krzysztof Halasa
2012-09-20 20:17 ` [PATCH 3/10] IXP4xx: HW pseudo-random generator is available on IXP45x/46x only Krzysztof Halasa
2012-09-20 20:18 ` [PATCH 4/10] IXP4xx: ixp4xx_crypto driver requires Queue Manager and NPE drivers Krzysztof Halasa
2012-09-20 20:19 ` [PATCH 5/10] ARM: fix DMA-bounce code to allow sync from_device and to_device with bidirectional mappings Krzysztof Halasa
2012-09-20 20:19 ` [PATCH 6/10] IXP4xx: Remove time limit for PCI TRDY to enable use of slow devices Krzysztof Halasa
2012-09-20 20:19 ` [PATCH 7/10] WAN: Remove redundant HDLC info printed by IXP4xx HSS driver Krzysztof Halasa
2012-09-20 20:21 ` Krzysztof Halasa [this message]
2012-09-20 20:21 ` [PATCH 9/10] IXP4xx: Always ioremap() Queue Manager MMIO region at boot Krzysztof Halasa
2012-09-20 20:21 ` [PATCH 10/10] IXP4xx: map CPU config registers within VMALLOC region Krzysztof Halasa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3ehlw30p2.fsf@intrepid.localdomain \
--to=khc@pm.waw.pl \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox