diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-22 19:54:53 (GMT) |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-22 20:01:40 (GMT) |
commit | ae19ffbadc1b2100285a5b5b3d0a4e0a11390904 (patch) | |
tree | 3c2086ab67398a019089a47ca3f362a4bc6db74f /drivers/staging/wlan-ng/p80211wep.c | |
parent | 34e84f39a27d059a3e6ec6e8b94aafa702e6f220 (diff) | |
parent | 9173a8ef24a6b1b8031507b35b8ffe5f85a87692 (diff) | |
download | linux-fsl-qoriq-ae19ffbadc1b2100285a5b5b3d0a4e0a11390904.tar.xz |
Merge branch 'master' into for-linus
Diffstat (limited to 'drivers/staging/wlan-ng/p80211wep.c')
-rw-r--r-- | drivers/staging/wlan-ng/p80211wep.c | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/drivers/staging/wlan-ng/p80211wep.c b/drivers/staging/wlan-ng/p80211wep.c index f0b4275..ecbb15b 100644 --- a/drivers/staging/wlan-ng/p80211wep.c +++ b/drivers/staging/wlan-ng/p80211wep.c @@ -54,10 +54,7 @@ #include <linux/random.h> #include <linux/kernel.h> -// #define WEP_DEBUG - -/*================================================================*/ -/* Project Includes */ +/* #define WEP_DEBUG */ #include "p80211hdr.h" #include "p80211types.h" @@ -65,14 +62,8 @@ #include "p80211conv.h" #include "p80211netdev.h" -/*================================================================*/ -/* Local Constants */ - #define WEP_KEY(x) (((x) & 0xC0) >> 6) -/*================================================================*/ -/* Local Static Definitions */ - static const u32 wep_crc32_table[256] = { 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, @@ -128,15 +119,9 @@ static const u32 wep_crc32_table[256] = { 0x2d02ef8dL }; -/*================================================================*/ -/* Local Function Declarations */ - -/*================================================================*/ -/* Function Definitions */ - /* keylen in bytes! */ -int wep_change_key(wlandevice_t * wlandev, int keynum, u8 * key, int keylen) +int wep_change_key(wlandevice_t *wlandev, int keynum, u8 *key, int keylen) { if (keylen < 0) return -1; @@ -166,8 +151,8 @@ int wep_change_key(wlandevice_t * wlandev, int keynum, u8 * 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, u8 * buf, u32 len, int key_override, - u8 * iv, u8 * icv) +int wep_decrypt(wlandevice_t *wlandev, u8 *buf, u32 len, int key_override, + u8 *iv, u8 *icv) { u32 i, j, k, crc, keylen; u8 s[256], key[64], c_crc[4]; @@ -245,8 +230,8 @@ int wep_decrypt(wlandevice_t * wlandev, u8 * buf, u32 len, int key_override, } /* encrypts in-place. */ -int wep_encrypt(wlandevice_t * wlandev, u8 * buf, u8 * dst, u32 len, int keynum, - u8 * iv, u8 * icv) +int wep_encrypt(wlandevice_t *wlandev, u8 *buf, u8 *dst, u32 len, int keynum, + u8 *iv, u8 *icv) { u32 i, j, k, crc, keylen; u8 s[256], key[64]; |