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
d31bb7f6
Commit
d31bb7f6
authored
Jan 16, 2003
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[netdrvr tg3] manage jumbo flag on MTU change when interface is down
parent
66c8e500
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
drivers/net/tg3.c
drivers/net/tg3.c
+13
-7
No files found.
drivers/net/tg3.c
View file @
d31bb7f6
...
...
@@ -2624,6 +2624,17 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
return
0
;
}
static
inline
void
tg3_set_mtu
(
struct
net_device
*
dev
,
struct
tg3
*
tp
,
int
new_mtu
)
{
dev
->
mtu
=
new_mtu
;
if
(
new_mtu
>
ETH_DATA_LEN
)
tp
->
tg3_flags
|=
TG3_FLAG_JUMBO_ENABLE
;
else
tp
->
tg3_flags
&=
~
TG3_FLAG_JUMBO_ENABLE
;
}
static
int
tg3_change_mtu
(
struct
net_device
*
dev
,
int
new_mtu
)
{
struct
tg3
*
tp
=
dev
->
priv
;
...
...
@@ -2635,7 +2646,7 @@ static int tg3_change_mtu(struct net_device *dev, int new_mtu)
/* We'll just catch it later when the
* device is up'd.
*/
dev
->
mtu
=
new_mtu
;
tg3_set_mtu
(
dev
,
tp
,
new_mtu
)
;
return
0
;
}
...
...
@@ -2644,12 +2655,7 @@ static int tg3_change_mtu(struct net_device *dev, int new_mtu)
tg3_halt
(
tp
);
dev
->
mtu
=
new_mtu
;
if
(
new_mtu
>
ETH_DATA_LEN
)
tp
->
tg3_flags
|=
TG3_FLAG_JUMBO_ENABLE
;
else
tp
->
tg3_flags
&=
~
TG3_FLAG_JUMBO_ENABLE
;
tg3_set_mtu
(
dev
,
tp
,
new_mtu
);
tg3_init_rings
(
tp
);
tg3_init_hw
(
tp
);
...
...
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