Lines Matching refs:driver_algs
3850 static struct chcr_alg_template driver_algs[] = { variable
4387 for (i = 0; i < ARRAY_SIZE(driver_algs); i++) { in chcr_unregister_alg()
4388 switch (driver_algs[i].type & CRYPTO_ALG_TYPE_MASK) { in chcr_unregister_alg()
4390 if (driver_algs[i].is_registered && refcount_read( in chcr_unregister_alg()
4391 &driver_algs[i].alg.skcipher.base.cra_refcnt) in chcr_unregister_alg()
4394 &driver_algs[i].alg.skcipher); in chcr_unregister_alg()
4395 driver_algs[i].is_registered = 0; in chcr_unregister_alg()
4399 if (driver_algs[i].is_registered && refcount_read( in chcr_unregister_alg()
4400 &driver_algs[i].alg.aead.base.cra_refcnt) == 1) { in chcr_unregister_alg()
4402 &driver_algs[i].alg.aead); in chcr_unregister_alg()
4403 driver_algs[i].is_registered = 0; in chcr_unregister_alg()
4407 if (driver_algs[i].is_registered && refcount_read( in chcr_unregister_alg()
4408 &driver_algs[i].alg.hash.halg.base.cra_refcnt) in chcr_unregister_alg()
4411 &driver_algs[i].alg.hash); in chcr_unregister_alg()
4412 driver_algs[i].is_registered = 0; in chcr_unregister_alg()
4434 for (i = 0; i < ARRAY_SIZE(driver_algs); i++) { in chcr_register_alg()
4435 if (driver_algs[i].is_registered) in chcr_register_alg()
4437 switch (driver_algs[i].type & CRYPTO_ALG_TYPE_MASK) { in chcr_register_alg()
4439 driver_algs[i].alg.skcipher.base.cra_priority = in chcr_register_alg()
4441 driver_algs[i].alg.skcipher.base.cra_module = THIS_MODULE; in chcr_register_alg()
4442 driver_algs[i].alg.skcipher.base.cra_flags = in chcr_register_alg()
4446 driver_algs[i].alg.skcipher.base.cra_ctxsize = in chcr_register_alg()
4449 driver_algs[i].alg.skcipher.base.cra_alignmask = 0; in chcr_register_alg()
4451 err = crypto_register_skcipher(&driver_algs[i].alg.skcipher); in chcr_register_alg()
4452 name = driver_algs[i].alg.skcipher.base.cra_driver_name; in chcr_register_alg()
4455 driver_algs[i].alg.aead.base.cra_flags = in chcr_register_alg()
4458 driver_algs[i].alg.aead.encrypt = chcr_aead_encrypt; in chcr_register_alg()
4459 driver_algs[i].alg.aead.decrypt = chcr_aead_decrypt; in chcr_register_alg()
4460 driver_algs[i].alg.aead.init = chcr_aead_cra_init; in chcr_register_alg()
4461 driver_algs[i].alg.aead.exit = chcr_aead_cra_exit; in chcr_register_alg()
4462 driver_algs[i].alg.aead.base.cra_module = THIS_MODULE; in chcr_register_alg()
4463 err = crypto_register_aead(&driver_algs[i].alg.aead); in chcr_register_alg()
4464 name = driver_algs[i].alg.aead.base.cra_driver_name; in chcr_register_alg()
4467 a_hash = &driver_algs[i].alg.hash; in chcr_register_alg()
4482 if (driver_algs[i].type == CRYPTO_ALG_TYPE_HMAC) { in chcr_register_alg()
4493 err = crypto_register_ahash(&driver_algs[i].alg.hash); in chcr_register_alg()
4494 ai = driver_algs[i].alg.hash.halg.base; in chcr_register_alg()
4502 driver_algs[i].is_registered = 1; in chcr_register_alg()