]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - drivers/staging/winbond/ds_tkip.h
9c5c4e73f2c26e54d307076c066d31d659b51d03
[linux-2.6-omap-h63xx.git] / drivers / staging / winbond / ds_tkip.h
1 #ifndef __WINBOND_DS_TKIP_H
2 #define __WINBOND_DS_TKIP_H
3
4 #include <linux/types.h>
5
6 // Rotation functions on 32 bit values
7 #define ROL32( A, n ) \
8     ( ((A) << (n)) | ( ((A)>>(32-(n)))  & ( (1UL << (n)) - 1 ) ) )
9
10 #define ROR32( A, n )   ROL32( (A), 32-(n) )
11
12
13 typedef struct tkip
14 {
15     u32 K0, K1;         // Key
16         union
17         {
18                 struct // Current state
19                 {
20                         u32     L;
21                         u32     R;
22                 };
23                 u8      LR[8];
24         };
25         union
26         {
27                 u32     M;              // Message accumulator (single word)
28                 u8      Mb[4];
29         };
30         s32             bytes_in_M;     // # bytes in M
31 } tkip_t;
32
33 //void _append_data( u8 *pData, u16 size, tkip_t *p );
34 void Mds_MicGet(  void* adapter,  void* pRxLayer1,  u8 *pKey,  u8 *pMic );
35 void Mds_MicFill(  void* adapter,  void* pDes,  u8 *XmitBufAddress );
36
37 #endif