Lines Matching defs:rctx

93 	struct sun8i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
108 skcipher_request_set_tfm(&rctx->fallback_req, op->fallback_tfm);
109 skcipher_request_set_callback(&rctx->fallback_req, areq->base.flags,
111 skcipher_request_set_crypt(&rctx->fallback_req, areq->src, areq->dst,
113 if (rctx->op_dir & SS_DECRYPTION)
114 err = crypto_skcipher_decrypt(&rctx->fallback_req);
116 err = crypto_skcipher_encrypt(&rctx->fallback_req);
125 struct sun8i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
130 struct sun8i_ss_flow *sf = &ss->flows[rctx->flow];
135 rctx->ivlen = ivsize;
136 if (rctx->op_dir & SS_DECRYPTION) {
157 rctx->p_iv[i] = a;
159 if (rctx->op_dir == SS_ENCRYPTION)
168 rctx->niv = i;
176 dma_unmap_single(ss->dev, rctx->p_iv[i], ivsize, DMA_TO_DEVICE);
188 struct sun8i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
191 struct sun8i_ss_flow *sf = &ss->flows[rctx->flow];
206 rctx->op_dir, areq->iv, crypto_skcipher_ivsize(tfm),
213 rctx->op_mode = ss->variant->op_mode[algt->ss_blockmode];
214 rctx->method = ss->variant->alg_cipher[algt->ss_algo_id];
215 rctx->keylen = op->keylen;
217 rctx->p_key = dma_map_single(ss->dev, op->key, op->keylen, DMA_TO_DEVICE);
218 if (dma_mapping_error(ss->dev, rctx->p_key)) {
259 rctx->t_src[i].addr = sg_dma_address(sg);
261 rctx->t_src[i].len = todo / 4;
263 areq->cryptlen, i, rctx->t_src[i].len, sg->offset, todo);
281 rctx->t_dst[i].addr = sg_dma_address(sg);
283 rctx->t_dst[i].len = todo / 4;
285 areq->cryptlen, i, rctx->t_dst[i].len, sg->offset, todo);
297 err = sun8i_ss_run_task(ss, rctx, crypto_tfm_alg_name(areq->base.tfm));
309 for (i = 0; i < rctx->niv; i++) {
310 dma_unmap_single(ss->dev, rctx->p_iv[i], ivsize, DMA_TO_DEVICE);
315 if (rctx->op_dir & SS_DECRYPTION) {
325 dma_unmap_single(ss->dev, rctx->p_key, op->keylen, DMA_TO_DEVICE);
349 struct sun8i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
353 memset(rctx, 0, sizeof(struct sun8i_cipher_req_ctx));
354 rctx->op_dir = SS_DECRYPTION;
361 rctx->flow = e;
370 struct sun8i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
374 memset(rctx, 0, sizeof(struct sun8i_cipher_req_ctx));
375 rctx->op_dir = SS_ENCRYPTION;
382 rctx->flow = e;