diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-06-15 08:52:15 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-06-26 11:56:22 +0200 |
commit | d00db5548a4dd8decad44fe3718bd8dff3bacb80 (patch) | |
tree | fee4835a7e7ff6a878cee71a8fab6685c708ea68 /net/net.c | |
parent | 1dd5262eb950210a77a01d79327d2fbadae65f86 (diff) | |
download | barebox-d00db5548a4dd8decad44fe3718bd8dff3bacb80.tar.gz barebox-d00db5548a4dd8decad44fe3718bd8dff3bacb80.tar.xz |
net: eth: Do not rely on CONFIG_PARAMETER to be enabled
register_preset_mac_address only works when CONFIG_PARAMETER
is enabled because otherwise dev_set_param is a no-op. Add a
function to set the MAC address explicitly without the need
of CONFIG_PARAMETER and use it where appropriate.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'net/net.c')
-rw-r--r-- | net/net.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -348,7 +348,7 @@ static struct net_connection *net_new(IPaddr_t dest, rx_handler_f *handler, random_ether_addr(edev->ethaddr); ethaddr_to_string(edev->ethaddr, str); printf("warning: No MAC address set. Using random address %s\n", str); - dev_set_param(&edev->dev, "ethaddr", str); + eth_set_ethaddr(edev, edev->ethaddr); } /* If we don't have an ip only broadcast is allowed */ |