.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2010-2014, The Linux Foundation. All rights reserved. |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify |
---|
5 | | - * it under the terms of the GNU General Public License version 2 and |
---|
6 | | - * only version 2 as published by the Free Software Foundation. |
---|
7 | | - * |
---|
8 | | - * This program is distributed in the hope that it will be useful, |
---|
9 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
10 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
11 | | - * GNU General Public License for more details. |
---|
12 | 4 | */ |
---|
13 | 5 | |
---|
14 | 6 | #ifndef _CIPHER_H_ |
---|
.. | .. |
---|
51 | 43 | struct sg_table src_tbl; |
---|
52 | 44 | struct scatterlist *src_sg; |
---|
53 | 45 | unsigned int cryptlen; |
---|
| 46 | + struct skcipher_request fallback_req; // keep at the end |
---|
54 | 47 | }; |
---|
55 | 48 | |
---|
56 | | -static inline struct qce_alg_template *to_cipher_tmpl(struct crypto_tfm *tfm) |
---|
| 49 | +static inline struct qce_alg_template *to_cipher_tmpl(struct crypto_skcipher *tfm) |
---|
57 | 50 | { |
---|
58 | | - struct crypto_alg *alg = tfm->__crt_alg; |
---|
59 | | - return container_of(alg, struct qce_alg_template, alg.crypto); |
---|
| 51 | + struct skcipher_alg *alg = crypto_skcipher_alg(tfm); |
---|
| 52 | + return container_of(alg, struct qce_alg_template, alg.skcipher); |
---|
60 | 53 | } |
---|
61 | 54 | |
---|
62 | | -extern const struct qce_algo_ops ablkcipher_ops; |
---|
| 55 | +extern const struct qce_algo_ops skcipher_ops; |
---|
63 | 56 | |
---|
64 | 57 | #endif /* _CIPHER_H_ */ |
---|