From 102a0743326a03cd1a1202ceda21e175b7d3575c Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Tue, 20 Feb 2024 01:20:52 +0000 Subject: [PATCH] add new system file --- kernel/include/linux/of_net.h | 18 +++++++----------- 1 files changed, 7 insertions(+), 11 deletions(-) diff --git a/kernel/include/linux/of_net.h b/kernel/include/linux/of_net.h index 90d81ee..71bbfcf 100644 --- a/kernel/include/linux/of_net.h +++ b/kernel/include/linux/of_net.h @@ -1,34 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * OF helpers for network devices. - * - * This file is released under the GPLv2 */ #ifndef __LINUX_OF_NET_H #define __LINUX_OF_NET_H +#include <linux/phy.h> + #ifdef CONFIG_OF_NET #include <linux/of.h> struct net_device; -extern int of_get_phy_mode(struct device_node *np); +extern int of_get_phy_mode(struct device_node *np, phy_interface_t *interface); extern const void *of_get_mac_address(struct device_node *np); -extern int of_get_nvmem_mac_address(struct device_node *np, void *addr); extern struct net_device *of_find_net_device_by_node(struct device_node *np); #else -static inline int of_get_phy_mode(struct device_node *np) +static inline int of_get_phy_mode(struct device_node *np, + phy_interface_t *interface) { return -ENODEV; } static inline const void *of_get_mac_address(struct device_node *np) { - return NULL; -} - -static inline int of_get_nvmem_mac_address(struct device_node *np, void *addr) -{ - return -ENODEV; + return ERR_PTR(-ENODEV); } static inline struct net_device *of_find_net_device_by_node(struct device_node *np) -- Gitblit v1.6.2