--- zzzz-none-000/linux-3.10.107/include/linux/of_net.h 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/include/linux/of_net.h 2021-02-04 17:41:59.000000000 +0000 @@ -9,10 +9,21 @@ #ifdef CONFIG_OF_NET #include -extern const int of_get_phy_mode(struct device_node *np); + +struct net_device; +extern int of_get_phy_mode(struct device_node *np); extern const void *of_get_mac_address(struct device_node *np); +#ifdef CONFIG_MTD +extern int of_get_mac_address_mtd(struct device_node *np, unsigned char *mac); +#else +static inline int of_get_mac_address_mtd(struct device_node *np, unsigned char *mac) +{ + return -ENOENT; +} +#endif +extern struct net_device *of_find_net_device_by_node(struct device_node *np); #else -static inline const int of_get_phy_mode(struct device_node *np) +static inline int of_get_phy_mode(struct device_node *np) { return -ENODEV; } @@ -21,6 +32,11 @@ { return NULL; } + +static inline struct net_device *of_find_net_device_by_node(struct device_node *np) +{ + return NULL; +} #endif #endif /* __LINUX_OF_NET_H */