Lines Matching refs:tmpl
393 struct mv_cesa_op_ctx *tmpl) in mv_cesa_ablkcipher_req_init() argument
406 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_OP_CRYPT_ONLY, in mv_cesa_ablkcipher_req_init()
411 ret = mv_cesa_ablkcipher_dma_req_init(req, tmpl); in mv_cesa_ablkcipher_req_init()
413 ret = mv_cesa_ablkcipher_std_req_init(req, tmpl); in mv_cesa_ablkcipher_req_init()
419 struct mv_cesa_op_ctx *tmpl) in mv_cesa_des_op() argument
424 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTM_DES, in mv_cesa_des_op()
427 memcpy(tmpl->ctx.blkcipher.key, ctx->key, DES_KEY_SIZE); in mv_cesa_des_op()
429 ret = mv_cesa_ablkcipher_req_init(req, tmpl); in mv_cesa_des_op()
442 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_des_encrypt() local
444 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des_encrypt()
448 return mv_cesa_des_op(req, &tmpl); in mv_cesa_ecb_des_encrypt()
453 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_des_decrypt() local
455 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des_decrypt()
459 return mv_cesa_des_op(req, &tmpl); in mv_cesa_ecb_des_decrypt()
486 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_des_op() argument
488 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC, in mv_cesa_cbc_des_op()
491 memcpy(tmpl->ctx.blkcipher.iv, req->info, DES_BLOCK_SIZE); in mv_cesa_cbc_des_op()
493 return mv_cesa_des_op(req, tmpl); in mv_cesa_cbc_des_op()
498 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des_encrypt() local
500 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_ENC); in mv_cesa_cbc_des_encrypt()
502 return mv_cesa_cbc_des_op(req, &tmpl); in mv_cesa_cbc_des_encrypt()
507 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des_decrypt() local
509 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_DEC); in mv_cesa_cbc_des_decrypt()
511 return mv_cesa_cbc_des_op(req, &tmpl); in mv_cesa_cbc_des_decrypt()
539 struct mv_cesa_op_ctx *tmpl) in mv_cesa_des3_op() argument
544 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTM_3DES, in mv_cesa_des3_op()
547 memcpy(tmpl->ctx.blkcipher.key, ctx->key, DES3_EDE_KEY_SIZE); in mv_cesa_des3_op()
549 ret = mv_cesa_ablkcipher_req_init(req, tmpl); in mv_cesa_des3_op()
562 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_des3_ede_encrypt() local
564 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des3_ede_encrypt()
569 return mv_cesa_des3_op(req, &tmpl); in mv_cesa_ecb_des3_ede_encrypt()
574 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_des3_ede_decrypt() local
576 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des3_ede_decrypt()
581 return mv_cesa_des3_op(req, &tmpl); in mv_cesa_ecb_des3_ede_decrypt()
609 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_des3_op() argument
611 memcpy(tmpl->ctx.blkcipher.iv, req->info, DES3_EDE_BLOCK_SIZE); in mv_cesa_cbc_des3_op()
613 return mv_cesa_des3_op(req, tmpl); in mv_cesa_cbc_des3_op()
618 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des3_ede_encrypt() local
620 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_cbc_des3_ede_encrypt()
625 return mv_cesa_cbc_des3_op(req, &tmpl); in mv_cesa_cbc_des3_ede_encrypt()
630 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des3_ede_decrypt() local
632 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_cbc_des3_ede_decrypt()
637 return mv_cesa_cbc_des3_op(req, &tmpl); in mv_cesa_cbc_des3_ede_decrypt()
665 struct mv_cesa_op_ctx *tmpl) in mv_cesa_aes_op() argument
674 if (mv_cesa_get_op_cfg(tmpl) & CESA_SA_DESC_CFG_DIR_DEC) in mv_cesa_aes_op()
680 tmpl->ctx.blkcipher.key[i] = cpu_to_le32(key[i]); in mv_cesa_aes_op()
687 mv_cesa_update_op_cfg(tmpl, cfg, in mv_cesa_aes_op()
691 ret = mv_cesa_ablkcipher_req_init(req, tmpl); in mv_cesa_aes_op()
704 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_aes_encrypt() local
706 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_aes_encrypt()
710 return mv_cesa_aes_op(req, &tmpl); in mv_cesa_ecb_aes_encrypt()
715 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_aes_decrypt() local
717 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_aes_decrypt()
721 return mv_cesa_aes_op(req, &tmpl); in mv_cesa_ecb_aes_decrypt()
748 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_aes_op() argument
750 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC, in mv_cesa_cbc_aes_op()
752 memcpy(tmpl->ctx.blkcipher.iv, req->info, AES_BLOCK_SIZE); in mv_cesa_cbc_aes_op()
754 return mv_cesa_aes_op(req, tmpl); in mv_cesa_cbc_aes_op()
759 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_aes_encrypt() local
761 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_ENC); in mv_cesa_cbc_aes_encrypt()
763 return mv_cesa_cbc_aes_op(req, &tmpl); in mv_cesa_cbc_aes_encrypt()
768 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_aes_decrypt() local
770 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_DEC); in mv_cesa_cbc_aes_decrypt()
772 return mv_cesa_cbc_aes_op(req, &tmpl); in mv_cesa_cbc_aes_decrypt()