summaryrefslogtreecommitdiffstats
path: root/net/net.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-06-15 08:52:15 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-06-26 11:56:22 +0200
commitd00db5548a4dd8decad44fe3718bd8dff3bacb80 (patch)
treefee4835a7e7ff6a878cee71a8fab6685c708ea68 /net/net.c
parent1dd5262eb950210a77a01d79327d2fbadae65f86 (diff)
downloadbarebox-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/net.c b/net/net.c
index 07350ad8fb..75292c736c 100644
--- a/net/net.c
+++ b/net/net.c
@@ -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 */