GNU Linux-libre 4.14.251-gnu1
[releases.git] / drivers / staging / ks7010 / michael_mic.h
1 /*
2  *   Driver for KeyStream wireless LAN
3  *
4  *   Copyright (C) 2005-2008 KeyStream Corp.
5  *   Copyright (C) 2009 Renesas Technology Corp.
6  *
7  *   This program is free software; you can redistribute it and/or modify
8  *   it under the terms of the GNU General Public License version 2 as
9  *   published by the Free Software Foundation.
10  */
11
12 /* MichaelMIC routine define */
13 struct michael_mic_t {
14         u32 K0; // Key
15         u32 K1; // Key
16         u32 L;  // Current state
17         u32 R;  // Current state
18         u8 M[4];        // Message accumulator (single word)
19         int nBytesInM;  // # bytes in M
20         u8 Result[8];
21 };
22
23 void MichaelMICFunction(struct michael_mic_t *Mic, u8 *Key,
24                         u8 *Data, int Len, u8 priority,
25                         u8 *Result);