diff options
author | Fabio M. De Francesco <fmdefrancesco@gmail.com> | 2021-07-23 21:26:20 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-27 15:17:23 +0200 |
commit | 51f59d684b0c65563ad16e5e179ad021a05951c5 (patch) | |
tree | 45f4fece4d3f22acedd440f6962a381a82a5289f /drivers/staging/rtl8188eu | |
parent | eeacf4cce0b183c2cf61a9c1ea6db7a0ab9c2600 (diff) |
staging: rtl8188eu: Remove no more used functions and variables
Remove the functions and variables from rtw_security.c that are no more
necessary since the patch that replaces getcrc32() with crc32_le().
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210723192620.10669-3-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu')
-rw-r--r-- | drivers/staging/rtl8188eu/core/rtw_security.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_security.c b/drivers/staging/rtl8188eu/core/rtw_security.c index 7001f24f118d..7185c1ae2ab8 100644 --- a/drivers/staging/rtl8188eu/core/rtw_security.c +++ b/drivers/staging/rtl8188eu/core/rtw_security.c @@ -76,42 +76,6 @@ static void arcfour_encrypt(struct arc4context *parc4ctx, u8 *dest, u8 *src, u32 dest[i] = src[i] ^ (unsigned char)arcfour_byte(parc4ctx); } -static int bcrc32initialized; -static u32 crc32_table[256]; - -static u8 crc32_reverseBit(u8 data) -{ - return (u8)((data << 7) & 0x80) | ((data << 5) & 0x40) | ((data << 3) & 0x20) | - ((data << 1) & 0x10) | ((data >> 1) & 0x08) | ((data >> 3) & 0x04) | - ((data >> 5) & 0x02) | ((data >> 7) & 0x01); -} - -static void crc32_init(void) -{ - int i, j; - u32 c; - u8 *p = (u8 *)&c, *p1; - u8 k; - - if (bcrc32initialized == 1) - return; - - c = 0x12340000; - - for (i = 0; i < 256; ++i) { - k = crc32_reverseBit((u8)i); - for (c = ((u32)k) << 24, j = 8; j > 0; --j) - c = c & 0x80000000 ? (c << 1) ^ CRC32_POLY : (c << 1); - p1 = (u8 *)&crc32_table[i]; - - p1[0] = crc32_reverseBit(p[3]); - p1[1] = crc32_reverseBit(p[2]); - p1[2] = crc32_reverseBit(p[1]); - p1[3] = crc32_reverseBit(p[0]); - } - bcrc32initialized = 1; -} - /* Need to consider the fragment situation */ void rtw_wep_encrypt(struct adapter *padapter, struct xmit_frame *pxmitframe) { |