Lines Matching refs:t_alg

3010 static void caam_skcipher_alg_init(struct caam_skcipher_alg *t_alg)  in caam_skcipher_alg_init()  argument
3012 struct skcipher_alg *alg = &t_alg->skcipher; in caam_skcipher_alg_init()
3024 static void caam_aead_alg_init(struct caam_aead_alg *t_alg) in caam_aead_alg_init() argument
3026 struct aead_alg *alg = &t_alg->aead; in caam_aead_alg_init()
4633 struct caam_hash_alg *t_alg; in caam_hash_alloc() local
4637 t_alg = kzalloc(sizeof(*t_alg), GFP_KERNEL); in caam_hash_alloc()
4638 if (!t_alg) in caam_hash_alloc()
4641 t_alg->ahash_alg = template->template_ahash; in caam_hash_alloc()
4642 halg = &t_alg->ahash_alg; in caam_hash_alloc()
4650 t_alg->is_hmac = true; in caam_hash_alloc()
4656 t_alg->ahash_alg.setkey = NULL; in caam_hash_alloc()
4657 t_alg->is_hmac = false; in caam_hash_alloc()
4668 t_alg->alg_type = template->alg_type; in caam_hash_alloc()
4669 t_alg->dev = dev; in caam_hash_alloc()
4671 return t_alg; in caam_hash_alloc()
5282 struct caam_skcipher_alg *t_alg = driver_algs + i; in dpaa2_caam_probe() local
5283 u32 alg_sel = t_alg->caam.class1_alg_type & OP_ALG_ALGSEL_MASK; in dpaa2_caam_probe()
5301 t_alg->caam.dev = dev; in dpaa2_caam_probe()
5302 caam_skcipher_alg_init(t_alg); in dpaa2_caam_probe()
5304 err = crypto_register_skcipher(&t_alg->skcipher); in dpaa2_caam_probe()
5307 t_alg->skcipher.base.cra_driver_name, err); in dpaa2_caam_probe()
5311 t_alg->registered = true; in dpaa2_caam_probe()
5316 struct caam_aead_alg *t_alg = driver_aeads + i; in dpaa2_caam_probe() local
5317 u32 c1_alg_sel = t_alg->caam.class1_alg_type & in dpaa2_caam_probe()
5319 u32 c2_alg_sel = t_alg->caam.class2_alg_type & in dpaa2_caam_probe()
5351 t_alg->caam.dev = dev; in dpaa2_caam_probe()
5352 caam_aead_alg_init(t_alg); in dpaa2_caam_probe()
5354 err = crypto_register_aead(&t_alg->aead); in dpaa2_caam_probe()
5357 t_alg->aead.base.cra_driver_name, err); in dpaa2_caam_probe()
5361 t_alg->registered = true; in dpaa2_caam_probe()
5378 struct caam_hash_alg *t_alg; in dpaa2_caam_probe() local
5382 t_alg = caam_hash_alloc(dev, alg, true); in dpaa2_caam_probe()
5383 if (IS_ERR(t_alg)) { in dpaa2_caam_probe()
5384 err = PTR_ERR(t_alg); in dpaa2_caam_probe()
5390 err = crypto_register_ahash(&t_alg->ahash_alg); in dpaa2_caam_probe()
5393 t_alg->ahash_alg.halg.base.cra_driver_name, in dpaa2_caam_probe()
5395 kfree(t_alg); in dpaa2_caam_probe()
5397 list_add_tail(&t_alg->entry, &hash_list); in dpaa2_caam_probe()
5401 t_alg = caam_hash_alloc(dev, alg, false); in dpaa2_caam_probe()
5402 if (IS_ERR(t_alg)) { in dpaa2_caam_probe()
5403 err = PTR_ERR(t_alg); in dpaa2_caam_probe()
5409 err = crypto_register_ahash(&t_alg->ahash_alg); in dpaa2_caam_probe()
5412 t_alg->ahash_alg.halg.base.cra_driver_name, in dpaa2_caam_probe()
5414 kfree(t_alg); in dpaa2_caam_probe()
5416 list_add_tail(&t_alg->entry, &hash_list); in dpaa2_caam_probe()
5450 struct caam_aead_alg *t_alg = driver_aeads + i; in dpaa2_caam_remove() local
5452 if (t_alg->registered) in dpaa2_caam_remove()
5453 crypto_unregister_aead(&t_alg->aead); in dpaa2_caam_remove()
5457 struct caam_skcipher_alg *t_alg = driver_algs + i; in dpaa2_caam_remove() local
5459 if (t_alg->registered) in dpaa2_caam_remove()
5460 crypto_unregister_skcipher(&t_alg->skcipher); in dpaa2_caam_remove()