Lines Matching refs:tmpl
411 struct mv_cesa_op_ctx *tmpl) in mv_cesa_skcipher_req_init() argument
432 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_OP_CRYPT_ONLY, in mv_cesa_skcipher_req_init()
436 ret = mv_cesa_skcipher_dma_req_init(req, tmpl); in mv_cesa_skcipher_req_init()
438 ret = mv_cesa_skcipher_std_req_init(req, tmpl); in mv_cesa_skcipher_req_init()
444 struct mv_cesa_op_ctx *tmpl) in mv_cesa_skcipher_queue_req() argument
450 ret = mv_cesa_skcipher_req_init(req, tmpl); in mv_cesa_skcipher_queue_req()
466 struct mv_cesa_op_ctx *tmpl) in mv_cesa_des_op() argument
470 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTM_DES, in mv_cesa_des_op()
473 memcpy(tmpl->ctx.blkcipher.key, ctx->key, DES_KEY_SIZE); in mv_cesa_des_op()
475 return mv_cesa_skcipher_queue_req(req, tmpl); in mv_cesa_des_op()
480 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_des_encrypt() local
482 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des_encrypt()
486 return mv_cesa_des_op(req, &tmpl); in mv_cesa_ecb_des_encrypt()
491 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_des_decrypt() local
493 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des_decrypt()
497 return mv_cesa_des_op(req, &tmpl); in mv_cesa_ecb_des_decrypt()
521 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_des_op() argument
523 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC, in mv_cesa_cbc_des_op()
526 memcpy(tmpl->ctx.blkcipher.iv, req->iv, DES_BLOCK_SIZE); in mv_cesa_cbc_des_op()
528 return mv_cesa_des_op(req, tmpl); in mv_cesa_cbc_des_op()
533 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des_encrypt() local
535 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_ENC); in mv_cesa_cbc_des_encrypt()
537 return mv_cesa_cbc_des_op(req, &tmpl); in mv_cesa_cbc_des_encrypt()
542 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des_decrypt() local
544 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_DEC); in mv_cesa_cbc_des_decrypt()
546 return mv_cesa_cbc_des_op(req, &tmpl); in mv_cesa_cbc_des_decrypt()
571 struct mv_cesa_op_ctx *tmpl) in mv_cesa_des3_op() argument
575 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTM_3DES, in mv_cesa_des3_op()
578 memcpy(tmpl->ctx.blkcipher.key, ctx->key, DES3_EDE_KEY_SIZE); in mv_cesa_des3_op()
580 return mv_cesa_skcipher_queue_req(req, tmpl); in mv_cesa_des3_op()
585 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_des3_ede_encrypt() local
587 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des3_ede_encrypt()
592 return mv_cesa_des3_op(req, &tmpl); in mv_cesa_ecb_des3_ede_encrypt()
597 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_des3_ede_decrypt() local
599 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des3_ede_decrypt()
604 return mv_cesa_des3_op(req, &tmpl); in mv_cesa_ecb_des3_ede_decrypt()
629 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_des3_op() argument
631 memcpy(tmpl->ctx.blkcipher.iv, req->iv, DES3_EDE_BLOCK_SIZE); in mv_cesa_cbc_des3_op()
633 return mv_cesa_des3_op(req, tmpl); in mv_cesa_cbc_des3_op()
638 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des3_ede_encrypt() local
640 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_cbc_des3_ede_encrypt()
645 return mv_cesa_cbc_des3_op(req, &tmpl); in mv_cesa_cbc_des3_ede_encrypt()
650 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des3_ede_decrypt() local
652 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_cbc_des3_ede_decrypt()
657 return mv_cesa_cbc_des3_op(req, &tmpl); in mv_cesa_cbc_des3_ede_decrypt()
682 struct mv_cesa_op_ctx *tmpl) in mv_cesa_aes_op() argument
691 if (mv_cesa_get_op_cfg(tmpl) & CESA_SA_DESC_CFG_DIR_DEC) in mv_cesa_aes_op()
697 tmpl->ctx.blkcipher.key[i] = cpu_to_le32(key[i]); in mv_cesa_aes_op()
704 mv_cesa_update_op_cfg(tmpl, cfg, in mv_cesa_aes_op()
708 return mv_cesa_skcipher_queue_req(req, tmpl); in mv_cesa_aes_op()
713 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_aes_encrypt() local
715 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_aes_encrypt()
719 return mv_cesa_aes_op(req, &tmpl); in mv_cesa_ecb_aes_encrypt()
724 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_aes_decrypt() local
726 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_aes_decrypt()
730 return mv_cesa_aes_op(req, &tmpl); in mv_cesa_ecb_aes_decrypt()
754 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_aes_op() argument
756 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC, in mv_cesa_cbc_aes_op()
758 memcpy(tmpl->ctx.blkcipher.iv, req->iv, AES_BLOCK_SIZE); in mv_cesa_cbc_aes_op()
760 return mv_cesa_aes_op(req, tmpl); in mv_cesa_cbc_aes_op()
765 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_aes_encrypt() local
767 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_ENC); in mv_cesa_cbc_aes_encrypt()
769 return mv_cesa_cbc_aes_op(req, &tmpl); in mv_cesa_cbc_aes_encrypt()
774 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_aes_decrypt() local
776 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_DEC); in mv_cesa_cbc_aes_decrypt()
778 return mv_cesa_cbc_aes_op(req, &tmpl); in mv_cesa_cbc_aes_decrypt()