hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/crypto/qce/cipher.h
....@@ -1,14 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * 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.
124 */
135
146 #ifndef _CIPHER_H_
....@@ -51,14 +43,15 @@
5143 struct sg_table src_tbl;
5244 struct scatterlist *src_sg;
5345 unsigned int cryptlen;
46
+ struct skcipher_request fallback_req; // keep at the end
5447 };
5548
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)
5750 {
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);
6053 }
6154
62
-extern const struct qce_algo_ops ablkcipher_ops;
55
+extern const struct qce_algo_ops skcipher_ops;
6356
6457 #endif /* _CIPHER_H_ */