Lines Matching refs:ctx

227 	struct stm32_hash_ctx *ctx = crypto_ahash_ctx(tfm);
229 int keylen = ctx->keylen;
230 void *key = ctx->key;
255 struct stm32_hash_ctx *ctx = crypto_ahash_ctx(tfm);
282 if (ctx->keylen > HASH_LONG_KEY)
481 struct stm32_hash_ctx *ctx = crypto_ahash_ctx(tfm);
484 if (ctx->keylen < HASH_DMA_THRESHOLD || (hdev->dma_mode == 1)) {
490 sg_init_one(&rctx->sg_key, ctx->key,
491 ALIGN(ctx->keylen, sizeof(u32)));
500 err = stm32_hash_xmit_dma(hdev, &rctx->sg_key, ctx->keylen, 0);
635 static struct stm32_hash_dev *stm32_hash_find_dev(struct stm32_hash_ctx *ctx)
640 if (!ctx->hdev) {
645 ctx->hdev = hdev;
647 hdev = ctx->hdev;
658 struct stm32_hash_ctx *ctx = crypto_ahash_ctx(crypto_ahash_reqtfm(req));
659 struct stm32_hash_dev *hdev = stm32_hash_find_dev(ctx);
684 struct stm32_hash_ctx *ctx = crypto_ahash_ctx(tfm);
686 struct stm32_hash_dev *hdev = stm32_hash_find_dev(ctx);
718 if (ctx->flags & HASH_FLAGS_HMAC)
841 struct stm32_hash_ctx *ctx = crypto_ahash_ctx(crypto_ahash_reqtfm(req));
842 struct stm32_hash_dev *hdev = stm32_hash_find_dev(ctx);
862 struct stm32_hash_ctx *ctx = crypto_ahash_ctx(crypto_ahash_reqtfm(req));
863 struct stm32_hash_dev *hdev = stm32_hash_find_dev(ctx);
889 struct stm32_hash_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
890 struct stm32_hash_dev *hdev = ctx->hdev;
928 struct stm32_hash_ctx *ctx = crypto_ahash_ctx(crypto_ahash_reqtfm(req));
929 struct stm32_hash_dev *hdev = stm32_hash_find_dev(ctx);
959 struct stm32_hash_ctx *ctx = crypto_ahash_ctx(crypto_ahash_reqtfm(req));
960 struct stm32_hash_dev *hdev = stm32_hash_find_dev(ctx);
992 struct stm32_hash_ctx *ctx = crypto_ahash_ctx(crypto_ahash_reqtfm(req));
993 struct stm32_hash_dev *hdev = stm32_hash_find_dev(ctx);
1024 struct stm32_hash_ctx *ctx = crypto_ahash_ctx(tfm);
1027 memcpy(ctx->key, key, keylen);
1028 ctx->keylen = keylen;
1039 struct stm32_hash_ctx *ctx = crypto_tfm_ctx(tfm);
1044 ctx->keylen = 0;
1047 ctx->flags |= HASH_FLAGS_HMAC;
1049 ctx->enginectx.op.do_one_request = stm32_hash_one_request;
1050 ctx->enginectx.op.prepare_request = stm32_hash_prepare_req;
1051 ctx->enginectx.op.unprepare_request = NULL;