Lines Matching refs:nx_ctx
38 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(tfm); in ctr_aes_nx_set_key() local
39 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in ctr_aes_nx_set_key()
41 nx_ctx_init(nx_ctx, HCOP_FC_AES); in ctr_aes_nx_set_key()
46 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_128]; in ctr_aes_nx_set_key()
50 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_192]; in ctr_aes_nx_set_key()
54 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_256]; in ctr_aes_nx_set_key()
70 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(tfm); in ctr3686_aes_nx_set_key() local
75 memcpy(nx_ctx->priv.ctr.nonce, in ctr3686_aes_nx_set_key()
89 struct nx_crypto_ctx *nx_ctx = crypto_blkcipher_ctx(desc->tfm); in ctr_aes_nx_crypt() local
90 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in ctr_aes_nx_crypt()
95 spin_lock_irqsave(&nx_ctx->lock, irq_flags); in ctr_aes_nx_crypt()
100 rc = nx_build_sg_lists(nx_ctx, desc, dst, src, &to_process, in ctr_aes_nx_crypt()
105 if (!nx_ctx->op.inlen || !nx_ctx->op.outlen) { in ctr_aes_nx_crypt()
110 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op, in ctr_aes_nx_crypt()
117 atomic_inc(&(nx_ctx->stats->aes_ops)); in ctr_aes_nx_crypt()
119 &(nx_ctx->stats->aes_bytes)); in ctr_aes_nx_crypt()
124 spin_unlock_irqrestore(&nx_ctx->lock, irq_flags); in ctr_aes_nx_crypt()
133 struct nx_crypto_ctx *nx_ctx = crypto_blkcipher_ctx(desc->tfm); in ctr3686_aes_nx_crypt() local
136 memcpy(iv, nx_ctx->priv.ctr.nonce, CTR_RFC3686_IV_SIZE); in ctr3686_aes_nx_crypt()