Lines Matching refs:hwreq
83 struct zynqmp_aead_hw_req *hwreq; in zynqmp_aes_aead_cipher() local
102 hwreq = dma_alloc_coherent(dev, sizeof(struct zynqmp_aead_hw_req), in zynqmp_aes_aead_cipher()
104 if (!hwreq) { in zynqmp_aes_aead_cipher()
113 hwreq->src = dma_addr_data; in zynqmp_aes_aead_cipher()
114 hwreq->dst = dma_addr_data; in zynqmp_aes_aead_cipher()
115 hwreq->iv = hwreq->src + data_size; in zynqmp_aes_aead_cipher()
116 hwreq->keysrc = tfm_ctx->keysrc; in zynqmp_aes_aead_cipher()
117 hwreq->op = rq_ctx->op; in zynqmp_aes_aead_cipher()
119 if (hwreq->op == ZYNQMP_AES_ENCRYPT) in zynqmp_aes_aead_cipher()
120 hwreq->size = data_size; in zynqmp_aes_aead_cipher()
122 hwreq->size = data_size - ZYNQMP_AES_AUTH_SIZE; in zynqmp_aes_aead_cipher()
124 if (hwreq->keysrc == ZYNQMP_AES_KUP_KEY) { in zynqmp_aes_aead_cipher()
128 hwreq->key = hwreq->src + data_size + GCM_AES_IV_SIZE; in zynqmp_aes_aead_cipher()
130 hwreq->key = 0; in zynqmp_aes_aead_cipher()
155 if (hwreq->op == ZYNQMP_AES_ENCRYPT) in zynqmp_aes_aead_cipher()
169 if (hwreq) { in zynqmp_aes_aead_cipher()
170 memzero_explicit(hwreq, sizeof(struct zynqmp_aead_hw_req)); in zynqmp_aes_aead_cipher()
172 hwreq, dma_addr_hw_req); in zynqmp_aes_aead_cipher()