summaryrefslogtreecommitdiffstats
path: root/include/net.h
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 /include/net.h
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 'include/net.h')
-rw-r--r--include/net.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net.h b/include/net.h
index 29559372a9..b93e264f54 100644
--- a/include/net.h
+++ b/include/net.h
@@ -60,6 +60,7 @@ struct eth_device {
IPaddr_t serverip;
IPaddr_t netmask;
IPaddr_t gateway;
+ char ethaddr_param[6];
char ethaddr[6];
};
@@ -67,6 +68,7 @@ struct eth_device {
int eth_register(struct eth_device* dev); /* Register network device */
void eth_unregister(struct eth_device* dev); /* Unregister network device */
+int eth_set_ethaddr(struct eth_device *edev, const char *ethaddr);
int eth_send(struct eth_device *edev, void *packet, int length); /* Send a packet */
int eth_rx(void); /* Check for received packets */