hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/linux/of_net.h
....@@ -1,34 +1,30 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * OF helpers for network devices.
3
- *
4
- * This file is released under the GPLv2
54 */
65
76 #ifndef __LINUX_OF_NET_H
87 #define __LINUX_OF_NET_H
98
9
+#include <linux/phy.h>
10
+
1011 #ifdef CONFIG_OF_NET
1112 #include <linux/of.h>
1213
1314 struct net_device;
14
-extern int of_get_phy_mode(struct device_node *np);
15
+extern int of_get_phy_mode(struct device_node *np, phy_interface_t *interface);
1516 extern const void *of_get_mac_address(struct device_node *np);
16
-extern int of_get_nvmem_mac_address(struct device_node *np, void *addr);
1717 extern struct net_device *of_find_net_device_by_node(struct device_node *np);
1818 #else
19
-static inline int of_get_phy_mode(struct device_node *np)
19
+static inline int of_get_phy_mode(struct device_node *np,
20
+ phy_interface_t *interface)
2021 {
2122 return -ENODEV;
2223 }
2324
2425 static inline const void *of_get_mac_address(struct device_node *np)
2526 {
26
- return NULL;
27
-}
28
-
29
-static inline int of_get_nvmem_mac_address(struct device_node *np, void *addr)
30
-{
31
- return -ENODEV;
27
+ return ERR_PTR(-ENODEV);
3228 }
3329
3430 static inline struct net_device *of_find_net_device_by_node(struct device_node *np)