]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/blob - drivers/staging/rtl8192u/ieee80211/internal.h
rtl8192u: remove the second argument of k[un]map_atomic()
[can-eth-gw-linux.git] / drivers / staging / rtl8192u / ieee80211 / internal.h
1 /*
2  * Cryptographic API.
3  *
4  * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the Free
8  * Software Foundation; either version 2 of the License, or (at your option)
9  * any later version.
10  *
11  */
12 #ifndef _CRYPTO_INTERNAL_H
13 #define _CRYPTO_INTERNAL_H
14
15
16 //#include <linux/crypto.h>
17 #include "rtl_crypto.h"
18 #include <linux/mm.h>
19 #include <linux/highmem.h>
20 #include <linux/init.h>
21 #include <asm/hardirq.h>
22 #include <asm/softirq.h>
23 #include <asm/kmap_types.h>
24
25
26 static inline void crypto_yield(struct crypto_tfm *tfm)
27 {
28         if (!in_softirq())
29                 cond_resched();
30 }
31
32 static inline void *crypto_tfm_ctx(struct crypto_tfm *tfm)
33 {
34         return (void *)&tfm[1];
35 }
36
37 struct crypto_alg *crypto_alg_lookup(const char *name);
38
39 #ifdef CONFIG_KMOD
40 void crypto_alg_autoload(const char *name);
41 struct crypto_alg *crypto_alg_mod_lookup(const char *name);
42 #else
43 static inline struct crypto_alg *crypto_alg_mod_lookup(const char *name)
44 {
45         return crypto_alg_lookup(name);
46 }
47 #endif
48
49 #ifdef CONFIG_CRYPTO_HMAC
50 int crypto_alloc_hmac_block(struct crypto_tfm *tfm);
51 void crypto_free_hmac_block(struct crypto_tfm *tfm);
52 #else
53 static inline int crypto_alloc_hmac_block(struct crypto_tfm *tfm)
54 {
55         return 0;
56 }
57
58 static inline void crypto_free_hmac_block(struct crypto_tfm *tfm)
59 { }
60 #endif
61
62 #ifdef CONFIG_PROC_FS
63 void __init crypto_init_proc(void);
64 #else
65 static inline void crypto_init_proc(void)
66 { }
67 #endif
68
69 int crypto_init_digest_flags(struct crypto_tfm *tfm, u32 flags);
70 int crypto_init_cipher_flags(struct crypto_tfm *tfm, u32 flags);
71 int crypto_init_compress_flags(struct crypto_tfm *tfm, u32 flags);
72
73 int crypto_init_digest_ops(struct crypto_tfm *tfm);
74 int crypto_init_cipher_ops(struct crypto_tfm *tfm);
75 int crypto_init_compress_ops(struct crypto_tfm *tfm);
76
77 void crypto_exit_digest_ops(struct crypto_tfm *tfm);
78 void crypto_exit_cipher_ops(struct crypto_tfm *tfm);
79 void crypto_exit_compress_ops(struct crypto_tfm *tfm);
80
81 #endif  /* _CRYPTO_INTERNAL_H */
82