aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/winbond/ds_tkip.h
diff options
context:
space:
mode:
authorPavel Machek <pavel@suse.cz>2008-10-01 14:36:56 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2008-10-10 15:31:09 -0700
commit66101de10957e07a6fd0365d5af9adf650246d14 (patch)
tree3a13f4d2ca1d5075523a7c82f8b53b0fc5d1b971 /drivers/staging/winbond/ds_tkip.h
parent4d7b5c7f8ad49b7f01fb8aed83c560ac43cfbda8 (diff)
Staging: add w35und wifi driver
This is driver for w35und usb wifi -- also in kohjinsha subnotebook. It should work well enough to associate and ping, but it obviously needs to be rewritten two more times... OTOH worst horrors (like embedded wifi stack) should have been fixed already... Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/winbond/ds_tkip.h')
-rw-r--r--drivers/staging/winbond/ds_tkip.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/staging/winbond/ds_tkip.h b/drivers/staging/winbond/ds_tkip.h
new file mode 100644
index 00000000000..29e5055b45a
--- /dev/null
+++ b/drivers/staging/winbond/ds_tkip.h
@@ -0,0 +1,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( PUCHAR pData, u16 size, tkip_t *p );
+void Mds_MicGet( void* Adapter, void* pRxLayer1, PUCHAR pKey, PUCHAR pMic );
+void Mds_MicFill( void* Adapter, void* pDes, PUCHAR XmitBufAddress );
+
+
+