of_net.h 507 B

1234567891011121314151617181920212223242526
  1. /*
  2. * OF helpers for network devices.
  3. *
  4. * This file is released under the GPLv2
  5. */
  6. #ifndef __LINUX_OF_NET_H
  7. #define __LINUX_OF_NET_H
  8. #ifdef CONFIG_OF_NET
  9. #include <linux/of.h>
  10. extern int of_get_phy_mode(struct device_node *np);
  11. extern const void *of_get_mac_address(struct device_node *np);
  12. #else
  13. static inline int of_get_phy_mode(struct device_node *np)
  14. {
  15. return -ENODEV;
  16. }
  17. static inline const void *of_get_mac_address(struct device_node *np)
  18. {
  19. return NULL;
  20. }
  21. #endif
  22. #endif /* __LINUX_OF_NET_H */