hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/mac80211/tkip.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright 2002-2004, Instant802 Networks, Inc.
34 * Copyright 2005, Devicescape Software, Inc.
45 * Copyright (C) 2016 Intel Deutschland GmbH
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
96 */
107 #include <linux/kernel.h>
118 #include <linux/bitops.h>
....@@ -222,7 +219,7 @@
222219 * @payload_len is the length of payload (_not_ including IV/ICV length).
223220 * @ta is the transmitter addresses.
224221 */
225
-int ieee80211_tkip_encrypt_data(struct crypto_cipher *tfm,
222
+int ieee80211_tkip_encrypt_data(struct arc4_ctx *ctx,
226223 struct ieee80211_key *key,
227224 struct sk_buff *skb,
228225 u8 *payload, size_t payload_len)
....@@ -231,7 +228,7 @@
231228
232229 ieee80211_get_tkip_p2k(&key->conf, skb, rc4key);
233230
234
- return ieee80211_wep_encrypt_data(tfm, rc4key, 16,
231
+ return ieee80211_wep_encrypt_data(ctx, rc4key, 16,
235232 payload, payload_len);
236233 }
237234
....@@ -239,7 +236,7 @@
239236 * beginning of the buffer containing IEEE 802.11 header payload, i.e.,
240237 * including IV, Ext. IV, real data, Michael MIC, ICV. @payload_len is the
241238 * length of payload, including IV, Ext. IV, MIC, ICV. */
242
-int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,
239
+int ieee80211_tkip_decrypt_data(struct arc4_ctx *ctx,
243240 struct ieee80211_key *key,
244241 u8 *payload, size_t payload_len, u8 *ta,
245242 u8 *ra, int only_iv, int queue,
....@@ -309,7 +306,7 @@
309306
310307 tkip_mixing_phase2(tk, &rx_ctx->ctx, iv16, rc4key);
311308
312
- res = ieee80211_wep_decrypt_data(tfm, rc4key, 16, pos, payload_len - 12);
309
+ res = ieee80211_wep_decrypt_data(ctx, rc4key, 16, pos, payload_len - 12);
313310 done:
314311 if (res == TKIP_DECRYPT_OK) {
315312 /*