Lines Matching refs:mctx
13 static void michael_block(struct michael_mic_ctx *mctx, u32 val) in michael_block() argument
15 mctx->l ^= val; in michael_block()
16 mctx->r ^= rol32(mctx->l, 17); in michael_block()
17 mctx->l += mctx->r; in michael_block()
18 mctx->r ^= ((mctx->l & 0xff00ff00) >> 8) | in michael_block()
19 ((mctx->l & 0x00ff00ff) << 8); in michael_block()
20 mctx->l += mctx->r; in michael_block()
21 mctx->r ^= rol32(mctx->l, 3); in michael_block()
22 mctx->l += mctx->r; in michael_block()
23 mctx->r ^= ror32(mctx->l, 2); in michael_block()
24 mctx->l += mctx->r; in michael_block()
27 static void michael_mic_hdr(struct michael_mic_ctx *mctx, const u8 *key, in michael_mic_hdr() argument
39 mctx->l = get_unaligned_le32(key); in michael_mic_hdr()
40 mctx->r = get_unaligned_le32(key + 4); in michael_mic_hdr()
46 michael_block(mctx, get_unaligned_le32(da)); in michael_mic_hdr()
47 michael_block(mctx, get_unaligned_le16(&da[4]) | in michael_mic_hdr()
49 michael_block(mctx, get_unaligned_le32(&sa[2])); in michael_mic_hdr()
50 michael_block(mctx, tid); in michael_mic_hdr()
58 struct michael_mic_ctx mctx; in michael_mic() local
60 michael_mic_hdr(&mctx, key, hdr); in michael_mic()
67 michael_block(&mctx, get_unaligned_le32(&data[block * 4])); in michael_mic()
78 michael_block(&mctx, val); in michael_mic()
79 michael_block(&mctx, 0); in michael_mic()
81 put_unaligned_le32(mctx.l, mic); in michael_mic()
82 put_unaligned_le32(mctx.r, mic + 4); in michael_mic()