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
8fd17f2e
Commit
8fd17f2e
authored
Mar 20, 2009
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sunvnet: Convert to net_device_ops.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
225ddf49
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
drivers/net/sunvnet.c
drivers/net/sunvnet.c
+11
-7
No files found.
drivers/net/sunvnet.c
View file @
8fd17f2e
...
@@ -1012,6 +1012,16 @@ static int __devinit vnet_port_alloc_tx_bufs(struct vnet_port *port)
...
@@ -1012,6 +1012,16 @@ static int __devinit vnet_port_alloc_tx_bufs(struct vnet_port *port)
static
LIST_HEAD
(
vnet_list
);
static
LIST_HEAD
(
vnet_list
);
static
DEFINE_MUTEX
(
vnet_list_mutex
);
static
DEFINE_MUTEX
(
vnet_list_mutex
);
static
const
struct
net_device_ops
vnet_ops
=
{
.
ndo_open
=
vnet_open
,
.
ndo_stop
=
vnet_close
,
.
ndo_set_multicast_list
=
vnet_set_rx_mode
,
.
ndo_set_mac_address
=
vnet_set_mac_addr
,
.
ndo_tx_timeout
=
vnet_tx_timeout
,
.
ndo_change_mtu
=
vnet_change_mtu
,
.
ndo_start_xmit
=
vnet_start_xmit
,
};
static
struct
vnet
*
__devinit
vnet_new
(
const
u64
*
local_mac
)
static
struct
vnet
*
__devinit
vnet_new
(
const
u64
*
local_mac
)
{
{
struct
net_device
*
dev
;
struct
net_device
*
dev
;
...
@@ -1040,15 +1050,9 @@ static struct vnet * __devinit vnet_new(const u64 *local_mac)
...
@@ -1040,15 +1050,9 @@ static struct vnet * __devinit vnet_new(const u64 *local_mac)
INIT_LIST_HEAD
(
&
vp
->
list
);
INIT_LIST_HEAD
(
&
vp
->
list
);
vp
->
local_mac
=
*
local_mac
;
vp
->
local_mac
=
*
local_mac
;
dev
->
open
=
vnet_open
;
dev
->
netdev_ops
=
&
vnet_ops
;
dev
->
stop
=
vnet_close
;
dev
->
set_multicast_list
=
vnet_set_rx_mode
;
dev
->
set_mac_address
=
vnet_set_mac_addr
;
dev
->
tx_timeout
=
vnet_tx_timeout
;
dev
->
ethtool_ops
=
&
vnet_ethtool_ops
;
dev
->
ethtool_ops
=
&
vnet_ethtool_ops
;
dev
->
watchdog_timeo
=
VNET_TX_TIMEOUT
;
dev
->
watchdog_timeo
=
VNET_TX_TIMEOUT
;
dev
->
change_mtu
=
vnet_change_mtu
;
dev
->
hard_start_xmit
=
vnet_start_xmit
;
err
=
register_netdev
(
dev
);
err
=
register_netdev
(
dev
);
if
(
err
)
{
if
(
err
)
{
...
...
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