diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2008-10-29 10:42:53 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-06 13:51:56 -0800 |
commit | aaad430378dd128ee015c8ed6e77809317c496a5 (patch) | |
tree | 8f540c92547f97fd167cf7384731f142e9ecb153 /drivers/staging/wlan-ng/p80211wep.c | |
parent | 5704976fa9924c1b51b07f30dea7fb3828f6b76f (diff) | |
download | op-kernel-dev-aaad430378dd128ee015c8ed6e77809317c496a5.zip op-kernel-dev-aaad430378dd128ee015c8ed6e77809317c496a5.tar.gz |
Staging: wlan-ng: Use standard kernel integer (u32/s32/etc) types.
wlan-ng needed to interact with userspace, and support very old kernels,
so it used to define its own types for integers to ensure consistency.
It's all rather irrelevant now.
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/wlan-ng/p80211wep.c')
-rw-r--r-- | drivers/staging/wlan-ng/p80211wep.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/staging/wlan-ng/p80211wep.c b/drivers/staging/wlan-ng/p80211wep.c index 0ab0d07..46a2a6b 100644 --- a/drivers/staging/wlan-ng/p80211wep.c +++ b/drivers/staging/wlan-ng/p80211wep.c @@ -72,7 +72,7 @@ /*================================================================*/ /* Local Constants */ -#define SSWAP(a,b) {UINT8 tmp = s[a]; s[a] = s[b]; s[b] = tmp;} +#define SSWAP(a,b) {u8 tmp = s[a]; s[a] = s[b]; s[b] = tmp;} #define WEP_KEY(x) (((x) & 0xC0) >> 6) /*================================================================*/ @@ -86,7 +86,7 @@ /*================================================================*/ /* Local Static Definitions */ -static const UINT32 wep_crc32_table[256] = { +static const u32 wep_crc32_table[256] = { 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, @@ -149,7 +149,7 @@ static const UINT32 wep_crc32_table[256] = { /* keylen in bytes! */ -int wep_change_key(wlandevice_t *wlandev, int keynum, UINT8* key, int keylen) +int wep_change_key(wlandevice_t *wlandev, int keynum, u8* key, int keylen) { if (keylen < 0) return -1; if (keylen >= MAX_KEYLEN) return -1; @@ -172,11 +172,11 @@ int wep_change_key(wlandevice_t *wlandev, int keynum, UINT8* key, int keylen) 4-byte IV at start of buffer, 4-byte ICV at end of buffer. if successful, buf start is payload begin, length -= 8; */ -int wep_decrypt(wlandevice_t *wlandev, UINT8 *buf, UINT32 len, int key_override, UINT8 *iv, UINT8 *icv) +int wep_decrypt(wlandevice_t *wlandev, u8 *buf, u32 len, int key_override, u8 *iv, u8 *icv) { - UINT32 i, j, k, crc, keylen; - UINT8 s[256], key[64], c_crc[4]; - UINT8 keyidx; + u32 i, j, k, crc, keylen; + u8 s[256], key[64], c_crc[4]; + u8 keyidx; /* Needs to be at least 8 bytes of payload */ if (len <= 0) return -1; @@ -244,10 +244,10 @@ int wep_decrypt(wlandevice_t *wlandev, UINT8 *buf, UINT32 len, int key_override, } /* encrypts in-place. */ -int wep_encrypt(wlandevice_t *wlandev, UINT8 *buf, UINT8 *dst, UINT32 len, int keynum, UINT8 *iv, UINT8 *icv) +int wep_encrypt(wlandevice_t *wlandev, u8 *buf, u8 *dst, u32 len, int keynum, u8 *iv, u8 *icv) { - UINT32 i, j, k, crc, keylen; - UINT8 s[256], key[64]; + u32 i, j, k, crc, keylen; + u8 s[256], key[64]; /* no point in WEPping an empty frame */ if (len <= 0) return -1; |