14 #include <linux/module.h>
16 #include <linux/slab.h>
17 #include <linux/string.h>
18 #include <linux/errno.h>
51 entry->
ops->deinit(entry->
priv);
66 "deletion list\n", info->
name);
70 spin_unlock_irqrestore(info->
lock, flags);
97 spin_unlock_irqrestore(info->
lock, flags);
116 list_add(&alg->
list, &hcrypt->
algs);
117 spin_unlock_irqrestore(&hcrypt->
lock, flags);
136 for (ptr = hcrypt->
algs.next; ptr != &hcrypt->
algs; ptr = ptr->
next) {
139 if (alg->
ops == ops) {
145 spin_unlock_irqrestore(&hcrypt->
lock, flags);
149 "'%s'\n", ops->
name);
153 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;
186 static void * rtllib_crypt_null_init(
int keyidx) {
return (
void *) 1; }
187 static void rtllib_crypt_null_deinit(
void *
priv) {}
191 .init = rtllib_crypt_null_init,
192 .deinit = rtllib_crypt_null_deinit,
193 .encrypt_mpdu =
NULL,
194 .decrypt_mpdu =
NULL,
195 .encrypt_msdu =
NULL,
196 .decrypt_msdu =
NULL,
199 .extra_mpdu_prefix_len = 0,
200 .extra_mpdu_postfix_len = 0,
201 .extra_msdu_prefix_len = 0,
202 .extra_msdu_postfix_len = 0,
211 hcrypt = kzalloc(
sizeof(*hcrypt),
GFP_KERNEL);
215 INIT_LIST_HEAD(&hcrypt->
algs);
235 for (ptr = hcrypt->
algs.next, n = ptr->
next; ptr != &hcrypt->
algs;
236 ptr = n, n = ptr->
next) {
241 "'%s' (deinit)\n", alg->
ops->name);