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()
633 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_des3_op() argument
635 memcpy(tmpl->ctx.skcipher.iv, req->iv, DES3_EDE_BLOCK_SIZE); in mv_cesa_cbc_des3_op()
637 return mv_cesa_des3_op(req, tmpl); in mv_cesa_cbc_des3_op()
642 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des3_ede_encrypt() local
644 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_cbc_des3_ede_encrypt()
649 return mv_cesa_cbc_des3_op(req, &tmpl); in mv_cesa_cbc_des3_ede_encrypt()
654 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_des3_ede_decrypt() local
656 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_cbc_des3_ede_decrypt()
661 return mv_cesa_cbc_des3_op(req, &tmpl); in mv_cesa_cbc_des3_ede_decrypt()
687 struct mv_cesa_op_ctx *tmpl) in mv_cesa_aes_op() argument
696 if (mv_cesa_get_op_cfg(tmpl) & CESA_SA_DESC_CFG_DIR_DEC) in mv_cesa_aes_op()
702 tmpl->ctx.skcipher.key[i] = cpu_to_le32(key[i]); in mv_cesa_aes_op()
709 mv_cesa_update_op_cfg(tmpl, cfg, in mv_cesa_aes_op()
713 return mv_cesa_skcipher_queue_req(req, tmpl); in mv_cesa_aes_op()
718 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_aes_encrypt() local
720 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_aes_encrypt()
724 return mv_cesa_aes_op(req, &tmpl); in mv_cesa_ecb_aes_encrypt()
729 struct mv_cesa_op_ctx tmpl; in mv_cesa_ecb_aes_decrypt() local
731 mv_cesa_set_op_cfg(&tmpl, in mv_cesa_ecb_aes_decrypt()
735 return mv_cesa_aes_op(req, &tmpl); in mv_cesa_ecb_aes_decrypt()
760 struct mv_cesa_op_ctx *tmpl) in mv_cesa_cbc_aes_op() argument
762 mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC, in mv_cesa_cbc_aes_op()
764 memcpy(tmpl->ctx.skcipher.iv, req->iv, AES_BLOCK_SIZE); in mv_cesa_cbc_aes_op()
766 return mv_cesa_aes_op(req, tmpl); in mv_cesa_cbc_aes_op()
771 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_aes_encrypt() local
773 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_ENC); in mv_cesa_cbc_aes_encrypt()
775 return mv_cesa_cbc_aes_op(req, &tmpl); in mv_cesa_cbc_aes_encrypt()
780 struct mv_cesa_op_ctx tmpl; in mv_cesa_cbc_aes_decrypt() local
782 mv_cesa_set_op_cfg(&tmpl, CESA_SA_DESC_CFG_DIR_DEC); in mv_cesa_cbc_aes_decrypt()
784 return mv_cesa_cbc_aes_op(req, &tmpl); in mv_cesa_cbc_aes_decrypt()