Lines Matching refs:tmpl

42 	struct qce_alg_template *tmpl = to_ahash_tmpl(async_req->tfm);
43 struct qce_device *qce = tmpl->qce;
72 qce->async_req_done(tmpl->qce, error);
80 struct qce_alg_template *tmpl = to_ahash_tmpl(async_req->tfm);
81 struct qce_device *qce = tmpl->qce;
118 ret = qce_start(async_req, tmpl->crypto_alg_type);
136 struct qce_alg_template *tmpl = to_ahash_tmpl(req->base.tfm);
137 const u32 *std_iv = tmpl->std_iv;
142 rctx->flags = tmpl->alg_flags;
187 struct qce_alg_template *tmpl = to_ahash_tmpl(req->base.tfm);
188 struct qce_device *qce = tmpl->qce;
273 return qce->async_req_enqueue(tmpl->qce, &req->base);
279 struct qce_alg_template *tmpl = to_ahash_tmpl(req->base.tfm);
280 struct qce_device *qce = tmpl->qce;
283 if (tmpl->hash_zero)
284 memcpy(req->result, tmpl->hash_zero,
285 tmpl->alg.ahash.halg.digestsize);
300 return qce->async_req_enqueue(tmpl->qce, &req->base);
306 struct qce_alg_template *tmpl = to_ahash_tmpl(req->base.tfm);
307 struct qce_device *qce = tmpl->qce;
320 if (tmpl->hash_zero)
321 memcpy(req->result, tmpl->hash_zero,
322 tmpl->alg.ahash.halg.digestsize);
326 return qce->async_req_enqueue(tmpl->qce, &req->base);
455 struct qce_alg_template *tmpl;
460 tmpl = kzalloc(sizeof(*tmpl), GFP_KERNEL);
461 if (!tmpl)
464 tmpl->std_iv = def->std_iv;
466 alg = &tmpl->alg.ahash;
479 tmpl->hash_zero = sha1_zero_message_hash;
481 tmpl->hash_zero = sha256_zero_message_hash;
496 INIT_LIST_HEAD(&tmpl->entry);
497 tmpl->crypto_alg_type = CRYPTO_ALG_TYPE_AHASH;
498 tmpl->alg_flags = def->flags;
499 tmpl->qce = qce;
504 kfree(tmpl);
508 list_add_tail(&tmpl->entry, &ahash_algs);
515 struct qce_alg_template *tmpl, *n;
517 list_for_each_entry_safe(tmpl, n, &ahash_algs, entry) {
518 crypto_unregister_ahash(&tmpl->alg.ahash);
519 list_del(&tmpl->entry);
520 kfree(tmpl);