Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meta-elphel393
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
meta-elphel393
Commits
af224adb
Commit
af224adb
authored
Dec 20, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
incorrect printing
parent
8af945ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
mii-diag.c
recipes-extended/net-tools/files/mii-diag.c
+3
-3
No files found.
recipes-extended/net-tools/files/mii-diag.c
View file @
af224adb
...
@@ -241,7 +241,7 @@ main(int argc, char **argv)
...
@@ -241,7 +241,7 @@ main(int argc, char **argv)
}
}
if
(
verbose
||
opt_version
)
if
(
verbose
||
opt_version
)
printf
(
version
);
printf
(
"%s"
,
version
);
/* Open a basic socket. */
/* Open a basic socket. */
if
((
skfd
=
socket
(
AF_INET
,
SOCK_DGRAM
,
0
))
<
0
)
{
if
((
skfd
=
socket
(
AF_INET
,
SOCK_DGRAM
,
0
))
<
0
)
{
...
@@ -414,7 +414,7 @@ int do_one_xcvr(int skfd)
...
@@ -414,7 +414,7 @@ int do_one_xcvr(int skfd)
if
(
mii_action
==
MII_ACTION_READ
)
{
if
(
mii_action
==
MII_ACTION_READ
)
{
unsigned
long
v
=
mdio_read
(
skfd
,
phy_id
,
mii_addr
);
unsigned
long
v
=
mdio_read
(
skfd
,
phy_id
,
mii_addr
);
printf
(
"0x%04X
\n
"
,
v
);
printf
(
"0x%04X
\n
"
,
v
);
fprintf
(
stderr
,
"read from register MR%d value 0x%04X
\n
"
,
mii_addr
,
v
);
fprintf
(
stderr
,
"read from register MR%d value 0x%04
l
X
\n
"
,
mii_addr
,
v
);
}
}
}
}
}
}
...
@@ -589,7 +589,7 @@ int show_basic_mii(long ioaddr, int phy_id)
...
@@ -589,7 +589,7 @@ int show_basic_mii(long ioaddr, int phy_id)
bmcr
&
0x0100
?
"full"
:
"half"
);
bmcr
&
0x0100
?
"full"
:
"half"
);
for
(
i
=
0
;
i
<
9
;
i
++
)
for
(
i
=
0
;
i
<
9
;
i
++
)
if
(
bmcr
&
(
0x0080
<<
i
))
if
(
bmcr
&
(
0x0080
<<
i
))
printf
(
bmcr_bits
[
i
]);
printf
(
"%s"
,
bmcr_bits
[
i
]);
new_bmsr
=
mdio_read
(
ioaddr
,
phy_id
,
1
);
new_bmsr
=
mdio_read
(
ioaddr
,
phy_id
,
1
);
if
((
bmsr
&
0x0016
)
==
0x0004
)
if
((
bmsr
&
0x0016
)
==
0x0004
)
...
...
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