diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-09 11:01:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-09 11:01:37 -0500 |
commit | f049274b012fd3b50113f194bfbbcbc3143d0da3 (patch) | |
tree | 15ef947c1959da3196d8dbc524b435972f6d37f7 /crypto/internal.h | |
parent | b37df85960a34dd96d0a4695c650f7972ef56c30 (diff) | |
parent | 1539b98b561754252dd520b98fa03a688a4f81b5 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (79 commits)
[IPX]: Fix NULL pointer dereference on ipx unload
[ATM]: atmarp.h needs to always include linux/types.h
[NET]: Fix net/socket.c warnings.
[NET]: cleanup sock_from_file()
[NET]: change layout of ehash table
[S390]: Add AF_IUCV socket support
[S390]: Adapt special message interface to new IUCV API
[S390]: Adapt netiucv driver to new IUCV API
[S390]: Adapt vmlogrdr driver to new IUCV API
[S390]: Adapt monreader driver to new IUCV API
[S390]: Rewrite of the IUCV base code, part 2
[S390]: Rewrite of the IUCV base code, part 1
[X.25]: Adds /proc/net/x25/forward to view active forwarded calls.
[X.25]: Adds /proc/sys/net/x25/x25_forward to control forwarding.
[X.25]: Add call forwarding
[XFRM]: xfrm_migrate() needs exporting to modules.
[PFKEYV2]: CONFIG_NET_KEY_MIGRATE option
[PFKEYV2]: Extension for dynamic update of endpoint address(es)
[XFRM]: CONFIG_XFRM_MIGRATE option
[XFRM]: User interface for handling XFRM_MSG_MIGRATE
...
Diffstat (limited to 'crypto/internal.h')
-rw-r--r-- | crypto/internal.h | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/crypto/internal.h b/crypto/internal.h index 2da6ad4f3593..60acad9788c5 100644 --- a/crypto/internal.h +++ b/crypto/internal.h | |||
@@ -83,8 +83,7 @@ static inline void crypto_exit_proc(void) | |||
83 | { } | 83 | { } |
84 | #endif | 84 | #endif |
85 | 85 | ||
86 | static inline unsigned int crypto_digest_ctxsize(struct crypto_alg *alg, | 86 | static inline unsigned int crypto_digest_ctxsize(struct crypto_alg *alg) |
87 | int flags) | ||
88 | { | 87 | { |
89 | unsigned int len = alg->cra_ctxsize; | 88 | unsigned int len = alg->cra_ctxsize; |
90 | 89 | ||
@@ -96,23 +95,12 @@ static inline unsigned int crypto_digest_ctxsize(struct crypto_alg *alg, | |||
96 | return len; | 95 | return len; |
97 | } | 96 | } |
98 | 97 | ||
99 | static inline unsigned int crypto_cipher_ctxsize(struct crypto_alg *alg, | 98 | static inline unsigned int crypto_cipher_ctxsize(struct crypto_alg *alg) |
100 | int flags) | ||
101 | { | 99 | { |
102 | unsigned int len = alg->cra_ctxsize; | 100 | return alg->cra_ctxsize; |
103 | |||
104 | switch (flags & CRYPTO_TFM_MODE_MASK) { | ||
105 | case CRYPTO_TFM_MODE_CBC: | ||
106 | len = ALIGN(len, (unsigned long)alg->cra_alignmask + 1); | ||
107 | len += alg->cra_blocksize; | ||
108 | break; | ||
109 | } | ||
110 | |||
111 | return len; | ||
112 | } | 101 | } |
113 | 102 | ||
114 | static inline unsigned int crypto_compress_ctxsize(struct crypto_alg *alg, | 103 | static inline unsigned int crypto_compress_ctxsize(struct crypto_alg *alg) |
115 | int flags) | ||
116 | { | 104 | { |
117 | return alg->cra_ctxsize; | 105 | return alg->cra_ctxsize; |
118 | } | 106 | } |
@@ -121,10 +109,6 @@ struct crypto_alg *crypto_mod_get(struct crypto_alg *alg); | |||
121 | struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type, u32 mask); | 109 | struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type, u32 mask); |
122 | struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask); | 110 | struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask); |
123 | 111 | ||
124 | int crypto_init_digest_flags(struct crypto_tfm *tfm, u32 flags); | ||
125 | int crypto_init_cipher_flags(struct crypto_tfm *tfm, u32 flags); | ||
126 | int crypto_init_compress_flags(struct crypto_tfm *tfm, u32 flags); | ||
127 | |||
128 | int crypto_init_digest_ops(struct crypto_tfm *tfm); | 112 | int crypto_init_digest_ops(struct crypto_tfm *tfm); |
129 | int crypto_init_cipher_ops(struct crypto_tfm *tfm); | 113 | int crypto_init_cipher_ops(struct crypto_tfm *tfm); |
130 | int crypto_init_compress_ops(struct crypto_tfm *tfm); | 114 | int crypto_init_compress_ops(struct crypto_tfm *tfm); |
@@ -136,7 +120,8 @@ void crypto_exit_compress_ops(struct crypto_tfm *tfm); | |||
136 | void crypto_larval_error(const char *name, u32 type, u32 mask); | 120 | void crypto_larval_error(const char *name, u32 type, u32 mask); |
137 | 121 | ||
138 | void crypto_shoot_alg(struct crypto_alg *alg); | 122 | void crypto_shoot_alg(struct crypto_alg *alg); |
139 | struct crypto_tfm *__crypto_alloc_tfm(struct crypto_alg *alg, u32 flags); | 123 | struct crypto_tfm *__crypto_alloc_tfm(struct crypto_alg *alg, u32 type, |
124 | u32 mask); | ||
140 | 125 | ||
141 | int crypto_register_instance(struct crypto_template *tmpl, | 126 | int crypto_register_instance(struct crypto_template *tmpl, |
142 | struct crypto_instance *inst); | 127 | struct crypto_instance *inst); |