Lines Matching refs:tmpl

423 				     struct mv_cesa_op_ctx *tmpl)  in mv_cesa_skcipher_req_init()  argument
444 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_OP_CRYPT_ONLY, in mv_cesa_skcipher_req_init()
448 ret = mv_cesa_skcipher_dma_req_init(req, tmpl); in mv_cesa_skcipher_req_init()
450 ret = mv_cesa_skcipher_std_req_init(req, tmpl); in mv_cesa_skcipher_req_init()
456 struct mv_cesa_op_ctx *tmpl) in mv_cesa_skcipher_queue_req() argument
462 ret = mv_cesa_skcipher_req_init(req, tmpl); in mv_cesa_skcipher_queue_req()
478 struct mv_cesa_op_ctx *tmpl) in mv_cesa_des_op() argument
482 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTM_DES, in mv_cesa_des_op()
485 memcpy(tmpl->ctx.skcipher.key, ctx->key, DES_KEY_SIZE); in mv_cesa_des_op()
487 return mv_cesa_skcipher_queue_req(req, tmpl); in mv_cesa_des_op()
492 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_des_encrypt() local
494 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des_encrypt()
498 return mv_cesa_des_op(req, &tmpl); in mv_cesa_ecb_des_encrypt()
503 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_des_decrypt() local
505 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des_decrypt()
509 return mv_cesa_des_op(req, &tmpl); in mv_cesa_ecb_des_decrypt()
534 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_des_op() argument
536 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC, in mv_cesa_cbc_des_op()
539 memcpy(tmpl->ctx.skcipher.iv, req->iv, DES_BLOCK_SIZE); in mv_cesa_cbc_des_op()
541 return mv_cesa_des_op(req, tmpl); in mv_cesa_cbc_des_op()
546 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des_encrypt() local
548 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_ENC); in mv_cesa_cbc_des_encrypt()
550 return mv_cesa_cbc_des_op(req, &tmpl); in mv_cesa_cbc_des_encrypt()
555 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des_decrypt() local
557 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_DEC); in mv_cesa_cbc_des_decrypt()
559 return mv_cesa_cbc_des_op(req, &tmpl); in mv_cesa_cbc_des_decrypt()
585 struct mv_cesa_op_ctx *tmpl) in mv_cesa_des3_op() argument
589 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTM_3DES, in mv_cesa_des3_op()
592 memcpy(tmpl->ctx.skcipher.key, ctx->key, DES3_EDE_KEY_SIZE); in mv_cesa_des3_op()
594 return mv_cesa_skcipher_queue_req(req, tmpl); in mv_cesa_des3_op()
599 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_des3_ede_encrypt() local
601 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des3_ede_encrypt()
606 return mv_cesa_des3_op(req, &tmpl); in mv_cesa_ecb_des3_ede_encrypt()
611 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_des3_ede_decrypt() local
613 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des3_ede_decrypt()
618 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.skcipher.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()
698 struct mv_cesa_op_ctx *tmpl) in mv_cesa_aes_op() argument
707 if (mv_cesa_get_op_cfg(tmpl) & CESA_SA_DESC_CFG_DIR_DEC) in mv_cesa_aes_op()
713 tmpl->ctx.skcipher.key[i] = cpu_to_le32(key[i]); in mv_cesa_aes_op()
720 mv_cesa_update_op_cfg(tmpl, cfg, in mv_cesa_aes_op()
724 return mv_cesa_skcipher_queue_req(req, tmpl); in mv_cesa_aes_op()
729 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_aes_encrypt() local
731 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_aes_encrypt()
735 return mv_cesa_aes_op(req, &tmpl); in mv_cesa_ecb_aes_encrypt()
740 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_aes_decrypt() local
742 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_aes_decrypt()
746 return mv_cesa_aes_op(req, &tmpl); in mv_cesa_ecb_aes_decrypt()
771 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_aes_op() argument
773 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC, in mv_cesa_cbc_aes_op()
775 memcpy(tmpl->ctx.skcipher.iv, req->iv, AES_BLOCK_SIZE); in mv_cesa_cbc_aes_op()
777 return mv_cesa_aes_op(req, tmpl); in mv_cesa_cbc_aes_op()
782 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_aes_encrypt() local
784 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_ENC); in mv_cesa_cbc_aes_encrypt()
786 return mv_cesa_cbc_aes_op(req, &tmpl); in mv_cesa_cbc_aes_encrypt()
791 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_aes_decrypt() local
793 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_DEC); in mv_cesa_cbc_aes_decrypt()
795 return mv_cesa_cbc_aes_op(req, &tmpl); in mv_cesa_cbc_aes_decrypt()