summaryrefslogtreecommitdiff
path: root/drivers/staging/winbond/ds_tkip.h
blob: 6841d66e7e8cfe831e271ad171b10dceb36bc001 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Rotation functions on 32 bit values
#define ROL32( A, n ) \
    ( ((A) << (n)) | ( ((A)>>(32-(n)))  & ( (1UL << (n)) - 1 ) ) )

#define ROR32( A, n )   ROL32( (A), 32-(n) )


typedef struct tkip
{
    u32	K0, K1;		// Key
	union
	{
		struct // Current state
		{
			u32	L;
			u32	R;
		};
		u8	LR[8];
	};
	union
	{
		u32	M;		// Message accumulator (single word)
		u8	Mb[4];
	};
	s32		bytes_in_M;	// # bytes in M
} tkip_t;

//void _append_data( u8 *pData, u16 size, tkip_t *p );
void Mds_MicGet(  void* Adapter,  void* pRxLayer1,  u8 *pKey,  u8 *pMic );
void Mds_MicFill(  void* Adapter,  void* pDes,  u8 *XmitBufAddress );