git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
[pandora-kernel.git]
/
crypto
/
michael_mic.c
diff --git
a/crypto/michael_mic.c
b/crypto/michael_mic.c
index
4f6ab23
..
9e917b8
100644
(file)
--- a/
crypto/michael_mic.c
+++ b/
crypto/michael_mic.c
@@
-3,7
+3,7
@@
*
* Michael MIC (IEEE 802.11i/TKIP) keyed digest
*
*
* Michael MIC (IEEE 802.11i/TKIP) keyed digest
*
- * Copyright (c) 2004 Jouni Malinen <j
kmaline@cc.hut
.fi>
+ * Copyright (c) 2004 Jouni Malinen <j
@w1
.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@
-45,16
+45,17
@@
do { \
} while (0)
} while (0)
-static void michael_init(
void *ctx
)
+static void michael_init(
struct crypto_tfm *tfm
)
{
{
- struct michael_mic_ctx *mctx = c
tx
;
+ struct michael_mic_ctx *mctx = c
rypto_tfm_ctx(tfm)
;
mctx->pending_len = 0;
}
mctx->pending_len = 0;
}
-static void michael_update(void *ctx, const u8 *data, unsigned int len)
+static void michael_update(struct crypto_tfm *tfm, const u8 *data,
+ unsigned int len)
{
{
- struct michael_mic_ctx *mctx = c
tx
;
+ struct michael_mic_ctx *mctx = c
rypto_tfm_ctx(tfm)
;
const __le32 *src;
if (mctx->pending_len) {
const __le32 *src;
if (mctx->pending_len) {
@@
-90,9
+91,9
@@
static void michael_update(void *ctx, const u8 *data, unsigned int len)
}
}
-static void michael_final(
void *ctx
, u8 *out)
+static void michael_final(
struct crypto_tfm *tfm
, u8 *out)
{
{
- struct michael_mic_ctx *mctx = c
tx
;
+ struct michael_mic_ctx *mctx = c
rypto_tfm_ctx(tfm)
;
u8 *data = mctx->pending;
__le32 *dst = (__le32 *)out;
u8 *data = mctx->pending;
__le32 *dst = (__le32 *)out;
@@
-121,15
+122,14
@@
static void michael_final(void *ctx, u8 *out)
}
}
-static int michael_setkey(
void *ctx, const u8 *key, unsigned int keylen
,
- u
32 *flags
)
+static int michael_setkey(
struct crypto_tfm *tfm, const u8 *key
,
+ u
nsigned int keylen
)
{
{
- struct michael_mic_ctx *mctx = c
tx
;
+ struct michael_mic_ctx *mctx = c
rypto_tfm_ctx(tfm)
;
const __le32 *data = (const __le32 *)key;
if (keylen != 8) {
const __le32 *data = (const __le32 *)key;
if (keylen != 8) {
- if (flags)
- *flags = CRYPTO_TFM_RES_BAD_KEY_LEN;
+ tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
return -EINVAL;
}
return -EINVAL;
}
@@
-145,6
+145,7
@@
static struct crypto_alg michael_mic_alg = {
.cra_blocksize = 8,
.cra_ctxsize = sizeof(struct michael_mic_ctx),
.cra_module = THIS_MODULE,
.cra_blocksize = 8,
.cra_ctxsize = sizeof(struct michael_mic_ctx),
.cra_module = THIS_MODULE,
+ .cra_alignmask = 3,
.cra_list = LIST_HEAD_INIT(michael_mic_alg.cra_list),
.cra_u = { .digest = {
.dia_digestsize = 8,
.cra_list = LIST_HEAD_INIT(michael_mic_alg.cra_list),
.cra_u = { .digest = {
.dia_digestsize = 8,
@@
-172,4
+173,4
@@
module_exit(michael_mic_exit);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("Michael MIC");
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("Michael MIC");
-MODULE_AUTHOR("Jouni Malinen <j
kmaline@cc.hut
.fi>");
+MODULE_AUTHOR("Jouni Malinen <j
@w1
.fi>");