Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wrpc-sw
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
hdl-core-lib
wr-cores
wrpc-sw
Commits
09a736d5
Commit
09a736d5
authored
12 years ago
by
Grzegorz Daniluk
Browse files
Options
Downloads
Patches
Plain Diff
wrc_main: changing default mac to something that would let user know that something got wrong
parent
18177c83
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wrc_main.c
+6
-3
6 additions, 3 deletions
wrc_main.c
with
6 additions
and
3 deletions
wrc_main.c
+
6
−
3
View file @
09a736d5
...
@@ -45,13 +45,16 @@ void wrc_initialize()
...
@@ -45,13 +45,16 @@ void wrc_initialize()
mac_addr
[
0
]
=
0x08
;
//
mac_addr
[
0
]
=
0x08
;
//
mac_addr
[
1
]
=
0x00
;
// CERN OUI
mac_addr
[
1
]
=
0x00
;
// CERN OUI
mac_addr
[
2
]
=
0x30
;
//
mac_addr
[
2
]
=
0x30
;
//
mac_addr
[
3
]
=
0xDE
;
// fallback MAC if get_persistent_mac fails
mac_addr
[
4
]
=
0xAD
;
mac_addr
[
5
]
=
0x42
;
own_scanbus
(
ONEWIRE_PORT
);
own_scanbus
(
ONEWIRE_PORT
);
if
(
get_persistent_mac
(
ONEWIRE_PORT
,
mac_addr
)
==
-
1
)
{
if
(
get_persistent_mac
(
ONEWIRE_PORT
,
mac_addr
)
==
-
1
)
{
mprintf
(
"Unable to determine MAC address
\n
"
);
mprintf
(
"Unable to determine MAC address
\n
"
);
mac_addr
[
0
]
=
0x11
;
//
mac_addr
[
1
]
=
0x22
;
//
mac_addr
[
2
]
=
0x33
;
// fallback MAC if get_persistent_mac fails
mac_addr
[
3
]
=
0x44
;
//
mac_addr
[
4
]
=
0x55
;
//
mac_addr
[
5
]
=
0x66
;
//
}
}
TRACE_DEV
(
"Local MAC address: %x:%x:%x:%x:%x:%x
\n
"
,
mac_addr
[
0
],
mac_addr
[
1
],
mac_addr
[
2
],
mac_addr
[
3
],
mac_addr
[
4
],
mac_addr
[
5
]);
TRACE_DEV
(
"Local MAC address: %x:%x:%x:%x:%x:%x
\n
"
,
mac_addr
[
0
],
mac_addr
[
1
],
mac_addr
[
2
],
mac_addr
[
3
],
mac_addr
[
4
],
mac_addr
[
5
]);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment