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
d530fb24
Commit
d530fb24
authored
Jan 10, 2003
by
Alan Cox
Committed by
Linus Torvalds
Jan 10, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] fix lance using skb_padto
parent
bcef46b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
drivers/net/lance.c
drivers/net/lance.c
+9
-2
No files found.
drivers/net/lance.c
View file @
d530fb24
...
@@ -899,8 +899,14 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -899,8 +899,14 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
/* The old LANCE chips doesn't automatically pad buffers to min. size. */
/* The old LANCE chips doesn't automatically pad buffers to min. size. */
if
(
chip_table
[
lp
->
chip_version
].
flags
&
LANCE_MUST_PAD
)
{
if
(
chip_table
[
lp
->
chip_version
].
flags
&
LANCE_MUST_PAD
)
{
lp
->
tx_ring
[
entry
].
length
=
if
(
skb
->
len
<
ETH_ZLEN
)
{
-
(
ETH_ZLEN
<
skb
->
len
?
skb
->
len
:
ETH_ZLEN
);
skb
=
skb_padto
(
skb
,
ETH_ZLEN
);
if
(
skb
==
NULL
)
goto
out
;
lp
->
tx_ring
[
entry
].
length
=
-
ETH_ZLEN
;
}
else
lp
->
tx_ring
[
entry
].
length
=
-
skb
->
len
;
}
else
}
else
lp
->
tx_ring
[
entry
].
length
=
-
skb
->
len
;
lp
->
tx_ring
[
entry
].
length
=
-
skb
->
len
;
...
@@ -933,6 +939,7 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -933,6 +939,7 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
if
((
lp
->
cur_tx
-
lp
->
dirty_tx
)
>=
TX_RING_SIZE
)
if
((
lp
->
cur_tx
-
lp
->
dirty_tx
)
>=
TX_RING_SIZE
)
netif_stop_queue
(
dev
);
netif_stop_queue
(
dev
);
out:
spin_unlock_irqrestore
(
&
lp
->
devlock
,
flags
);
spin_unlock_irqrestore
(
&
lp
->
devlock
,
flags
);
return
0
;
return
0
;
}
}
...
...
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