aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_key.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/ieee80211_key.h')
-rw-r--r--net/mac80211/ieee80211_key.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/net/mac80211/ieee80211_key.h b/net/mac80211/ieee80211_key.h
index fc770e98d47b..d670e6dbfa39 100644
--- a/net/mac80211/ieee80211_key.h
+++ b/net/mac80211/ieee80211_key.h
@@ -13,6 +13,7 @@
13#include <linux/types.h> 13#include <linux/types.h>
14#include <linux/list.h> 14#include <linux/list.h>
15#include <linux/crypto.h> 15#include <linux/crypto.h>
16#include <linux/rcupdate.h>
16#include <net/mac80211.h> 17#include <net/mac80211.h>
17 18
18/* ALG_TKIP 19/* ALG_TKIP
@@ -45,7 +46,19 @@ struct ieee80211_local;
45struct ieee80211_sub_if_data; 46struct ieee80211_sub_if_data;
46struct sta_info; 47struct sta_info;
47 48
48#define KEY_FLAG_UPLOADED_TO_HARDWARE (1<<0) 49/**
50 * enum ieee80211_internal_key_flags - internal key flags
51 *
52 * @KEY_FLAG_UPLOADED_TO_HARDWARE: Indicates that this key is present
53 * in the hardware for TX crypto hardware acceleration.
54 * @KEY_FLAG_REMOVE_FROM_HARDWARE: Indicates to the key code that this
55 * key is present in the hardware (but it cannot be used for
56 * hardware acceleration any more!)
57 */
58enum ieee80211_internal_key_flags {
59 KEY_FLAG_UPLOADED_TO_HARDWARE = BIT(0),
60 KEY_FLAG_REMOVE_FROM_HARDWARE = BIT(1),
61};
49 62
50struct ieee80211_key { 63struct ieee80211_key {
51 struct ieee80211_local *local; 64 struct ieee80211_local *local;
@@ -112,12 +125,17 @@ struct ieee80211_key {
112 struct ieee80211_key_conf conf; 125 struct ieee80211_key_conf conf;
113}; 126};
114 127
115struct ieee80211_key *ieee80211_key_alloc(struct ieee80211_sub_if_data *sdata, 128struct ieee80211_key *ieee80211_key_alloc(enum ieee80211_key_alg alg,
116 struct sta_info *sta,
117 enum ieee80211_key_alg alg,
118 int idx, 129 int idx,
119 size_t key_len, 130 size_t key_len,
120 const u8 *key_data); 131 const u8 *key_data);
132/*
133 * Insert a key into data structures (sdata, sta if necessary)
134 * to make it used, free old key.
135 */
136void ieee80211_key_link(struct ieee80211_key *key,
137 struct ieee80211_sub_if_data *sdata,
138 struct sta_info *sta);
121void ieee80211_key_free(struct ieee80211_key *key); 139void ieee80211_key_free(struct ieee80211_key *key);
122void ieee80211_set_default_key(struct ieee80211_sub_if_data *sdata, int idx); 140void ieee80211_set_default_key(struct ieee80211_sub_if_data *sdata, int idx);
123void ieee80211_free_keys(struct ieee80211_sub_if_data *sdata); 141void ieee80211_free_keys(struct ieee80211_sub_if_data *sdata);