Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: atmel - Fix build error of CRYPTO_AUTHENC

If CRYPTO_DEV_ATMEL_AUTHENC is m, CRYPTO_DEV_ATMEL_SHA is m,
but CRYPTO_DEV_ATMEL_AES is y, building will fail:

drivers/crypto/atmel-aes.o: In function `atmel_aes_authenc_init_tfm':
atmel-aes.c:(.text+0x670): undefined reference to `atmel_sha_authenc_get_reqsize'
atmel-aes.c:(.text+0x67a): undefined reference to `atmel_sha_authenc_spawn'
drivers/crypto/atmel-aes.o: In function `atmel_aes_authenc_setkey':
atmel-aes.c:(.text+0x7e5): undefined reference to `atmel_sha_authenc_setkey'

Make CRYPTO_DEV_ATMEL_AUTHENC depend on CRYPTO_DEV_ATMEL_AES,
and select CRYPTO_DEV_ATMEL_SHA and CRYPTO_AUTHENC for it under there.

Reported-by: Hulk Robot <hulkci@huawei.com>
Suggested-by: Herbert Xu <herbert@gondor.apana.org.au>
Fixes: 89a82ef87e01 ("crypto: atmel-authenc - add support to...")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

YueHaibing and committed by
Herbert Xu
aee1f9f3 3e8b4ccd

+4 -4
+4 -4
drivers/crypto/Kconfig
··· 492 492 endif # if CRYPTO_DEV_UX500 493 493 494 494 config CRYPTO_DEV_ATMEL_AUTHENC 495 - tristate "Support for Atmel IPSEC/SSL hw accelerator" 495 + bool "Support for Atmel IPSEC/SSL hw accelerator" 496 496 depends on ARCH_AT91 || COMPILE_TEST 497 - select CRYPTO_DEV_ATMEL_AES 498 - select CRYPTO_DEV_ATMEL_SHA 497 + depends on CRYPTO_DEV_ATMEL_AES 499 498 help 500 499 Some Atmel processors can combine the AES and SHA hw accelerators 501 500 to enhance support of IPSEC/SSL. ··· 506 507 depends on ARCH_AT91 || COMPILE_TEST 507 508 select CRYPTO_AES 508 509 select CRYPTO_AEAD 509 - select CRYPTO_AUTHENC 510 510 select CRYPTO_SKCIPHER 511 + select CRYPTO_AUTHENC if CRYPTO_DEV_ATMEL_AUTHENC 512 + select CRYPTO_DEV_ATMEL_SHA if CRYPTO_DEV_ATMEL_AUTHENC 511 513 help 512 514 Some Atmel processors have AES hw accelerator. 513 515 Select this if you want to use the Atmel module for