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()
643 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_des3_op() argument
645 memcpy(tmpl->ctx.skcipher.iv, req->iv, DES3_EDE_BLOCK_SIZE); in mv_cesa_cbc_des3_op()
647 return mv_cesa_des3_op(req, tmpl); in mv_cesa_cbc_des3_op()
652 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des3_ede_encrypt() local
654 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_cbc_des3_ede_encrypt()
659 return mv_cesa_cbc_des3_op(req, &tmpl); in mv_cesa_cbc_des3_ede_encrypt()
664 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des3_ede_decrypt() local
666 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_cbc_des3_ede_decrypt()
671 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.skcipher.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()
770 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_aes_op() argument
772 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC, in mv_cesa_cbc_aes_op()
774 memcpy(tmpl->ctx.skcipher.iv, req->iv, AES_BLOCK_SIZE); in mv_cesa_cbc_aes_op()
776 return mv_cesa_aes_op(req, tmpl); in mv_cesa_cbc_aes_op()
781 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_aes_encrypt() local
783 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_ENC); in mv_cesa_cbc_aes_encrypt()
785 return mv_cesa_cbc_aes_op(req, &tmpl); in mv_cesa_cbc_aes_encrypt()
790 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_aes_decrypt() local
792 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_DEC); in mv_cesa_cbc_aes_decrypt()
794 return mv_cesa_cbc_aes_op(req, &tmpl); in mv_cesa_cbc_aes_decrypt()