File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 40
40
#include <linux/uaccess.h>
41
41
#include <asm/byteorder.h>
42
42
#include <linux/atomic.h>
43
+ #include <linux/crc32poly.h>
43
44
#include <linux/semaphore.h>
44
45
45
46
#include "osdep_service.h"
49
50
50
51
/* =====WEP related===== */
51
52
52
- #define CRC32_POLY 0x04c11db7
53
-
54
53
struct arc4context {
55
54
u32 x ;
56
55
u32 y ;
@@ -135,7 +134,7 @@ static void crc32_init(void)
135
134
for (i = 0 ; i < 256 ; ++ i ) {
136
135
k = crc32_reverseBit ((u8 )i );
137
136
for (c = ((u32 )k ) << 24 , j = 8 ; j > 0 ; -- j )
138
- c = c & 0x80000000 ? (c << 1 ) ^ CRC32_POLY : (c << 1 );
137
+ c = c & 0x80000000 ? (c << 1 ) ^ CRC32_POLY_BE : (c << 1 );
139
138
p1 = (u8 * )& crc32_table [i ];
140
139
p1 [0 ] = crc32_reverseBit (p [3 ]);
141
140
p1 [1 ] = crc32_reverseBit (p [2 ]);
Original file line number Diff line number Diff line change 6
6
******************************************************************************/
7
7
#define _RTW_SECURITY_C_
8
8
9
+ #include <linux/crc32poly.h>
9
10
#include <drv_types.h>
10
11
#include <rtw_debug.h>
11
12
@@ -87,8 +88,6 @@ const char *security_type_str(u8 value)
87
88
88
89
/* WEP related ===== */
89
90
90
- #define CRC32_POLY 0x04c11db7
91
-
92
91
struct arc4context {
93
92
u32 x ;
94
93
u32 y ;
@@ -178,7 +177,7 @@ static void crc32_init(void)
178
177
for (i = 0 ; i < 256 ; ++ i ) {
179
178
k = crc32_reverseBit ((u8 )i );
180
179
for (c = ((u32 )k ) << 24 , j = 8 ; j > 0 ; -- j ) {
181
- c = c & 0x80000000 ? (c << 1 ) ^ CRC32_POLY : (c << 1 );
180
+ c = c & 0x80000000 ? (c << 1 ) ^ CRC32_POLY_BE : (c << 1 );
182
181
}
183
182
p1 = (u8 * )& crc32_table [i ];
184
183
You can’t perform that action at this time.
0 commit comments