Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
8ba6a5bf
Commit
8ba6a5bf
authored
Oct 07, 2020
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: bring back portnum parameter to mac set/get functions, no functionality yet
parent
c84e455f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
7 deletions
+7
-7
board.c
boards/generic/board.c
+1
-1
board.c
boards/pxie-fmc/board.c
+1
-1
board.c
boards/sis8300ku/board.c
+1
-1
storage.c
dev/storage.c
+2
-2
storage.h
include/storage.h
+2
-2
No files found.
boards/generic/board.c
View file @
8ba6a5bf
...
...
@@ -63,7 +63,7 @@ int wrc_board_early_init()
/*
* Try reading MAC addr stored in flash
*/
if
(
storage_get_persistent_mac
(
mac_addr
)
==
-
1
)
{
if
(
storage_get_persistent_mac
(
0
,
mac_addr
)
==
-
1
)
{
board_dbg
(
"Failed to get MAC address from the flash. Using fallback address.
\n
"
);
mac_addr
[
0
]
=
0x22
;
mac_addr
[
1
]
=
0x33
;
...
...
boards/pxie-fmc/board.c
View file @
8ba6a5bf
...
...
@@ -49,7 +49,7 @@ int wrc_board_early_init()
m24aa025_read_mac
(
&
board
.
mac_id_eeprom
,
mac_addr
);
/* 2. Try reading from configuration EEPROM */
}
else
if
(
storage_get_persistent_mac
(
mac_addr
)
==
-
1
)
{
}
else
if
(
storage_get_persistent_mac
(
0
,
mac_addr
)
==
-
1
)
{
/* 3. If everything fails, use default MAC */
board_dbg
(
"Failed to get MAC address from Unique ID chip or EEPROM. \
Using fallback address.
\n
"
);
...
...
boards/sis8300ku/board.c
View file @
8ba6a5bf
...
...
@@ -61,7 +61,7 @@ int wrc_board_early_init()
// fixme: read MAC address from the MMC
uint8_t
mac
[
6
];
storage_get_persistent_mac
(
mac
);
storage_get_persistent_mac
(
0
,
mac
);
board_dbg
(
"Board MAC Address: %02x:%02x:%02x:%02x:%02x:%02x
\n
"
,
mac
[
0
],
mac
[
1
],
mac
[
2
],
mac
[
3
],
mac
[
4
],
mac
[
5
]);
...
...
dev/storage.c
View file @
8ba6a5bf
...
...
@@ -834,7 +834,7 @@ int storage_phtrans(uint32_t *valp, uint8_t write)
/* MAC Address Storage */
int
storage_get_persistent_mac
(
uint8_t
*
mac
)
int
storage_get_persistent_mac
(
uint8_t
portnum
,
uint8_t
*
mac
)
{
int
ret
=
0
;
//int i;
...
...
@@ -891,7 +891,7 @@ int storage_get_persistent_mac(uint8_t *mac)
return
0
;
}
int
storage_set_persistent_mac
(
uint8_t
*
mac
)
int
storage_set_persistent_mac
(
uint8_t
portnum
,
uint8_t
*
mac
)
{
int
ret
;
...
...
include/storage.h
View file @
8ba6a5bf
...
...
@@ -141,8 +141,8 @@ int storage_save_calibration(void);
int
storage_read_hdl_cfg
(
void
);
int
storage_mount
(
struct
storage_device
*
dev
);
int
storage_get_persistent_mac
(
uint8_t
*
mac
);
int
storage_set_persistent_mac
(
uint8_t
*
mac
);
int
storage_get_persistent_mac
(
uint8_t
portnum
,
uint8_t
*
mac
);
int
storage_set_persistent_mac
(
uint8_t
portnum
,
uint8_t
*
mac
);
#endif
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