Lines Matching refs:tmpl

426 				     struct mv_cesa_op_ctx *tmpl)  in mv_cesa_skcipher_req_init()  argument
447 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_OP_CRYPT_ONLY, in mv_cesa_skcipher_req_init()
451 ret = mv_cesa_skcipher_dma_req_init(req, tmpl); in mv_cesa_skcipher_req_init()
453 ret = mv_cesa_skcipher_std_req_init(req, tmpl); in mv_cesa_skcipher_req_init()
459 struct mv_cesa_op_ctx *tmpl) in mv_cesa_skcipher_queue_req() argument
465 ret = mv_cesa_skcipher_req_init(req, tmpl); in mv_cesa_skcipher_queue_req()
481 struct mv_cesa_op_ctx *tmpl) in mv_cesa_des_op() argument
485 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTM_DES, in mv_cesa_des_op()
488 memcpy(tmpl->ctx.blkcipher.key, ctx->key, DES_KEY_SIZE); in mv_cesa_des_op()
490 return mv_cesa_skcipher_queue_req(req, tmpl); in mv_cesa_des_op()
495 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_des_encrypt() local
497 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des_encrypt()
501 return mv_cesa_des_op(req, &tmpl); in mv_cesa_ecb_des_encrypt()
506 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_des_decrypt() local
508 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des_decrypt()
512 return mv_cesa_des_op(req, &tmpl); in mv_cesa_ecb_des_decrypt()
536 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_des_op() argument
538 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC, in mv_cesa_cbc_des_op()
541 memcpy(tmpl->ctx.blkcipher.iv, req->iv, DES_BLOCK_SIZE); in mv_cesa_cbc_des_op()
543 return mv_cesa_des_op(req, tmpl); in mv_cesa_cbc_des_op()
548 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des_encrypt() local
550 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_ENC); in mv_cesa_cbc_des_encrypt()
552 return mv_cesa_cbc_des_op(req, &tmpl); in mv_cesa_cbc_des_encrypt()
557 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des_decrypt() local
559 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_DEC); in mv_cesa_cbc_des_decrypt()
561 return mv_cesa_cbc_des_op(req, &tmpl); in mv_cesa_cbc_des_decrypt()
586 struct mv_cesa_op_ctx *tmpl) in mv_cesa_des3_op() argument
590 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTM_3DES, in mv_cesa_des3_op()
593 memcpy(tmpl->ctx.blkcipher.key, ctx->key, DES3_EDE_KEY_SIZE); in mv_cesa_des3_op()
595 return mv_cesa_skcipher_queue_req(req, tmpl); in mv_cesa_des3_op()
600 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_des3_ede_encrypt() local
602 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des3_ede_encrypt()
607 return mv_cesa_des3_op(req, &tmpl); in mv_cesa_ecb_des3_ede_encrypt()
612 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_des3_ede_decrypt() local
614 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des3_ede_decrypt()
619 return mv_cesa_des3_op(req, &tmpl); in mv_cesa_ecb_des3_ede_decrypt()
644 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_des3_op() argument
646 memcpy(tmpl->ctx.blkcipher.iv, req->iv, DES3_EDE_BLOCK_SIZE); in mv_cesa_cbc_des3_op()
648 return mv_cesa_des3_op(req, tmpl); in mv_cesa_cbc_des3_op()
653 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des3_ede_encrypt() local
655 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_cbc_des3_ede_encrypt()
660 return mv_cesa_cbc_des3_op(req, &tmpl); in mv_cesa_cbc_des3_ede_encrypt()
665 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des3_ede_decrypt() local
667 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_cbc_des3_ede_decrypt()
672 return mv_cesa_cbc_des3_op(req, &tmpl); in mv_cesa_cbc_des3_ede_decrypt()
697 struct mv_cesa_op_ctx *tmpl) in mv_cesa_aes_op() argument
706 if (mv_cesa_get_op_cfg(tmpl) & CESA_SA_DESC_CFG_DIR_DEC) in mv_cesa_aes_op()
712 tmpl->ctx.blkcipher.key[i] = cpu_to_le32(key[i]); in mv_cesa_aes_op()
719 mv_cesa_update_op_cfg(tmpl, cfg, in mv_cesa_aes_op()
723 return mv_cesa_skcipher_queue_req(req, tmpl); in mv_cesa_aes_op()
728 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_aes_encrypt() local
730 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_aes_encrypt()
734 return mv_cesa_aes_op(req, &tmpl); in mv_cesa_ecb_aes_encrypt()
739 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_aes_decrypt() local
741 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_aes_decrypt()
745 return mv_cesa_aes_op(req, &tmpl); in mv_cesa_ecb_aes_decrypt()
769 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_aes_op() argument
771 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC, in mv_cesa_cbc_aes_op()
773 memcpy(tmpl->ctx.blkcipher.iv, req->iv, AES_BLOCK_SIZE); in mv_cesa_cbc_aes_op()
775 return mv_cesa_aes_op(req, tmpl); in mv_cesa_cbc_aes_op()
780 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_aes_encrypt() local
782 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_ENC); in mv_cesa_cbc_aes_encrypt()
784 return mv_cesa_cbc_aes_op(req, &tmpl); in mv_cesa_cbc_aes_encrypt()
789 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_aes_decrypt() local
791 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_DEC); in mv_cesa_cbc_aes_decrypt()
793 return mv_cesa_cbc_aes_op(req, &tmpl); in mv_cesa_cbc_aes_decrypt()