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