Lines Matching refs:req_ctx

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