diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 11:41:17 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 11:41:17 -0700 |
commit | cc41f5cede3c63836d1c0958204630b07f5b5ee7 (patch) | |
tree | dfd94451c919b5185d8a01fd3e5a90244fb0de1c /drivers/staging/vt6655/michael.c | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 (diff) | |
parent | Staging: wlan-ng: Update prism2_set_tx_power() to use mBm (diff) | |
download | linux-dev-cc41f5cede3c63836d1c0958204630b07f5b5ee7.tar.xz linux-dev-cc41f5cede3c63836d1c0958204630b07f5b5ee7.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (524 commits)
Staging: wlan-ng: Update prism2_set_tx_power() to use mBm
Staging: ti-st: update TODO
Staging: wlags49_h2: use common PCI_VENDOR/DEVICE_ID name format
Staging: comedi : fix brace coding style issue in wwrap.c
Staging: quatech_usb2: remove unused qt2_box_flush function
Staging: slicoss: Remove net_device_stats from the driver's private
staging: rtl8192su: check whether requests succeeded
staging: panel: fix error path
staging: otus: check kmalloc() return value
staging: octeon: check request_irq() return value
Staging: wlan-ng: remove typedef in p80211hdr.h
Staging: wlan-ng: fix checkpatch issues in headers.
Staging: wlan-ng: remove typedef in p80211ioctl.h
Staging: wlan-ng: fix style issues in p80211conv.h
Staging: wlan-ng: fix style issues for p80211hdr.h
staging: vt6656: removed NTSTATUS definition
staging: vt6656: simplified tests involving both multi/broad-casts
Staging: vt6655: replace BOOL with in kernel bool
Staging: vt6655: replace FALSE with in kernel false
Staging: vt6655: replace TRUE with in kernel true
...
Diffstat (limited to 'drivers/staging/vt6655/michael.c')
-rw-r--r-- | drivers/staging/vt6655/michael.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/staging/vt6655/michael.c b/drivers/staging/vt6655/michael.c index 0bf57efdede0..67618f069d0d 100644 --- a/drivers/staging/vt6655/michael.c +++ b/drivers/staging/vt6655/michael.c @@ -26,8 +26,8 @@ * Date: Sep 4, 2002 * * Functions: - * s_dwGetUINT32 - Convert from BYTE[] to DWORD in a portable way - * s_vPutUINT32 - Convert from DWORD to BYTE[] in a portable way + * s_dwGetUINT32 - Convert from unsigned char [] to unsigned long in a portable way + * s_vPutUINT32 - Convert from unsigned long to unsigned char [] in a portable way * s_vClear - Reset the state to the empty message. * s_vSetKey - Set the key. * MIC_vInit - Set the key. @@ -48,29 +48,29 @@ /*--------------------- Static Functions --------------------------*/ /* -static DWORD s_dwGetUINT32(BYTE * p); // Get DWORD from 4 bytes LSByte first -static void s_vPutUINT32(BYTE* p, DWORD val); // Put DWORD into 4 bytes LSByte first +static unsigned long s_dwGetUINT32(unsigned char *p); // Get unsigned long from 4 bytes LSByte first +static void s_vPutUINT32(unsigned char *p, unsigned long val); // Put unsigned long into 4 bytes LSByte first */ static void s_vClear(void); // Clear the internal message, // resets the object to the state just after construction. -static void s_vSetKey(DWORD dwK0, DWORD dwK1); -static void s_vAppendByte(BYTE b); // Add a single byte to the internal message +static void s_vSetKey(unsigned long dwK0, unsigned long dwK1); +static void s_vAppendByte(unsigned char b); // Add a single byte to the internal message /*--------------------- Export Variables --------------------------*/ -static DWORD L, R; // Current state +static unsigned long L, R; // Current state -static DWORD K0, K1; // Key -static DWORD M; // Message accumulator (single word) -static UINT nBytesInM; // # bytes in M +static unsigned long K0, K1; // Key +static unsigned long M; // Message accumulator (single word) +static unsigned int nBytesInM; // # bytes in M /*--------------------- Export Functions --------------------------*/ /* -static DWORD s_dwGetUINT32 (BYTE * p) -// Convert from BYTE[] to DWORD in a portable way +static unsigned long s_dwGetUINT32 (unsigned char *p) +// Convert from unsigned char [] to unsigned long in a portable way { - DWORD res = 0; - UINT i; + unsigned long res = 0; + unsigned int i; for(i=0; i<4; i++ ) { res |= (*p++) << (8*i); @@ -78,13 +78,13 @@ static DWORD s_dwGetUINT32 (BYTE * p) return res; } -static void s_vPutUINT32 (BYTE* p, DWORD val) -// Convert from DWORD to BYTE[] in a portable way +static void s_vPutUINT32 (unsigned char *p, unsigned long val) +// Convert from unsigned long to unsigned char [] in a portable way { - UINT i; + unsigned int i; for(i=0; i<4; i++ ) { - *p++ = (BYTE) (val & 0xff); + *p++ = (unsigned char) (val & 0xff); val >>= 8; } } @@ -99,7 +99,7 @@ static void s_vClear (void) M = 0; } -static void s_vSetKey (DWORD dwK0, DWORD dwK1) +static void s_vSetKey (unsigned long dwK0, unsigned long dwK1) { // Set the key K0 = dwK0; @@ -108,7 +108,7 @@ static void s_vSetKey (DWORD dwK0, DWORD dwK1) s_vClear(); } -static void s_vAppendByte (BYTE b) +static void s_vAppendByte (unsigned char b) { // Append the byte to our word-sized buffer M |= b << (8*nBytesInM); @@ -131,7 +131,7 @@ static void s_vAppendByte (BYTE b) } } -void MIC_vInit (DWORD dwK0, DWORD dwK1) +void MIC_vInit (unsigned long dwK0, unsigned long dwK1) { // Set the key s_vSetKey(dwK0, dwK1); @@ -149,7 +149,7 @@ void MIC_vUnInit (void) s_vClear(); } -void MIC_vAppend (PBYTE src, UINT nBytes) +void MIC_vAppend (unsigned char *src, unsigned int nBytes) { // This is simple while (nBytes > 0) @@ -159,7 +159,7 @@ void MIC_vAppend (PBYTE src, UINT nBytes) } } -void MIC_vGetMIC (PDWORD pdwL, PDWORD pdwR) +void MIC_vGetMIC (unsigned long *pdwL, unsigned long *pdwR) { // Append the minimum padding s_vAppendByte(0x5a); |