hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/net/mac80211/key.h
....@@ -1,10 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright 2002-2004, Instant802 Networks, Inc.
34 * Copyright 2005, Devicescape Software, Inc.
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License version 2 as
7
- * published by the Free Software Foundation.
5
+ * Copyright (C) 2019 Intel Corporation
86 */
97
108 #ifndef IEEE80211_KEY_H
....@@ -14,10 +12,13 @@
1412 #include <linux/list.h>
1513 #include <linux/crypto.h>
1614 #include <linux/rcupdate.h>
15
+#include <crypto/arc4.h>
1716 #include <net/mac80211.h>
1817
1918 #define NUM_DEFAULT_KEYS 4
2019 #define NUM_DEFAULT_MGMT_KEYS 2
20
+#define NUM_DEFAULT_BEACON_KEYS 2
21
+#define INVALID_PTK_KEYIDX 2 /* Keyidx always pointing to a NULL key for PTK */
2122
2223 struct ieee80211_local;
2324 struct ieee80211_sub_if_data;
....@@ -148,18 +149,20 @@
148149 int ieee80211_key_link(struct ieee80211_key *key,
149150 struct ieee80211_sub_if_data *sdata,
150151 struct sta_info *sta);
152
+int ieee80211_set_tx_key(struct ieee80211_key *key);
151153 void ieee80211_key_free(struct ieee80211_key *key, bool delay_tailroom);
152154 void ieee80211_key_free_unused(struct ieee80211_key *key);
153155 void ieee80211_set_default_key(struct ieee80211_sub_if_data *sdata, int idx,
154156 bool uni, bool multi);
155157 void ieee80211_set_default_mgmt_key(struct ieee80211_sub_if_data *sdata,
156158 int idx);
159
+void ieee80211_set_default_beacon_key(struct ieee80211_sub_if_data *sdata,
160
+ int idx);
157161 void ieee80211_free_keys(struct ieee80211_sub_if_data *sdata,
158162 bool force_synchronize);
159163 void ieee80211_free_sta_keys(struct ieee80211_local *local,
160164 struct sta_info *sta);
161
-void ieee80211_enable_keys(struct ieee80211_sub_if_data *sdata);
162
-void ieee80211_reset_crypto_tx_tailroom(struct ieee80211_sub_if_data *sdata);
165
+void ieee80211_reenable_keys(struct ieee80211_sub_if_data *sdata);
163166
164167 #define key_mtx_dereference(local, ref) \
165168 rcu_dereference_protected(ref, lockdep_is_held(&((local)->key_mtx)))