Lines Matching refs:tmpl

36 	struct qce_alg_template *tmpl = to_ahash_tmpl(async_req->tfm);
37 struct qce_device *qce = tmpl->qce;
66 qce->async_req_done(tmpl->qce, error);
74 struct qce_alg_template *tmpl = to_ahash_tmpl(async_req->tfm);
75 struct qce_device *qce = tmpl->qce;
110 ret = qce_start(async_req, tmpl->crypto_alg_type, 0, 0);
128 struct qce_alg_template *tmpl = to_ahash_tmpl(req->base.tfm);
129 const u32 *std_iv = tmpl->std_iv;
134 rctx->flags = tmpl->alg_flags;
239 struct qce_alg_template *tmpl = to_ahash_tmpl(req->base.tfm);
240 struct qce_device *qce = tmpl->qce;
306 return qce->async_req_enqueue(tmpl->qce, &req->base);
312 struct qce_alg_template *tmpl = to_ahash_tmpl(req->base.tfm);
313 struct qce_device *qce = tmpl->qce;
316 if (tmpl->hash_zero)
317 memcpy(req->result, tmpl->hash_zero,
318 tmpl->alg.ahash.halg.digestsize);
333 return qce->async_req_enqueue(tmpl->qce, &req->base);
339 struct qce_alg_template *tmpl = to_ahash_tmpl(req->base.tfm);
340 struct qce_device *qce = tmpl->qce;
353 if (tmpl->hash_zero)
354 memcpy(req->result, tmpl->hash_zero,
355 tmpl->alg.ahash.halg.digestsize);
359 return qce->async_req_enqueue(tmpl->qce, &req->base);
488 struct qce_alg_template *tmpl;
493 tmpl = kzalloc(sizeof(*tmpl), GFP_KERNEL);
494 if (!tmpl)
497 tmpl->std_iv = def->std_iv;
499 alg = &tmpl->alg.ahash;
512 tmpl->hash_zero = sha1_zero_message_hash;
514 tmpl->hash_zero = sha256_zero_message_hash;
529 INIT_LIST_HEAD(&tmpl->entry);
530 tmpl->crypto_alg_type = CRYPTO_ALG_TYPE_AHASH;
531 tmpl->alg_flags = def->flags;
532 tmpl->qce = qce;
537 kfree(tmpl);
541 list_add_tail(&tmpl->entry, &ahash_algs);
548 struct qce_alg_template *tmpl, *n;
550 list_for_each_entry_safe(tmpl, n, &ahash_algs, entry) {
551 crypto_unregister_ahash(&tmpl->alg.ahash);
552 list_del(&tmpl->entry);
553 kfree(tmpl);