Lines Matching refs:t_alg
2686 struct talitos_crypto_alg *t_alg, *n; in talitos_remove() local
2689 list_for_each_entry_safe(t_alg, n, &priv->alg_list, entry) { in talitos_remove()
2690 switch (t_alg->algt.type) { in talitos_remove()
2694 crypto_unregister_aead(&t_alg->algt.alg.aead); in talitos_remove()
2696 crypto_unregister_ahash(&t_alg->algt.alg.hash); in talitos_remove()
2699 list_del(&t_alg->entry); in talitos_remove()
2700 kfree(t_alg); in talitos_remove()
2733 struct talitos_crypto_alg *t_alg; in talitos_alg_alloc() local
2736 t_alg = kzalloc(sizeof(struct talitos_crypto_alg), GFP_KERNEL); in talitos_alg_alloc()
2737 if (!t_alg) in talitos_alg_alloc()
2740 t_alg->algt = *template; in talitos_alg_alloc()
2742 switch (t_alg->algt.type) { in talitos_alg_alloc()
2744 alg = &t_alg->algt.alg.crypto; in talitos_alg_alloc()
2753 alg = &t_alg->algt.alg.aead.base; in talitos_alg_alloc()
2754 t_alg->algt.alg.aead.init = talitos_cra_init_aead; in talitos_alg_alloc()
2755 t_alg->algt.alg.aead.setkey = aead_setkey; in talitos_alg_alloc()
2756 t_alg->algt.alg.aead.encrypt = aead_encrypt; in talitos_alg_alloc()
2757 t_alg->algt.alg.aead.decrypt = aead_decrypt; in talitos_alg_alloc()
2760 alg = &t_alg->algt.alg.hash.halg.base; in talitos_alg_alloc()
2763 t_alg->algt.alg.hash.init = ahash_init; in talitos_alg_alloc()
2764 t_alg->algt.alg.hash.update = ahash_update; in talitos_alg_alloc()
2765 t_alg->algt.alg.hash.final = ahash_final; in talitos_alg_alloc()
2766 t_alg->algt.alg.hash.finup = ahash_finup; in talitos_alg_alloc()
2767 t_alg->algt.alg.hash.digest = ahash_digest; in talitos_alg_alloc()
2768 t_alg->algt.alg.hash.setkey = ahash_setkey; in talitos_alg_alloc()
2769 t_alg->algt.alg.hash.import = ahash_import; in talitos_alg_alloc()
2770 t_alg->algt.alg.hash.export = ahash_export; in talitos_alg_alloc()
2774 kfree(t_alg); in talitos_alg_alloc()
2780 t_alg->algt.alg.hash.init = ahash_init_sha224_swinit; in talitos_alg_alloc()
2781 t_alg->algt.desc_hdr_template = in talitos_alg_alloc()
2788 dev_err(dev, "unknown algorithm type %d\n", t_alg->algt.type); in talitos_alg_alloc()
2789 kfree(t_alg); in talitos_alg_alloc()
2799 t_alg->dev = dev; in talitos_alg_alloc()
2801 return t_alg; in talitos_alg_alloc()
3017 struct talitos_crypto_alg *t_alg; in talitos_probe() local
3020 t_alg = talitos_alg_alloc(dev, &driver_algs[i]); in talitos_probe()
3021 if (IS_ERR(t_alg)) { in talitos_probe()
3022 err = PTR_ERR(t_alg); in talitos_probe()
3028 switch (t_alg->algt.type) { in talitos_probe()
3031 &t_alg->algt.alg.crypto); in talitos_probe()
3032 alg = &t_alg->algt.alg.crypto; in talitos_probe()
3037 &t_alg->algt.alg.aead); in talitos_probe()
3038 alg = &t_alg->algt.alg.aead.base; in talitos_probe()
3043 &t_alg->algt.alg.hash); in talitos_probe()
3044 alg = &t_alg->algt.alg.hash.halg.base; in talitos_probe()
3050 kfree(t_alg); in talitos_probe()
3052 list_add_tail(&t_alg->entry, &priv->alg_list); in talitos_probe()