hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/mac80211/wpa.c
....@@ -1,12 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright 2002-2004, Instant802 Networks, Inc.
34 * Copyright 2008, Jouni Malinen <j@w1.fi>
45 * Copyright (C) 2016-2017 Intel Deutschland GmbH
56 * Copyright (C) 2020-2021 Intel Corporation
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
107 */
118
129 #include <linux/netdevice.h>
....@@ -243,7 +240,7 @@
243240 /* Add room for ICV */
244241 skb_put(skb, IEEE80211_TKIP_ICV_LEN);
245242
246
- return ieee80211_tkip_encrypt_data(tx->local->wep_tx_tfm,
243
+ return ieee80211_tkip_encrypt_data(&tx->local->wep_tx_ctx,
247244 key, skb, pos, len);
248245 }
249246
....@@ -294,7 +291,7 @@
294291 if (status->flag & RX_FLAG_DECRYPTED)
295292 hwaccel = 1;
296293
297
- res = ieee80211_tkip_decrypt_data(rx->local->wep_rx_tfm,
294
+ res = ieee80211_tkip_decrypt_data(&rx->local->wep_rx_ctx,
298295 key, skb->data + hdrlen,
299296 skb->len - hdrlen, rx->sta->sta.addr,
300297 hdr->addr1, hwaccel, rx->security_idx,
....@@ -960,7 +957,8 @@
960957
961958 info = IEEE80211_SKB_CB(skb);
962959
963
- if (info->control.hw_key)
960
+ if (info->control.hw_key &&
961
+ !(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIE))
964962 return TX_CONTINUE;
965963
966964 if (WARN_ON(skb_tailroom(skb) < sizeof(*mmie)))
....@@ -976,6 +974,9 @@
976974
977975 bip_ipn_set64(mmie->sequence_number, pn64);
978976
977
+ if (info->control.hw_key)
978
+ return TX_CONTINUE;
979
+
979980 bip_aad(skb, aad);
980981
981982 /*