15 #include <linux/module.h>
17 #include <linux/slab.h>
18 #include <asm/string.h>
19 #include <asm/errno.h>
56 entry->
ops->deinit(entry->
priv);
70 "deletion list\n", ieee->
dev->name);
74 spin_unlock_irqrestore(&ieee->
lock, flags);
100 spin_unlock_irqrestore(&ieee->
lock, flags);
118 list_add(&alg->
list, &hcrypt->
algs);
119 spin_unlock_irqrestore(&hcrypt->
lock, flags);
137 for (ptr = hcrypt->
algs.next; ptr != &hcrypt->
algs; ptr = ptr->
next) {
140 if (alg->
ops == ops) {
146 spin_unlock_irqrestore(&hcrypt->
lock, flags);
150 "'%s'\n", ops->
name);
154 return del_alg ? 0 : -1;
168 for (ptr = hcrypt->
algs.next; ptr != &hcrypt->
algs; ptr = ptr->
next) {
176 spin_unlock_irqrestore(&hcrypt->
lock, flags);
179 return found_alg->
ops;
185 static void * ieee80211_crypt_null_init(
int keyidx) {
return (
void *) 1; }
186 static void ieee80211_crypt_null_deinit(
void *
priv) {}
190 .init = ieee80211_crypt_null_init,
191 .deinit = ieee80211_crypt_null_deinit,
192 .encrypt_mpdu =
NULL,
193 .decrypt_mpdu =
NULL,
194 .encrypt_msdu =
NULL,
195 .decrypt_msdu =
NULL,
198 .extra_prefix_len = 0,
199 .extra_postfix_len = 0,
207 hcrypt = kzalloc(
sizeof(*hcrypt),
GFP_KERNEL);
211 INIT_LIST_HEAD(&hcrypt->
algs);
230 for (ptr = hcrypt->
algs.next, n = ptr->
next; ptr != &hcrypt->
algs;
231 ptr = n, n = ptr->
next) {
236 "'%s' (deinit)\n", alg->
ops->name);