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
207a4316
Commit
207a4316
authored
Aug 26, 2003
by
Matthew Wilcox
Committed by
Jeff Garzik
Aug 26, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[netdrvr 3c59x] ethtool_ops support
parent
37430918
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
30 deletions
+19
-30
drivers/net/3c59x.c
drivers/net/3c59x.c
+19
-30
No files found.
drivers/net/3c59x.c
View file @
207a4316
...
...
@@ -900,6 +900,7 @@ static void set_rx_mode(struct net_device *dev);
static
int
vortex_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
);
static
void
vortex_tx_timeout
(
struct
net_device
*
dev
);
static
void
acpi_set_WOL
(
struct
net_device
*
dev
);
static
struct
ethtool_ops
vortex_ethtool_ops
;
/* This driver uses 'options' to pass the media type, full-duplex flag, etc. */
/* Option count limit only -- unlimited interfaces are supported. */
...
...
@@ -1445,6 +1446,7 @@ static int __devinit vortex_probe1(struct device *gendev,
dev
->
stop
=
vortex_close
;
dev
->
get_stats
=
vortex_get_stats
;
dev
->
do_ioctl
=
vortex_ioctl
;
dev
->
ethtool_ops
=
&
vortex_ethtool_ops
;
dev
->
set_multicast_list
=
set_rx_mode
;
dev
->
tx_timeout
=
vortex_tx_timeout
;
dev
->
watchdog_timeo
=
(
watchdog
*
HZ
)
/
1000
;
...
...
@@ -2816,38 +2818,28 @@ static void update_stats(long ioaddr, struct net_device *dev)
}
static
int
netdev_ethtool_ioctl
(
struct
net_device
*
dev
,
void
*
useraddr
)
static
void
vortex_get_drvinfo
(
struct
net_device
*
dev
,
struct
ethtool_drvinfo
*
info
)
{
struct
vortex_private
*
vp
=
dev
->
priv
;
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
);
if
(
VORTEX_PCI
(
vp
))
strcpy
(
info
.
bus_info
,
pci_name
(
VORTEX_PCI
(
vp
)));
else
{
if
(
VORTEX_EISA
(
vp
))
sprintf
(
info
.
bus_info
,
vp
->
gendev
->
bus_id
);
else
sprintf
(
info
.
bus_info
,
"EISA 0x%lx %d"
,
dev
->
base_addr
,
dev
->
irq
);
}
if
(
copy_to_user
(
useraddr
,
&
info
,
sizeof
(
info
)))
return
-
EFAULT
;
return
0
;
}
}
return
-
EOPNOTSUPP
;
strcpy
(
info
->
driver
,
DRV_NAME
);
strcpy
(
info
->
version
,
DRV_VERSION
);
if
(
VORTEX_PCI
(
vp
))
{
strcpy
(
info
->
bus_info
,
pci_name
(
VORTEX_PCI
(
vp
)));
}
else
{
if
(
VORTEX_EISA
(
vp
))
sprintf
(
info
->
bus_info
,
vp
->
gendev
->
bus_id
);
else
sprintf
(
info
->
bus_info
,
"EISA 0x%lx %d"
,
dev
->
base_addr
,
dev
->
irq
);
}
}
static
struct
ethtool_ops
vortex_ethtool_ops
=
{
.
get_drvinfo
=
vortex_get_drvinfo
,
};
static
int
vortex_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
)
{
struct
vortex_private
*
vp
=
(
struct
vortex_private
*
)
dev
->
priv
;
...
...
@@ -2857,9 +2849,6 @@ static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
int
retval
;
switch
(
cmd
)
{
case
SIOCETHTOOL
:
return
netdev_ethtool_ioctl
(
dev
,
(
void
*
)
rq
->
ifr_data
);
case
SIOCGMIIPHY
:
/* Get address of MII PHY in use. */
data
->
phy_id
=
phy
;
...
...
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