Commit 8ba6a5bf authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

storage: bring back portnum parameter to mac set/get functions, no functionality yet

parent c84e455f
...@@ -63,7 +63,7 @@ int wrc_board_early_init() ...@@ -63,7 +63,7 @@ int wrc_board_early_init()
/* /*
* Try reading MAC addr stored in flash * 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"); board_dbg("Failed to get MAC address from the flash. Using fallback address.\n");
mac_addr[0] = 0x22; mac_addr[0] = 0x22;
mac_addr[1] = 0x33; mac_addr[1] = 0x33;
......
...@@ -49,7 +49,7 @@ int wrc_board_early_init() ...@@ -49,7 +49,7 @@ int wrc_board_early_init()
m24aa025_read_mac(&board.mac_id_eeprom, mac_addr); m24aa025_read_mac(&board.mac_id_eeprom, mac_addr);
/* 2. Try reading from configuration EEPROM */ /* 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 */ /* 3. If everything fails, use default MAC */
board_dbg("Failed to get MAC address from Unique ID chip or EEPROM. \ board_dbg("Failed to get MAC address from Unique ID chip or EEPROM. \
Using fallback address.\n"); Using fallback address.\n");
......
...@@ -61,7 +61,7 @@ int wrc_board_early_init() ...@@ -61,7 +61,7 @@ int wrc_board_early_init()
// fixme: read MAC address from the MMC // fixme: read MAC address from the MMC
uint8_t mac[6]; 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]); board_dbg("Board MAC Address: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
......
...@@ -834,7 +834,7 @@ int storage_phtrans(uint32_t *valp, uint8_t write) ...@@ -834,7 +834,7 @@ int storage_phtrans(uint32_t *valp, uint8_t write)
/* MAC Address Storage */ /* 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 ret = 0;
//int i; //int i;
...@@ -891,7 +891,7 @@ int storage_get_persistent_mac(uint8_t *mac) ...@@ -891,7 +891,7 @@ int storage_get_persistent_mac(uint8_t *mac)
return 0; return 0;
} }
int storage_set_persistent_mac(uint8_t *mac) int storage_set_persistent_mac(uint8_t portnum, uint8_t *mac)
{ {
int ret; int ret;
......
...@@ -141,8 +141,8 @@ int storage_save_calibration(void); ...@@ -141,8 +141,8 @@ int storage_save_calibration(void);
int storage_read_hdl_cfg(void); int storage_read_hdl_cfg(void);
int storage_mount( struct storage_device *dev ); int storage_mount( struct storage_device *dev );
int storage_get_persistent_mac(uint8_t *mac); int storage_get_persistent_mac(uint8_t portnum, uint8_t *mac);
int storage_set_persistent_mac(uint8_t *mac); int storage_set_persistent_mac(uint8_t portnum, uint8_t *mac);
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment