Lines Matching refs:rctx
235 struct qce_sha_reqctx *rctx = ahash_request_ctx(req); in qce_setup_regs_ahash() local
246 if (!rctx->last_blk && req->nbytes % blocksize) in qce_setup_regs_ahash()
251 if (IS_CMAC(rctx->flags)) { in qce_setup_regs_ahash()
259 auth_cfg = qce_auth_cfg(rctx->flags, rctx->authklen); in qce_setup_regs_ahash()
262 if (IS_SHA_HMAC(rctx->flags) || IS_CMAC(rctx->flags)) { in qce_setup_regs_ahash()
263 u32 authkey_words = rctx->authklen / sizeof(u32); in qce_setup_regs_ahash()
265 qce_cpu_to_be32p_array(mackey, rctx->authkey, rctx->authklen); in qce_setup_regs_ahash()
270 if (IS_CMAC(rctx->flags)) in qce_setup_regs_ahash()
273 if (rctx->first_blk) in qce_setup_regs_ahash()
274 memcpy(auth, rctx->digest, digestsize); in qce_setup_regs_ahash()
276 qce_cpu_to_be32p_array(auth, rctx->digest, digestsize); in qce_setup_regs_ahash()
278 iv_words = (IS_SHA1(rctx->flags) || IS_SHA1_HMAC(rctx->flags)) ? 5 : 8; in qce_setup_regs_ahash()
281 if (rctx->first_blk) in qce_setup_regs_ahash()
285 (u32 *)rctx->byte_count, 2); in qce_setup_regs_ahash()
287 auth_cfg = qce_auth_cfg(rctx->flags, 0); in qce_setup_regs_ahash()
289 if (rctx->last_blk) in qce_setup_regs_ahash()
294 if (rctx->first_blk) in qce_setup_regs_ahash()
319 struct qce_cipher_reqctx *rctx = ablkcipher_request_ctx(req); in qce_setup_regs_ablkcipher() local
328 unsigned int ivsize = rctx->ivsize; in qce_setup_regs_ablkcipher()
329 unsigned long flags = rctx->flags; in qce_setup_regs_ablkcipher()
354 rctx->cryptlen); in qce_setup_regs_ablkcipher()
364 qce_xts_swapiv(enciv, rctx->iv, ivsize); in qce_setup_regs_ablkcipher()
366 qce_cpu_to_be32p_array(enciv, rctx->iv, ivsize); in qce_setup_regs_ablkcipher()
375 qce_write(qce, REG_ENCR_SEG_SIZE, rctx->cryptlen); in qce_setup_regs_ablkcipher()