Lines Matching refs:rctx

147 	struct qce_sha_reqctx *rctx = ahash_request_ctx(req);  in qce_setup_regs_ahash()  local
158 if (!rctx->last_blk && req->nbytes % blocksize) in qce_setup_regs_ahash()
163 if (IS_CMAC(rctx->flags)) { in qce_setup_regs_ahash()
171 auth_cfg = qce_auth_cfg(rctx->flags, rctx->authklen); in qce_setup_regs_ahash()
174 if (IS_SHA_HMAC(rctx->flags) || IS_CMAC(rctx->flags)) { in qce_setup_regs_ahash()
175 u32 authkey_words = rctx->authklen / sizeof(u32); in qce_setup_regs_ahash()
177 qce_cpu_to_be32p_array(mackey, rctx->authkey, rctx->authklen); in qce_setup_regs_ahash()
182 if (IS_CMAC(rctx->flags)) in qce_setup_regs_ahash()
185 if (rctx->first_blk) in qce_setup_regs_ahash()
186 memcpy(auth, rctx->digest, digestsize); in qce_setup_regs_ahash()
188 qce_cpu_to_be32p_array(auth, rctx->digest, digestsize); in qce_setup_regs_ahash()
190 iv_words = (IS_SHA1(rctx->flags) || IS_SHA1_HMAC(rctx->flags)) ? 5 : 8; in qce_setup_regs_ahash()
193 if (rctx->first_blk) in qce_setup_regs_ahash()
197 (u32 *)rctx->byte_count, 2); in qce_setup_regs_ahash()
199 auth_cfg = qce_auth_cfg(rctx->flags, 0); in qce_setup_regs_ahash()
201 if (rctx->last_blk) in qce_setup_regs_ahash()
206 if (rctx->first_blk) in qce_setup_regs_ahash()
312 struct qce_cipher_reqctx *rctx = skcipher_request_ctx(req); in qce_setup_regs_skcipher() local
321 unsigned int ivsize = rctx->ivsize; in qce_setup_regs_skcipher()
322 unsigned long flags = rctx->flags; in qce_setup_regs_skcipher()
347 rctx->cryptlen); in qce_setup_regs_skcipher()
357 qce_xts_swapiv(enciv, rctx->iv, ivsize); in qce_setup_regs_skcipher()
359 qce_cpu_to_be32p_array(enciv, rctx->iv, ivsize); in qce_setup_regs_skcipher()
368 qce_write(qce, REG_ENCR_SEG_SIZE, rctx->cryptlen); in qce_setup_regs_skcipher()