eth_internal.h 1.2 KB

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