net: Provide a function to get the current MAC address

The current implementation exposes the eth_device struct to code that
needs to access the MAC address.  Add a wrapper function for this to
abstract away the pointer for this operation.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Joe Hershberger
2015-03-22 17:09:00 -05:00
committed by Simon Glass
parent 0eb25b6196
commit 8b2c9a7157
6 changed files with 13 additions and 5 deletions

View File

@@ -275,7 +275,7 @@ static void NetInitLoop(void)
env_changed_id = env_id;
}
if (eth_get_dev())
memcpy(NetOurEther, eth_get_dev()->enetaddr, 6);
memcpy(NetOurEther, eth_get_ethaddr(), 6);
return;
}