Lines Matching refs:rctx

227 	struct qce_sha_reqctx *rctx = ahash_request_ctx(req);  in qce_setup_regs_ahash()  local
238 if (!rctx->last_blk && req->nbytes % blocksize) in qce_setup_regs_ahash()
243 if (IS_CMAC(rctx->flags)) { in qce_setup_regs_ahash()
251 auth_cfg = qce_auth_cfg(rctx->flags, rctx->authklen); in qce_setup_regs_ahash()
254 if (IS_SHA_HMAC(rctx->flags) || IS_CMAC(rctx->flags)) { in qce_setup_regs_ahash()
255 u32 authkey_words = rctx->authklen / sizeof(u32); in qce_setup_regs_ahash()
257 qce_cpu_to_be32p_array(mackey, rctx->authkey, rctx->authklen); in qce_setup_regs_ahash()
262 if (IS_CMAC(rctx->flags)) in qce_setup_regs_ahash()
265 if (rctx->first_blk) in qce_setup_regs_ahash()
266 memcpy(auth, rctx->digest, digestsize); in qce_setup_regs_ahash()
268 qce_cpu_to_be32p_array(auth, rctx->digest, digestsize); in qce_setup_regs_ahash()
270 iv_words = (IS_SHA1(rctx->flags) || IS_SHA1_HMAC(rctx->flags)) ? 5 : 8; in qce_setup_regs_ahash()
273 if (rctx->first_blk) in qce_setup_regs_ahash()
277 (u32 *)rctx->byte_count, 2); in qce_setup_regs_ahash()
279 auth_cfg = qce_auth_cfg(rctx->flags, 0); in qce_setup_regs_ahash()
281 if (rctx->last_blk) in qce_setup_regs_ahash()
286 if (rctx->first_blk) in qce_setup_regs_ahash()
311 struct qce_cipher_reqctx *rctx = ablkcipher_request_ctx(req); in qce_setup_regs_ablkcipher() local
320 unsigned int ivsize = rctx->ivsize; in qce_setup_regs_ablkcipher()
321 unsigned long flags = rctx->flags; in qce_setup_regs_ablkcipher()
346 rctx->cryptlen); in qce_setup_regs_ablkcipher()
356 qce_xts_swapiv(enciv, rctx->iv, ivsize); in qce_setup_regs_ablkcipher()
358 qce_cpu_to_be32p_array(enciv, rctx->iv, ivsize); in qce_setup_regs_ablkcipher()
367 qce_write(qce, REG_ENCR_SEG_SIZE, rctx->cryptlen); in qce_setup_regs_ablkcipher()