blob: 2b24637d96d6d863b3f47e1caf06d4dac6a648d7 [file] [log] [blame]
Philip Oberfichtner386f9212022-07-26 15:04:50 +02001/* SPDX-License-Identifier: GPL-2.0+
2 *
3 * Copyright 2022 DENX Software Engineering GmbH, Philip Oberfichtner <pro@denx.de>
4 */
5
6/*
7 * dh_mac_is_in_env - Check if MAC address is already set
8 *
9 * @env: name of environment variable
10 * Return: true if MAC is set, false otherwise
11 */
12bool dh_mac_is_in_env(const char *env);
13
14/*
15 * dh_get_mac_from_eeprom - Get MAC address from eeprom and write it to enetaddr
16 *
17 * @enetaddr: buffer where address is to be stored
18 * @alias: alias for EEPROM device tree node
19 * Return: 0 if OK, other value on error
20 */
21int dh_get_mac_from_eeprom(unsigned char *enetaddr, const char *alias);
22
23/*
24 * dh_setup_mac_address - Try to get MAC address from various locations and write it to env
25 *
26 * Return: 0 if OK, other value on error
27 */
28int dh_setup_mac_address(void);