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
8f4e4a31
Commit
8f4e4a31
authored
Aug 29, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Aug 29, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] (6/27) tulip ethtool conversion
parent
2820689b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
23 deletions
+9
-23
drivers/net/tulip/tulip_core.c
drivers/net/tulip/tulip_core.c
+9
-23
No files found.
drivers/net/tulip/tulip_core.c
View file @
8f4e4a31
...
...
@@ -830,30 +830,18 @@ static struct net_device_stats *tulip_get_stats(struct net_device *dev)
}
static
int
netdev_ethtool_ioctl
(
struct
net_device
*
dev
,
void
__user
*
useraddr
)
static
void
tulip_get_drvinfo
(
struct
net_device
*
dev
,
struct
ethtool_drvinfo
*
info
)
{
struct
tulip_private
*
np
=
netdev_priv
(
dev
);
u32
ethcmd
;
if
(
copy_from_user
(
&
ethcmd
,
useraddr
,
sizeof
(
ethcmd
)))
return
-
EFAULT
;
switch
(
ethcmd
)
{
case
ETHTOOL_GDRVINFO
:
{
struct
ethtool_drvinfo
info
=
{
ETHTOOL_GDRVINFO
};
strcpy
(
info
.
driver
,
DRV_NAME
);
strcpy
(
info
.
version
,
DRV_VERSION
);
strcpy
(
info
.
bus_info
,
pci_name
(
np
->
pdev
));
if
(
copy_to_user
(
useraddr
,
&
info
,
sizeof
(
info
)))
return
-
EFAULT
;
return
0
;
}
}
return
-
EOPNOTSUPP
;
strcpy
(
info
->
driver
,
DRV_NAME
);
strcpy
(
info
->
version
,
DRV_VERSION
);
strcpy
(
info
->
bus_info
,
pci_name
(
np
->
pdev
));
}
static
struct
ethtool_ops
ops
=
{
.
get_drvinfo
=
tulip_get_drvinfo
};
/* Provide ioctl() calls to examine the MII xcvr state. */
static
int
private_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
)
{
...
...
@@ -865,9 +853,6 @@ static int private_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
unsigned
int
regnum
=
data
->
reg_num
;
switch
(
cmd
)
{
case
SIOCETHTOOL
:
return
netdev_ethtool_ioctl
(
dev
,
rq
->
ifr_data
);
case
SIOCGMIIPHY
:
/* Get address of MII PHY in use. */
if
(
tp
->
mii_cnt
)
data
->
phy_id
=
phy
;
...
...
@@ -1644,6 +1629,7 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
#ifdef CONFIG_NET_POLL_CONTROLLER
dev
->
poll_controller
=
&
poll_tulip
;
#endif
SET_ETHTOOL_OPS
(
dev
,
&
ops
);
if
(
register_netdev
(
dev
))
goto
err_out_free_ring
;
...
...
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