Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
a1bed4d5
Commit
a1bed4d5
authored
Oct 15, 2002
by
Maksim Krasnyanskiy
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
b8ba2a4d
e05f7d70
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
5 additions
and
77 deletions
+5
-77
lib/Makefile
lib/Makefile
+1
-0
net/bluetooth/bnep/Makefile
net/bluetooth/bnep/Makefile
+1
-1
net/bluetooth/bnep/Makefile.lib
net/bluetooth/bnep/Makefile.lib
+1
-0
net/bluetooth/bnep/bnep.h
net/bluetooth/bnep/bnep.h
+2
-3
net/bluetooth/bnep/core.c
net/bluetooth/bnep/core.c
+0
-4
net/bluetooth/bnep/crc32.c
net/bluetooth/bnep/crc32.c
+0
-59
net/bluetooth/bnep/crc32.h
net/bluetooth/bnep/crc32.h
+0
-10
No files found.
lib/Makefile
View file @
a1bed4d5
...
@@ -29,5 +29,6 @@ obj-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate/
...
@@ -29,5 +29,6 @@ obj-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate/
include
$(TOPDIR)/drivers/net/Makefile.lib
include
$(TOPDIR)/drivers/net/Makefile.lib
include
$(TOPDIR)/drivers/usb/class/Makefile.lib
include
$(TOPDIR)/drivers/usb/class/Makefile.lib
include
$(TOPDIR)/fs/Makefile.lib
include
$(TOPDIR)/fs/Makefile.lib
include
$(TOPDIR)/net/bluetooth/bnep/Makefile.lib
include
$(TOPDIR)/Rules.make
include
$(TOPDIR)/Rules.make
net/bluetooth/bnep/Makefile
View file @
a1bed4d5
...
@@ -4,6 +4,6 @@
...
@@ -4,6 +4,6 @@
obj-$(CONFIG_BT_BNEP)
+=
bnep.o
obj-$(CONFIG_BT_BNEP)
+=
bnep.o
bnep-objs
:=
core.o sock.o netdev.o
crc32.o
bnep-objs
:=
core.o sock.o netdev.o
include
$(TOPDIR)/Rules.make
include
$(TOPDIR)/Rules.make
net/bluetooth/bnep/Makefile.lib
0 → 100644
View file @
a1bed4d5
obj-$(CONFIG_BT_BNEP)
+=
crc32.o
net/bluetooth/bnep/bnep.h
View file @
a1bed4d5
...
@@ -24,10 +24,9 @@
...
@@ -24,10 +24,9 @@
#define _BNEP_H
#define _BNEP_H
#include <linux/types.h>
#include <linux/types.h>
#include <linux/crc32.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/bluetooth.h>
#include "crc32.h"
// Limits
// Limits
#define BNEP_MAX_PROTO_FILTERS 5
#define BNEP_MAX_PROTO_FILTERS 5
#define BNEP_MAX_MULTICAST_FILTERS 20
#define BNEP_MAX_MULTICAST_FILTERS 20
...
@@ -179,7 +178,7 @@ int bnep_sock_cleanup(void);
...
@@ -179,7 +178,7 @@ int bnep_sock_cleanup(void);
static
inline
int
bnep_mc_hash
(
__u8
*
addr
)
static
inline
int
bnep_mc_hash
(
__u8
*
addr
)
{
{
return
(
bnep_crc32
(
~
0
,
addr
,
ETH_ALEN
)
>>
26
);
return
(
crc32_be
(
~
0
,
addr
,
ETH_ALEN
)
>>
26
);
}
}
#endif
#endif
net/bluetooth/bnep/core.c
View file @
a1bed4d5
...
@@ -712,16 +712,12 @@ static int __init bnep_init_module(void)
...
@@ -712,16 +712,12 @@ static int __init bnep_init_module(void)
bnep_sock_init
();
bnep_sock_init
();
bnep_crc32_init
();
return
0
;
return
0
;
}
}
static
void
__exit
bnep_cleanup_module
(
void
)
static
void
__exit
bnep_cleanup_module
(
void
)
{
{
bnep_sock_cleanup
();
bnep_sock_cleanup
();
bnep_crc32_cleanup
();
}
}
module_init
(
bnep_init_module
);
module_init
(
bnep_init_module
);
...
...
net/bluetooth/bnep/crc32.c
deleted
100644 → 0
View file @
b8ba2a4d
/*
* Based on linux-2.5/lib/crc32 by Matt Domsch <Matt_Domsch@dell.com>
*
* FIXME: Remove in 2.5
*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <asm/atomic.h>
#include "crc32.h"
#define CRCPOLY_BE 0x04c11db7
#define CRC_BE_BITS 8
static
u32
*
bnep_crc32_table
;
/*
* This code is in the public domain; copyright abandoned.
* Liability for non-performance of this code is limited to the amount
* you paid for it. Since it is distributed for free, your refund will
* be very very small. If it breaks, you get to keep both pieces.
*/
u32
bnep_crc32
(
u32
crc
,
unsigned
char
const
*
p
,
size_t
len
)
{
while
(
len
--
)
crc
=
(
crc
<<
8
)
^
bnep_crc32_table
[(
crc
>>
24
)
^
*
p
++
];
return
crc
;
}
int
__init
bnep_crc32_init
(
void
)
{
unsigned
i
,
j
;
u32
crc
=
0x80000000
;
bnep_crc32_table
=
kmalloc
((
1
<<
CRC_BE_BITS
)
*
sizeof
(
u32
),
GFP_KERNEL
);
if
(
!
bnep_crc32_table
)
return
-
ENOMEM
;
bnep_crc32_table
[
0
]
=
0
;
for
(
i
=
1
;
i
<
1
<<
CRC_BE_BITS
;
i
<<=
1
)
{
crc
=
(
crc
<<
1
)
^
((
crc
&
0x80000000
)
?
CRCPOLY_BE
:
0
);
for
(
j
=
0
;
j
<
i
;
j
++
)
bnep_crc32_table
[
i
+
j
]
=
crc
^
bnep_crc32_table
[
j
];
}
return
0
;
}
void
__exit
bnep_crc32_cleanup
(
void
)
{
if
(
bnep_crc32_table
)
kfree
(
bnep_crc32_table
);
bnep_crc32_table
=
NULL
;
}
net/bluetooth/bnep/crc32.h
deleted
100644 → 0
View file @
b8ba2a4d
/*
* crc32.h
* See crc32.c for license and changes
*
* FIXME: Remove in 2.5
*/
int
bnep_crc32_init
(
void
);
void
bnep_crc32_cleanup
(
void
);
u32
bnep_crc32
(
u32
crc
,
unsigned
char
const
*
p
,
size_t
len
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment