Lines Matching refs:tmpl

413 				     struct mv_cesa_op_ctx *tmpl)  in mv_cesa_skcipher_req_init()  argument
434 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_OP_CRYPT_ONLY, in mv_cesa_skcipher_req_init()
438 ret = mv_cesa_skcipher_dma_req_init(req, tmpl); in mv_cesa_skcipher_req_init()
440 ret = mv_cesa_skcipher_std_req_init(req, tmpl); in mv_cesa_skcipher_req_init()
446 struct mv_cesa_op_ctx *tmpl) in mv_cesa_skcipher_queue_req() argument
452 ret = mv_cesa_skcipher_req_init(req, tmpl); in mv_cesa_skcipher_queue_req()
468 struct mv_cesa_op_ctx *tmpl) in mv_cesa_des_op() argument
472 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTM_DES, in mv_cesa_des_op()
475 memcpy(tmpl->ctx.skcipher.key, ctx->key, DES_KEY_SIZE); in mv_cesa_des_op()
477 return mv_cesa_skcipher_queue_req(req, tmpl); in mv_cesa_des_op()
482 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_des_encrypt() local
484 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des_encrypt()
488 return mv_cesa_des_op(req, &tmpl); in mv_cesa_ecb_des_encrypt()
493 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_des_decrypt() local
495 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des_decrypt()
499 return mv_cesa_des_op(req, &tmpl); in mv_cesa_ecb_des_decrypt()
524 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_des_op() argument
526 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC, in mv_cesa_cbc_des_op()
529 memcpy(tmpl->ctx.skcipher.iv, req->iv, DES_BLOCK_SIZE); in mv_cesa_cbc_des_op()
531 return mv_cesa_des_op(req, tmpl); in mv_cesa_cbc_des_op()
536 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des_encrypt() local
538 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_ENC); in mv_cesa_cbc_des_encrypt()
540 return mv_cesa_cbc_des_op(req, &tmpl); in mv_cesa_cbc_des_encrypt()
545 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des_decrypt() local
547 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_DEC); in mv_cesa_cbc_des_decrypt()
549 return mv_cesa_cbc_des_op(req, &tmpl); in mv_cesa_cbc_des_decrypt()
575 struct mv_cesa_op_ctx *tmpl) in mv_cesa_des3_op() argument
579 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTM_3DES, in mv_cesa_des3_op()
582 memcpy(tmpl->ctx.skcipher.key, ctx->key, DES3_EDE_KEY_SIZE); in mv_cesa_des3_op()
584 return mv_cesa_skcipher_queue_req(req, tmpl); in mv_cesa_des3_op()
589 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_des3_ede_encrypt() local
591 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des3_ede_encrypt()
596 return mv_cesa_des3_op(req, &tmpl); in mv_cesa_ecb_des3_ede_encrypt()
601 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_des3_ede_decrypt() local
603 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_des3_ede_decrypt()
608 return mv_cesa_des3_op(req, &tmpl); in mv_cesa_ecb_des3_ede_decrypt()
634 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_des3_op() argument
636 memcpy(tmpl->ctx.skcipher.iv, req->iv, DES3_EDE_BLOCK_SIZE); in mv_cesa_cbc_des3_op()
638 return mv_cesa_des3_op(req, tmpl); in mv_cesa_cbc_des3_op()
643 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des3_ede_encrypt() local
645 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_cbc_des3_ede_encrypt()
650 return mv_cesa_cbc_des3_op(req, &tmpl); in mv_cesa_cbc_des3_ede_encrypt()
655 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des3_ede_decrypt() local
657 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_cbc_des3_ede_decrypt()
662 return mv_cesa_cbc_des3_op(req, &tmpl); in mv_cesa_cbc_des3_ede_decrypt()
688 struct mv_cesa_op_ctx *tmpl) in mv_cesa_aes_op() argument
697 if (mv_cesa_get_op_cfg(tmpl) & CESA_SA_DESC_CFG_DIR_DEC) in mv_cesa_aes_op()
703 tmpl->ctx.skcipher.key[i] = cpu_to_le32(key[i]); in mv_cesa_aes_op()
710 mv_cesa_update_op_cfg(tmpl, cfg, in mv_cesa_aes_op()
714 return mv_cesa_skcipher_queue_req(req, tmpl); in mv_cesa_aes_op()
719 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_aes_encrypt() local
721 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_aes_encrypt()
725 return mv_cesa_aes_op(req, &tmpl); in mv_cesa_ecb_aes_encrypt()
730 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_aes_decrypt() local
732 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_aes_decrypt()
736 return mv_cesa_aes_op(req, &tmpl); in mv_cesa_ecb_aes_decrypt()
761 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_aes_op() argument
763 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC, in mv_cesa_cbc_aes_op()
765 memcpy(tmpl->ctx.skcipher.iv, req->iv, AES_BLOCK_SIZE); in mv_cesa_cbc_aes_op()
767 return mv_cesa_aes_op(req, tmpl); in mv_cesa_cbc_aes_op()
772 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_aes_encrypt() local
774 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_ENC); in mv_cesa_cbc_aes_encrypt()
776 return mv_cesa_cbc_aes_op(req, &tmpl); in mv_cesa_cbc_aes_encrypt()
781 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_aes_decrypt() local
783 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_DEC); in mv_cesa_cbc_aes_decrypt()
785 return mv_cesa_cbc_aes_op(req, &tmpl); in mv_cesa_cbc_aes_decrypt()