.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright 2002-2004, Instant802 Networks, Inc. |
---|
3 | 4 | * 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 |
---|
8 | 6 | */ |
---|
9 | 7 | |
---|
10 | 8 | #ifndef IEEE80211_KEY_H |
---|
.. | .. |
---|
14 | 12 | #include <linux/list.h> |
---|
15 | 13 | #include <linux/crypto.h> |
---|
16 | 14 | #include <linux/rcupdate.h> |
---|
| 15 | +#include <crypto/arc4.h> |
---|
17 | 16 | #include <net/mac80211.h> |
---|
18 | 17 | |
---|
19 | 18 | #define NUM_DEFAULT_KEYS 4 |
---|
20 | 19 | #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 */ |
---|
21 | 22 | |
---|
22 | 23 | struct ieee80211_local; |
---|
23 | 24 | struct ieee80211_sub_if_data; |
---|
.. | .. |
---|
148 | 149 | int ieee80211_key_link(struct ieee80211_key *key, |
---|
149 | 150 | struct ieee80211_sub_if_data *sdata, |
---|
150 | 151 | struct sta_info *sta); |
---|
| 152 | +int ieee80211_set_tx_key(struct ieee80211_key *key); |
---|
151 | 153 | void ieee80211_key_free(struct ieee80211_key *key, bool delay_tailroom); |
---|
152 | 154 | void ieee80211_key_free_unused(struct ieee80211_key *key); |
---|
153 | 155 | void ieee80211_set_default_key(struct ieee80211_sub_if_data *sdata, int idx, |
---|
154 | 156 | bool uni, bool multi); |
---|
155 | 157 | void ieee80211_set_default_mgmt_key(struct ieee80211_sub_if_data *sdata, |
---|
156 | 158 | int idx); |
---|
| 159 | +void ieee80211_set_default_beacon_key(struct ieee80211_sub_if_data *sdata, |
---|
| 160 | + int idx); |
---|
157 | 161 | void ieee80211_free_keys(struct ieee80211_sub_if_data *sdata, |
---|
158 | 162 | bool force_synchronize); |
---|
159 | 163 | void ieee80211_free_sta_keys(struct ieee80211_local *local, |
---|
160 | 164 | 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); |
---|
163 | 166 | |
---|
164 | 167 | #define key_mtx_dereference(local, ref) \ |
---|
165 | 168 | rcu_dereference_protected(ref, lockdep_is_held(&((local)->key_mtx))) |
---|