Lines Matching refs:req_ctx
876 struct aead_req_ctx *req_ctx = aead_request_ctx(req); in cc_proc_digest_desc() local
880 int direct = req_ctx->gen_ctx.op_type; in cc_proc_digest_desc()
887 set_dout_dlli(&desc[idx], req_ctx->icv_dma_addr, ctx->authsize, in cc_proc_digest_desc()
903 set_dout_dlli(&desc[idx], req_ctx->mac_buf_dma_addr, in cc_proc_digest_desc()
926 struct aead_req_ctx *req_ctx = aead_request_ctx(req); in cc_set_cipher_desc() local
927 unsigned int hw_iv_size = req_ctx->hw_iv_size; in cc_set_cipher_desc()
929 int direct = req_ctx->gen_ctx.op_type; in cc_set_cipher_desc()
935 set_din_type(&desc[idx], DMA_DLLI, req_ctx->gen_ctx.iv_dma_addr, in cc_set_cipher_desc()
968 struct aead_req_ctx *req_ctx = aead_request_ctx(req); in cc_proc_cipher() local
969 int direct = req_ctx->gen_ctx.op_type; in cc_proc_cipher()
972 if (req_ctx->cryptlen == 0) in cc_proc_cipher()
1161 struct aead_req_ctx *req_ctx = aead_request_ctx(req); in cc_mlli_to_sram() local
1166 if ((req_ctx->assoc_buff_type == CC_DMA_BUF_MLLI || in cc_mlli_to_sram()
1167 req_ctx->data_buff_type == CC_DMA_BUF_MLLI || in cc_mlli_to_sram()
1168 !req_ctx->is_single_pass) && req_ctx->mlli_params.mlli_len) { in cc_mlli_to_sram()
1171 req_ctx->mlli_params.mlli_len); in cc_mlli_to_sram()
1175 req_ctx->mlli_params.mlli_dma_addr, in cc_mlli_to_sram()
1176 req_ctx->mlli_params.mlli_len, NS_BIT); in cc_mlli_to_sram()
1179 req_ctx->mlli_params.mlli_len); in cc_mlli_to_sram()
1215 struct aead_req_ctx *req_ctx = aead_request_ctx(req); in cc_hmac_authenc() local
1216 int direct = req_ctx->gen_ctx.op_type; in cc_hmac_authenc()
1219 req_ctx->is_single_pass); in cc_hmac_authenc()
1221 if (req_ctx->is_single_pass) { in cc_hmac_authenc()
1268 struct aead_req_ctx *req_ctx = aead_request_ctx(req); in cc_xcbc_authenc() local
1269 int direct = req_ctx->gen_ctx.op_type; in cc_xcbc_authenc()
1272 req_ctx->is_single_pass); in cc_xcbc_authenc()
1274 if (req_ctx->is_single_pass) { in cc_xcbc_authenc()
1414 struct aead_req_ctx *req_ctx = aead_request_ctx(req); in cc_ccm() local
1419 if (req_ctx->gen_ctx.op_type == DRV_CRYPTO_DIRECTION_DECRYPT) { in cc_ccm()
1421 mac_result = req_ctx->mac_buf_dma_addr; in cc_ccm()
1424 mac_result = req_ctx->icv_dma_addr; in cc_ccm()
1444 req_ctx->gen_ctx.iv_dma_addr, AES_BLOCK_SIZE, NS_BIT); in cc_ccm()
1467 set_din_type(&desc[idx], DMA_DLLI, req_ctx->mac_buf_dma_addr, in cc_ccm()
1476 if (req_ctx->assoclen > 0) { in cc_ccm()
1481 sg_dma_address(&req_ctx->ccm_adata_sg), in cc_ccm()
1482 AES_BLOCK_SIZE + req_ctx->ccm_hdr_size, NS_BIT); in cc_ccm()
1488 if (req_ctx->cryptlen) in cc_ccm()
1494 set_dout_dlli(&desc[idx], req_ctx->mac_buf_dma_addr, ctx->authsize, in cc_ccm()
1506 set_din_type(&desc[idx], DMA_DLLI, req_ctx->ccm_iv0_dma_addr, in cc_ccm()
1520 set_din_type(&desc[idx], DMA_DLLI, req_ctx->mac_buf_dma_addr, in cc_ccm()
1536 struct aead_req_ctx *req_ctx = aead_request_ctx(req); in config_ccm_adata() local
1544 u8 *b0 = req_ctx->ccm_config + CCM_B0_OFFSET; in config_ccm_adata()
1545 u8 *a0 = req_ctx->ccm_config + CCM_A0_OFFSET; in config_ccm_adata()
1546 u8 *ctr_count_0 = req_ctx->ccm_config + CCM_CTR_COUNT_0_OFFSET; in config_ccm_adata()
1547 unsigned int cryptlen = (req_ctx->gen_ctx.op_type == in config_ccm_adata()
1553 memset(req_ctx->mac_buf, 0, AES_BLOCK_SIZE); in config_ccm_adata()
1554 memset(req_ctx->ccm_config, 0, AES_BLOCK_SIZE * 3); in config_ccm_adata()
1568 if (req_ctx->assoclen > 0) in config_ccm_adata()
1579 req_ctx->ccm_hdr_size = format_ccm_a0(a0, req_ctx->assoclen); in config_ccm_adata()
1618 struct aead_req_ctx *req_ctx = aead_request_ctx(req); in cc_set_ghash_desc() local
1635 set_dout_dlli(&desc[idx], req_ctx->hkey_dma_addr, AES_BLOCK_SIZE, in cc_set_ghash_desc()
1648 set_din_type(&desc[idx], DMA_DLLI, req_ctx->hkey_dma_addr, in cc_set_ghash_desc()
1696 struct aead_req_ctx *req_ctx = aead_request_ctx(req); in cc_set_gctr_desc() local
1710 if (req_ctx->cryptlen && !req_ctx->plaintext_authenticate_only) { in cc_set_gctr_desc()
1716 req_ctx->gcm_iv_inc2_dma_addr, AES_BLOCK_SIZE, in cc_set_gctr_desc()
1733 struct aead_req_ctx *req_ctx = aead_request_ctx(req); in cc_proc_gcm_result() local
1737 if (req_ctx->gen_ctx.op_type == DRV_CRYPTO_DIRECTION_DECRYPT) { in cc_proc_gcm_result()
1738 mac_result = req_ctx->mac_buf_dma_addr; in cc_proc_gcm_result()
1740 mac_result = req_ctx->icv_dma_addr; in cc_proc_gcm_result()
1745 set_din_type(&desc[idx], DMA_DLLI, req_ctx->gcm_block_len_dma_addr, in cc_proc_gcm_result()
1754 set_dout_dlli(&desc[idx], req_ctx->mac_buf_dma_addr, AES_BLOCK_SIZE, in cc_proc_gcm_result()
1766 set_din_type(&desc[idx], DMA_DLLI, req_ctx->gcm_iv_inc1_dma_addr, in cc_proc_gcm_result()
1782 set_din_type(&desc[idx], DMA_DLLI, req_ctx->mac_buf_dma_addr, in cc_proc_gcm_result()
1795 struct aead_req_ctx *req_ctx = aead_request_ctx(req); in cc_gcm() local
1799 if (req_ctx->plaintext_authenticate_only) { in cc_gcm()
1809 if (req_ctx->gen_ctx.op_type == DRV_CRYPTO_DIRECTION_DECRYPT) { in cc_gcm()
1818 if (req_ctx->assoclen > 0) in cc_gcm()
1822 if (req_ctx->cryptlen) in cc_gcm()
1833 struct aead_req_ctx *req_ctx = aead_request_ctx(req); in config_gcm_context() local
1836 unsigned int cryptlen = (req_ctx->gen_ctx.op_type == in config_gcm_context()
1843 __func__, cryptlen, req_ctx->assoclen, ctx->authsize); in config_gcm_context()
1845 memset(req_ctx->hkey, 0, AES_BLOCK_SIZE); in config_gcm_context()
1847 memset(req_ctx->mac_buf, 0, AES_BLOCK_SIZE); in config_gcm_context()
1850 memcpy(req_ctx->gcm_iv_inc2, req->iv, 16); in config_gcm_context()
1854 memcpy(req_ctx->gcm_iv_inc1, req->iv, 16); in config_gcm_context()
1856 if (!req_ctx->plaintext_authenticate_only) { in config_gcm_context()
1859 temp64 = cpu_to_be64(req_ctx->assoclen * 8); in config_gcm_context()
1860 memcpy(&req_ctx->gcm_len_block.len_a, &temp64, sizeof(temp64)); in config_gcm_context()
1862 memcpy(&req_ctx->gcm_len_block.len_c, &temp64, 8); in config_gcm_context()
1869 temp64 = cpu_to_be64((req_ctx->assoclen + cryptlen) * 8); in config_gcm_context()
1870 memcpy(&req_ctx->gcm_len_block.len_a, &temp64, sizeof(temp64)); in config_gcm_context()
1872 memcpy(&req_ctx->gcm_len_block.len_c, &temp64, 8); in config_gcm_context()