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
nexedi
linux
Commits
6fd22799
Commit
6fd22799
authored
Apr 22, 2003
by
Duncan Sands
Committed by
Greg Kroah-Hartman
Apr 22, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB speedtouch: crc optimization
parent
b46557e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
drivers/usb/misc/speedtch.c
drivers/usb/misc/speedtch.c
+4
-4
No files found.
drivers/usb/misc/speedtch.c
View file @
6fd22799
...
@@ -406,11 +406,12 @@ static struct sk_buff *udsl_decode_aal5 (struct udsl_vcc_data *ctx, struct sk_bu
...
@@ -406,11 +406,12 @@ static struct sk_buff *udsl_decode_aal5 (struct udsl_vcc_data *ctx, struct sk_bu
** encode **
** encode **
*************/
*************/
static
const
unsigned
char
zeros
[
ATM_CELL_PAYLOAD
];
static
void
udsl_groom_skb
(
struct
atm_vcc
*
vcc
,
struct
sk_buff
*
skb
)
static
void
udsl_groom_skb
(
struct
atm_vcc
*
vcc
,
struct
sk_buff
*
skb
)
{
{
struct
udsl_control
*
ctrl
=
UDSL_SKB
(
skb
);
struct
udsl_control
*
ctrl
=
UDSL_SKB
(
skb
);
unsigned
int
i
,
zero_padding
;
unsigned
int
zero_padding
;
unsigned
char
zero
=
0
;
u32
crc
;
u32
crc
;
ctrl
->
atm_data
.
vcc
=
vcc
;
ctrl
->
atm_data
.
vcc
=
vcc
;
...
@@ -436,8 +437,7 @@ static void udsl_groom_skb (struct atm_vcc *vcc, struct sk_buff *skb)
...
@@ -436,8 +437,7 @@ static void udsl_groom_skb (struct atm_vcc *vcc, struct sk_buff *skb)
ctrl
->
aal5_trailer
[
3
]
=
skb
->
len
;
ctrl
->
aal5_trailer
[
3
]
=
skb
->
len
;
crc
=
crc32_be
(
~
0
,
skb
->
data
,
skb
->
len
);
crc
=
crc32_be
(
~
0
,
skb
->
data
,
skb
->
len
);
for
(
i
=
0
;
i
<
zero_padding
;
i
++
)
crc
=
crc32_be
(
crc
,
zeros
,
zero_padding
);
crc
=
crc32_be
(
crc
,
&
zero
,
1
);
crc
=
crc32_be
(
crc
,
ctrl
->
aal5_trailer
,
4
);
crc
=
crc32_be
(
crc
,
ctrl
->
aal5_trailer
,
4
);
crc
=
~
crc
;
crc
=
~
crc
;
...
...
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