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
af42c0ff
Commit
af42c0ff
authored
Sep 01, 2003
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[netdrvr ne2k-pci] ethtool_ops support
parent
53e82261
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
30 deletions
+12
-30
drivers/net/ne2k-pci.c
drivers/net/ne2k-pci.c
+12
-30
No files found.
drivers/net/ne2k-pci.c
View file @
af42c0ff
...
...
@@ -174,7 +174,7 @@ static void ne2k_pci_block_input(struct net_device *dev, int count,
struct
sk_buff
*
skb
,
int
ring_offset
);
static
void
ne2k_pci_block_output
(
struct
net_device
*
dev
,
const
int
count
,
const
unsigned
char
*
buf
,
const
int
start_page
);
static
int
netdev_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
)
;
static
struct
ethtool_ops
ne2k_pci_ethtool_ops
;
...
...
@@ -355,7 +355,7 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev,
ei_status
.
priv
=
(
unsigned
long
)
pdev
;
dev
->
open
=
&
ne2k_pci_open
;
dev
->
stop
=
&
ne2k_pci_close
;
dev
->
do_ioctl
=
&
netdev_ioctl
;
dev
->
ethtool_ops
=
&
ne2k_pci_ethtool_ops
;
NS8390_init
(
dev
,
0
);
i
=
register_netdev
(
dev
);
...
...
@@ -583,40 +583,22 @@ static void ne2k_pci_block_output(struct net_device *dev, int count,
return
;
}
static
int
netdev_ethtool_ioctl
(
struct
net_device
*
dev
,
void
*
useraddr
)
static
void
ne2k_pci_get_drvinfo
(
struct
net_device
*
dev
,
struct
ethtool_drvinfo
*
info
)
{
struct
ei_device
*
ei
=
dev
->
priv
;
struct
pci_dev
*
pci_dev
=
(
struct
pci_dev
*
)
ei
->
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
);
strcpy
(
info
.
bus_info
,
pci_name
(
pci_dev
));
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
(
pci_dev
));
}
static
int
netdev_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
)
{
switch
(
cmd
)
{
case
SIOCETHTOOL
:
return
netdev_ethtool_ioctl
(
dev
,
(
void
*
)
rq
->
ifr_data
);
default:
return
-
EOPNOTSUPP
;
}
}
static
struct
ethtool_ops
ne2k_pci_ethtool_ops
=
{
.
get_drvinfo
=
ne2k_pci_get_drvinfo
,
.
get_tx_csum
=
ethtool_op_get_tx_csum
,
.
get_sg
=
ethtool_op_get_sg
,
};
static
void
__devexit
ne2k_pci_remove_one
(
struct
pci_dev
*
pdev
)
{
...
...
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