diff options
Diffstat (limited to 'crypto/michael_mic.c')
-rw-r--r-- | crypto/michael_mic.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/crypto/michael_mic.c b/crypto/michael_mic.c index 701f859ed767..d061da21cfda 100644 --- a/crypto/michael_mic.c +++ b/crypto/michael_mic.c | |||
@@ -45,16 +45,17 @@ do { \ | |||
45 | } while (0) | 45 | } while (0) |
46 | 46 | ||
47 | 47 | ||
48 | static void michael_init(void *ctx) | 48 | static void michael_init(struct crypto_tfm *tfm) |
49 | { | 49 | { |
50 | struct michael_mic_ctx *mctx = ctx; | 50 | struct michael_mic_ctx *mctx = crypto_tfm_ctx(tfm); |
51 | mctx->pending_len = 0; | 51 | mctx->pending_len = 0; |
52 | } | 52 | } |
53 | 53 | ||
54 | 54 | ||
55 | static void michael_update(void *ctx, const u8 *data, unsigned int len) | 55 | static void michael_update(struct crypto_tfm *tfm, const u8 *data, |
56 | unsigned int len) | ||
56 | { | 57 | { |
57 | struct michael_mic_ctx *mctx = ctx; | 58 | struct michael_mic_ctx *mctx = crypto_tfm_ctx(tfm); |
58 | const __le32 *src; | 59 | const __le32 *src; |
59 | 60 | ||
60 | if (mctx->pending_len) { | 61 | if (mctx->pending_len) { |
@@ -90,9 +91,9 @@ static void michael_update(void *ctx, const u8 *data, unsigned int len) | |||
90 | } | 91 | } |
91 | 92 | ||
92 | 93 | ||
93 | static void michael_final(void *ctx, u8 *out) | 94 | static void michael_final(struct crypto_tfm *tfm, u8 *out) |
94 | { | 95 | { |
95 | struct michael_mic_ctx *mctx = ctx; | 96 | struct michael_mic_ctx *mctx = crypto_tfm_ctx(tfm); |
96 | u8 *data = mctx->pending; | 97 | u8 *data = mctx->pending; |
97 | __le32 *dst = (__le32 *)out; | 98 | __le32 *dst = (__le32 *)out; |
98 | 99 | ||
@@ -121,10 +122,10 @@ static void michael_final(void *ctx, u8 *out) | |||
121 | } | 122 | } |
122 | 123 | ||
123 | 124 | ||
124 | static int michael_setkey(void *ctx, const u8 *key, unsigned int keylen, | 125 | static int michael_setkey(struct crypto_tfm *tfm, const u8 *key, |
125 | u32 *flags) | 126 | unsigned int keylen, u32 *flags) |
126 | { | 127 | { |
127 | struct michael_mic_ctx *mctx = ctx; | 128 | struct michael_mic_ctx *mctx = crypto_tfm_ctx(tfm); |
128 | const __le32 *data = (const __le32 *)key; | 129 | const __le32 *data = (const __le32 *)key; |
129 | 130 | ||
130 | if (keylen != 8) { | 131 | if (keylen != 8) { |