Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ecdb984 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Herbert Xu
Browse files

staging: rtl: Use existing define with polynomial



Do not define again the polynomial but use header with existing define.

Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 5d258b48
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@
#include <linux/uaccess.h>
#include <asm/byteorder.h>
#include <linux/atomic.h>
#include <linux/crc32poly.h>
#include <linux/semaphore.h>

#include "osdep_service.h"
@@ -49,8 +50,6 @@

/* =====WEP related===== */

#define CRC32_POLY 0x04c11db7

struct arc4context {
	u32 x;
	u32 y;
@@ -135,7 +134,7 @@ static void crc32_init(void)
	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);
			c = c & 0x80000000 ? (c << 1) ^ CRC32_POLY_BE : (c << 1);
		p1 = (u8 *)&crc32_table[i];
		p1[0] = crc32_reverseBit(p[3]);
		p1[1] = crc32_reverseBit(p[2]);
+2 −3
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
 ******************************************************************************/
#define  _RTW_SECURITY_C_

#include <linux/crc32poly.h>
#include <drv_types.h>
#include <rtw_debug.h>

@@ -87,8 +88,6 @@ const char *security_type_str(u8 value)

/* WEP related ===== */

#define CRC32_POLY 0x04c11db7

struct arc4context {
	u32 x;
	u32 y;
@@ -178,7 +177,7 @@ static void crc32_init(void)
		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);
				c = c & 0x80000000 ? (c << 1) ^ CRC32_POLY_BE : (c << 1);
			}
			p1 = (u8 *)&crc32_table[i];