Lines Matching refs:tmpl
425 struct mv_cesa_op_ctx *tmpl) in mv_cesa_skcipher_req_init() argument
446 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_OP_CRYPT_ONLY, in mv_cesa_skcipher_req_init()
450 ret = mv_cesa_skcipher_dma_req_init(req, tmpl); in mv_cesa_skcipher_req_init()
452 ret = mv_cesa_skcipher_std_req_init(req, tmpl); in mv_cesa_skcipher_req_init()
458 struct mv_cesa_op_ctx *tmpl) in mv_cesa_skcipher_queue_req() argument
467 ret = mv_cesa_skcipher_req_init(req, tmpl); in mv_cesa_skcipher_queue_req()
483 struct mv_cesa_op_ctx *tmpl) in mv_cesa_des_op() argument
487 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTM_DES, in mv_cesa_des_op()
490 memcpy(tmpl->ctx.skcipher.key, ctx->key, DES_KEY_SIZE); in mv_cesa_des_op()
492 return mv_cesa_skcipher_queue_req(req, tmpl); in mv_cesa_des_op()
497 struct mv_cesa_op_ctx tmpl = { }; in mv_cesa_ecb_des_encrypt() local
499 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des_encrypt()
503 return mv_cesa_des_op(req, &tmpl); in mv_cesa_ecb_des_encrypt()
508 struct mv_cesa_op_ctx tmpl = { }; in mv_cesa_ecb_des_decrypt() local
510 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des_decrypt()
514 return mv_cesa_des_op(req, &tmpl); in mv_cesa_ecb_des_decrypt()
539 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_des_op() argument
541 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC, in mv_cesa_cbc_des_op()
544 memcpy(tmpl->ctx.skcipher.iv, req->iv, DES_BLOCK_SIZE); in mv_cesa_cbc_des_op()
546 return mv_cesa_des_op(req, tmpl); in mv_cesa_cbc_des_op()
551 struct mv_cesa_op_ctx tmpl = { }; in mv_cesa_cbc_des_encrypt() local
553 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_ENC); in mv_cesa_cbc_des_encrypt()
555 return mv_cesa_cbc_des_op(req, &tmpl); in mv_cesa_cbc_des_encrypt()
560 struct mv_cesa_op_ctx tmpl = { }; in mv_cesa_cbc_des_decrypt() local
562 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_DEC); in mv_cesa_cbc_des_decrypt()
564 return mv_cesa_cbc_des_op(req, &tmpl); in mv_cesa_cbc_des_decrypt()
590 struct mv_cesa_op_ctx *tmpl) in mv_cesa_des3_op() argument
594 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTM_3DES, in mv_cesa_des3_op()
597 memcpy(tmpl->ctx.skcipher.key, ctx->key, DES3_EDE_KEY_SIZE); in mv_cesa_des3_op()
599 return mv_cesa_skcipher_queue_req(req, tmpl); in mv_cesa_des3_op()
604 struct mv_cesa_op_ctx tmpl = { }; in mv_cesa_ecb_des3_ede_encrypt() local
606 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des3_ede_encrypt()
611 return mv_cesa_des3_op(req, &tmpl); in mv_cesa_ecb_des3_ede_encrypt()
616 struct mv_cesa_op_ctx tmpl = { }; in mv_cesa_ecb_des3_ede_decrypt() local
618 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des3_ede_decrypt()
623 return mv_cesa_des3_op(req, &tmpl); in mv_cesa_ecb_des3_ede_decrypt()
648 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_des3_op() argument
650 memcpy(tmpl->ctx.skcipher.iv, req->iv, DES3_EDE_BLOCK_SIZE); in mv_cesa_cbc_des3_op()
652 return mv_cesa_des3_op(req, tmpl); in mv_cesa_cbc_des3_op()
657 struct mv_cesa_op_ctx tmpl = { }; in mv_cesa_cbc_des3_ede_encrypt() local
659 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_cbc_des3_ede_encrypt()
664 return mv_cesa_cbc_des3_op(req, &tmpl); in mv_cesa_cbc_des3_ede_encrypt()
669 struct mv_cesa_op_ctx tmpl = { }; in mv_cesa_cbc_des3_ede_decrypt() local
671 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_cbc_des3_ede_decrypt()
676 return mv_cesa_cbc_des3_op(req, &tmpl); in mv_cesa_cbc_des3_ede_decrypt()
702 struct mv_cesa_op_ctx *tmpl) in mv_cesa_aes_op() argument
711 if (mv_cesa_get_op_cfg(tmpl) & CESA_SA_DESC_CFG_DIR_DEC) in mv_cesa_aes_op()
717 tmpl->ctx.skcipher.key[i] = cpu_to_le32(key[i]); in mv_cesa_aes_op()
724 mv_cesa_update_op_cfg(tmpl, cfg, in mv_cesa_aes_op()
728 return mv_cesa_skcipher_queue_req(req, tmpl); in mv_cesa_aes_op()
733 struct mv_cesa_op_ctx tmpl = { }; in mv_cesa_ecb_aes_encrypt() local
735 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_aes_encrypt()
739 return mv_cesa_aes_op(req, &tmpl); in mv_cesa_ecb_aes_encrypt()
744 struct mv_cesa_op_ctx tmpl = { }; in mv_cesa_ecb_aes_decrypt() local
746 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_aes_decrypt()
750 return mv_cesa_aes_op(req, &tmpl); in mv_cesa_ecb_aes_decrypt()
775 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_aes_op() argument
777 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC, in mv_cesa_cbc_aes_op()
779 memcpy(tmpl->ctx.skcipher.iv, req->iv, AES_BLOCK_SIZE); in mv_cesa_cbc_aes_op()
781 return mv_cesa_aes_op(req, tmpl); in mv_cesa_cbc_aes_op()
786 struct mv_cesa_op_ctx tmpl = { }; in mv_cesa_cbc_aes_encrypt() local
788 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_ENC); in mv_cesa_cbc_aes_encrypt()
790 return mv_cesa_cbc_aes_op(req, &tmpl); in mv_cesa_cbc_aes_encrypt()
795 struct mv_cesa_op_ctx tmpl = { }; in mv_cesa_cbc_aes_decrypt() local
797 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_DEC); in mv_cesa_cbc_aes_decrypt()
799 return mv_cesa_cbc_aes_op(req, &tmpl); in mv_cesa_cbc_aes_decrypt()