diff options
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 f0b4275ab22..ecbb15b297a 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]; |