Lines Matching refs:t_alg
3122 struct talitos_crypto_alg *t_alg, *n; in talitos_remove() local
3125 list_for_each_entry_safe(t_alg, n, &priv->alg_list, entry) { in talitos_remove()
3126 switch (t_alg->algt.type) { in talitos_remove()
3128 crypto_unregister_skcipher(&t_alg->algt.alg.skcipher); in talitos_remove()
3131 crypto_unregister_aead(&t_alg->algt.alg.aead); in talitos_remove()
3134 crypto_unregister_ahash(&t_alg->algt.alg.hash); in talitos_remove()
3137 list_del(&t_alg->entry); in talitos_remove()
3161 struct talitos_crypto_alg *t_alg; in talitos_alg_alloc() local
3164 t_alg = devm_kzalloc(dev, sizeof(struct talitos_crypto_alg), in talitos_alg_alloc()
3166 if (!t_alg) in talitos_alg_alloc()
3169 t_alg->algt = *template; in talitos_alg_alloc()
3171 switch (t_alg->algt.type) { in talitos_alg_alloc()
3173 alg = &t_alg->algt.alg.skcipher.base; in talitos_alg_alloc()
3175 t_alg->algt.alg.skcipher.init = talitos_cra_init_skcipher; in talitos_alg_alloc()
3176 t_alg->algt.alg.skcipher.setkey = in talitos_alg_alloc()
3177 t_alg->algt.alg.skcipher.setkey ?: skcipher_setkey; in talitos_alg_alloc()
3178 t_alg->algt.alg.skcipher.encrypt = skcipher_encrypt; in talitos_alg_alloc()
3179 t_alg->algt.alg.skcipher.decrypt = skcipher_decrypt; in talitos_alg_alloc()
3182 alg = &t_alg->algt.alg.aead.base; in talitos_alg_alloc()
3184 t_alg->algt.alg.aead.init = talitos_cra_init_aead; in talitos_alg_alloc()
3185 t_alg->algt.alg.aead.setkey = t_alg->algt.alg.aead.setkey ?: in talitos_alg_alloc()
3187 t_alg->algt.alg.aead.encrypt = aead_encrypt; in talitos_alg_alloc()
3188 t_alg->algt.alg.aead.decrypt = aead_decrypt; in talitos_alg_alloc()
3191 devm_kfree(dev, t_alg); in talitos_alg_alloc()
3196 alg = &t_alg->algt.alg.hash.halg.base; in talitos_alg_alloc()
3199 t_alg->algt.alg.hash.init = ahash_init; in talitos_alg_alloc()
3200 t_alg->algt.alg.hash.update = ahash_update; in talitos_alg_alloc()
3201 t_alg->algt.alg.hash.final = ahash_final; in talitos_alg_alloc()
3202 t_alg->algt.alg.hash.finup = ahash_finup; in talitos_alg_alloc()
3203 t_alg->algt.alg.hash.digest = ahash_digest; in talitos_alg_alloc()
3205 t_alg->algt.alg.hash.setkey = ahash_setkey; in talitos_alg_alloc()
3206 t_alg->algt.alg.hash.import = ahash_import; in talitos_alg_alloc()
3207 t_alg->algt.alg.hash.export = ahash_export; in talitos_alg_alloc()
3211 devm_kfree(dev, t_alg); in talitos_alg_alloc()
3217 t_alg->algt.alg.hash.init = ahash_init_sha224_swinit; in talitos_alg_alloc()
3218 t_alg->algt.desc_hdr_template = in talitos_alg_alloc()
3225 dev_err(dev, "unknown algorithm type %d\n", t_alg->algt.type); in talitos_alg_alloc()
3226 devm_kfree(dev, t_alg); in talitos_alg_alloc()
3231 if (t_alg->algt.priority) in talitos_alg_alloc()
3232 alg->cra_priority = t_alg->algt.priority; in talitos_alg_alloc()
3242 t_alg->dev = dev; in talitos_alg_alloc()
3244 return t_alg; in talitos_alg_alloc()
3464 struct talitos_crypto_alg *t_alg; in talitos_probe() local
3467 t_alg = talitos_alg_alloc(dev, &driver_algs[i]); in talitos_probe()
3468 if (IS_ERR(t_alg)) { in talitos_probe()
3469 err = PTR_ERR(t_alg); in talitos_probe()
3475 switch (t_alg->algt.type) { in talitos_probe()
3478 &t_alg->algt.alg.skcipher); in talitos_probe()
3479 alg = &t_alg->algt.alg.skcipher.base; in talitos_probe()
3484 &t_alg->algt.alg.aead); in talitos_probe()
3485 alg = &t_alg->algt.alg.aead.base; in talitos_probe()
3490 &t_alg->algt.alg.hash); in talitos_probe()
3491 alg = &t_alg->algt.alg.hash.halg.base; in talitos_probe()
3497 devm_kfree(dev, t_alg); in talitos_probe()
3499 list_add_tail(&t_alg->entry, &priv->alg_list); in talitos_probe()