summaryrefslogtreecommitdiff
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorHuacai Chen <chenhuacai@loongson.cn>2023-11-01 05:55:00 +0300
committerHuacai Chen <chenhuacai@loongson.cn>2023-11-01 05:55:00 +0300
commita6bdc082ad1c91d389a6ba0c7a1945818f732114 (patch)
treefa630701d5d2a8bc1ab8c4abf759663bbb81aeeb /net/core/dev.c
parentffc253263a1375a65fa6c9f62a893e9767fbebfa (diff)
parent99c9991f4e5d77328187187d0c921a3b62bfa998 (diff)
downloadlinux-a6bdc082ad1c91d389a6ba0c7a1945818f732114.tar.xz
Merge 'bpf-next 2023-10-16' into loongarch-next
LoongArch architecture changes for 6.7 (BPF CPU v4 support) depend on the bpf changes to fix conflictions in selftests and work, so merge them to create a base.
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 9f3f8930c691..17ba4c5be97e 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -9052,6 +9052,28 @@ bool netdev_port_same_parent_id(struct net_device *a, struct net_device *b)
}
EXPORT_SYMBOL(netdev_port_same_parent_id);
+static void netdev_dpll_pin_assign(struct net_device *dev, struct dpll_pin *dpll_pin)
+{
+#if IS_ENABLED(CONFIG_DPLL)
+ rtnl_lock();
+ dev->dpll_pin = dpll_pin;
+ rtnl_unlock();
+#endif
+}
+
+void netdev_dpll_pin_set(struct net_device *dev, struct dpll_pin *dpll_pin)
+{
+ WARN_ON(!dpll_pin);
+ netdev_dpll_pin_assign(dev, dpll_pin);
+}
+EXPORT_SYMBOL(netdev_dpll_pin_set);
+
+void netdev_dpll_pin_clear(struct net_device *dev)
+{
+ netdev_dpll_pin_assign(dev, NULL);
+}
+EXPORT_SYMBOL(netdev_dpll_pin_clear);
+
/**
* dev_change_proto_down - set carrier according to proto_down.
*