Lines Matching refs:req
48 static int chainiv_givencrypt(struct skcipher_givcrypt_request *req) in chainiv_givencrypt() argument
50 struct crypto_ablkcipher *geniv = skcipher_givcrypt_reqtfm(req); in chainiv_givencrypt()
52 struct ablkcipher_request *subreq = skcipher_givcrypt_reqctx(req); in chainiv_givencrypt()
57 ablkcipher_request_set_callback(subreq, req->creq.base.flags & in chainiv_givencrypt()
59 req->creq.base.complete, in chainiv_givencrypt()
60 req->creq.base.data); in chainiv_givencrypt()
61 ablkcipher_request_set_crypt(subreq, req->creq.src, req->creq.dst, in chainiv_givencrypt()
62 req->creq.nbytes, req->creq.info); in chainiv_givencrypt()
68 memcpy(req->giv, ctx->iv, ivsize); in chainiv_givencrypt()
83 static int chainiv_givencrypt_first(struct skcipher_givcrypt_request *req) in chainiv_givencrypt_first() argument
85 struct crypto_ablkcipher *geniv = skcipher_givcrypt_reqtfm(req); in chainiv_givencrypt_first()
104 return chainiv_givencrypt(req); in chainiv_givencrypt_first()
144 static int async_chainiv_postpone_request(struct skcipher_givcrypt_request *req) in async_chainiv_postpone_request() argument
146 struct crypto_ablkcipher *geniv = skcipher_givcrypt_reqtfm(req); in async_chainiv_postpone_request()
151 err = skcipher_enqueue_givcrypt(&ctx->queue, req); in async_chainiv_postpone_request()
161 static int async_chainiv_givencrypt_tail(struct skcipher_givcrypt_request *req) in async_chainiv_givencrypt_tail() argument
163 struct crypto_ablkcipher *geniv = skcipher_givcrypt_reqtfm(req); in async_chainiv_givencrypt_tail()
165 struct ablkcipher_request *subreq = skcipher_givcrypt_reqctx(req); in async_chainiv_givencrypt_tail()
168 memcpy(req->giv, ctx->iv, ivsize); in async_chainiv_givencrypt_tail()
181 static int async_chainiv_givencrypt(struct skcipher_givcrypt_request *req) in async_chainiv_givencrypt() argument
183 struct crypto_ablkcipher *geniv = skcipher_givcrypt_reqtfm(req); in async_chainiv_givencrypt()
185 struct ablkcipher_request *subreq = skcipher_givcrypt_reqctx(req); in async_chainiv_givencrypt()
188 ablkcipher_request_set_callback(subreq, req->creq.base.flags, in async_chainiv_givencrypt()
189 req->creq.base.complete, in async_chainiv_givencrypt()
190 req->creq.base.data); in async_chainiv_givencrypt()
191 ablkcipher_request_set_crypt(subreq, req->creq.src, req->creq.dst, in async_chainiv_givencrypt()
192 req->creq.nbytes, req->creq.info); in async_chainiv_givencrypt()
202 return async_chainiv_givencrypt_tail(req); in async_chainiv_givencrypt()
205 return async_chainiv_postpone_request(req); in async_chainiv_givencrypt()
208 static int async_chainiv_givencrypt_first(struct skcipher_givcrypt_request *req) in async_chainiv_givencrypt_first() argument
210 struct crypto_ablkcipher *geniv = skcipher_givcrypt_reqtfm(req); in async_chainiv_givencrypt_first()
232 return async_chainiv_givencrypt(req); in async_chainiv_givencrypt_first()
240 struct skcipher_givcrypt_request *req; in async_chainiv_do_postponed() local
246 req = skcipher_dequeue_givcrypt(&ctx->queue); in async_chainiv_do_postponed()
249 if (!req) { in async_chainiv_do_postponed()
254 subreq = skcipher_givcrypt_reqctx(req); in async_chainiv_do_postponed()
257 err = async_chainiv_givencrypt_tail(req); in async_chainiv_do_postponed()
260 skcipher_givcrypt_complete(req, err); in async_chainiv_do_postponed()