Philip Oberfichtner | 62a0992 | 2022-07-26 15:04:50 +0200 | [diff] [blame] | 1 | /* 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 | */ |
| 12 | bool 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 | */ |
| 21 | int 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 | */ |
| 28 | int dh_setup_mac_address(void); |