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
5b73b398
Commit
5b73b398
authored
Sep 19, 2002
by
Felipe Damasio
Committed by
Stephen Hemminger
Sep 19, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for get-MII-data ioctls in 8139cp net driver
parent
b97490bf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
drivers/net/8139cp.c
drivers/net/8139cp.c
+13
-0
No files found.
drivers/net/8139cp.c
View file @
5b73b398
...
...
@@ -1649,15 +1649,28 @@ static int cp_ethtool_ioctl (struct cp_private *cp, void *useraddr)
static
int
cp_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
)
{
struct
cp_private
*
cp
=
dev
->
priv
;
struct
mii_ioctl_data
*
mii
;
int
rc
=
0
;
mii
=
(
struct
mii_ioctl_data
*
)
&
rq
->
ifr_data
;
if
(
!
netif_running
(
dev
))
return
-
EINVAL
;
if
(
cmd
!=
SIOCETHTOOL
)
mii
->
reg_num
&=
0x1f
;
switch
(
cmd
)
{
case
SIOCETHTOOL
:
return
cp_ethtool_ioctl
(
cp
,
(
void
*
)
rq
->
ifr_data
);
case
SIOCGMIIPHY
:
/* Get the address of the PHY in use. */
mii
->
phy_id
=
CP_INTERNAL_PHY
;
/* Fall Through */
case
SIOCGMIIREG
:
/* Read the specified MII register. */
mii
->
val_out
=
mdio_read
(
dev
,
CP_INTERNAL_PHY
,
mii
->
reg_num
);
break
;
default:
rc
=
-
EOPNOTSUPP
;
break
;
...
...
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