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
9970b811
Commit
9970b811
authored
Sep 21, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Add ethtool support to loopback driver.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
f28aed26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
drivers/net/loopback.c
drivers/net/loopback.c
+13
-0
No files found.
drivers/net/loopback.c
View file @
9970b811
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,7 @@
#include <linux/netdevice.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/skbuff.h>
#include <linux/ethtool.h>
#include <net/sock.h>
#include <net/sock.h>
#include <net/checksum.h>
#include <net/checksum.h>
#include <linux/if_ether.h>
/* For the statistics structure. */
#include <linux/if_ether.h>
/* For the statistics structure. */
...
@@ -183,6 +184,17 @@ static struct net_device_stats *get_stats(struct net_device *dev)
...
@@ -183,6 +184,17 @@ static struct net_device_stats *get_stats(struct net_device *dev)
return
stats
;
return
stats
;
}
}
u32
loopback_get_link
(
struct
net_device
*
dev
)
{
return
1
;
}
static
struct
ethtool_ops
loopback_ethtool_ops
=
{
.
get_link
=
loopback_get_link
,
.
get_tso
=
ethtool_op_get_tso
,
.
set_tso
=
ethtool_op_set_tso
,
};
struct
net_device
loopback_dev
=
{
struct
net_device
loopback_dev
=
{
.
name
=
"lo"
,
.
name
=
"lo"
,
.
mtu
=
(
16
*
1024
)
+
20
+
20
+
12
,
.
mtu
=
(
16
*
1024
)
+
20
+
20
+
12
,
...
@@ -199,6 +211,7 @@ struct net_device loopback_dev = {
...
@@ -199,6 +211,7 @@ struct net_device loopback_dev = {
.
features
=
NETIF_F_SG
|
NETIF_F_FRAGLIST
.
features
=
NETIF_F_SG
|
NETIF_F_FRAGLIST
|
NETIF_F_NO_CSUM
|
NETIF_F_HIGHDMA
|
NETIF_F_NO_CSUM
|
NETIF_F_HIGHDMA
|
NETIF_F_LLTX
,
|
NETIF_F_LLTX
,
.
ethtool_ops
=
&
loopback_ethtool_ops
,
};
};
/* Setup and register the of the LOOPBACK device. */
/* Setup and register the of the LOOPBACK device. */
...
...
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