eth_internal.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2001-2015
  4. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  5. * Joe Hershberger, National Instruments
  6. */
  7. #ifndef __ETH_INTERNAL_H
  8. #define __ETH_INTERNAL_H
  9. /* Do init that is common to driver model and legacy networking */
  10. void eth_common_init(void);
  11. /**
  12. * eth_env_set_enetaddr_by_index() - set the MAC address environment variable
  13. *
  14. * This sets up an environment variable with the given MAC address (@enetaddr).
  15. * The environment variable to be set is defined by <@base_name><@index>addr.
  16. * If @index is 0 it is omitted. For common Ethernet this means ethaddr,
  17. * eth1addr, etc.
  18. *
  19. * @base_name: Base name for variable, typically "eth"
  20. * @index: Index of interface being updated (>=0)
  21. * @enetaddr: Pointer to MAC address to put into the variable
  22. * @return 0 if OK, other value on error
  23. */
  24. int eth_env_set_enetaddr_by_index(const char *base_name, int index,
  25. uchar *enetaddr);
  26. int eth_mac_skip(int index);
  27. void eth_current_changed(void);
  28. #ifdef CONFIG_DM_ETH
  29. void eth_set_dev(struct udevice *dev);
  30. #else
  31. void eth_set_dev(struct eth_device *dev);
  32. #endif
  33. void eth_set_current_to_next(void);
  34. #endif