summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/dsa/dsa2.c1
-rw-r--r--net/dsa/dsa_priv.h4
-rw-r--r--net/dsa/port.c1
-rw-r--r--net/dsa/switch.c1
-rw-r--r--net/dsa/switch.h11
-rw-r--r--net/dsa/tag_8021q.c1
6 files changed, 15 insertions, 4 deletions
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index 5373edf45a62..7c6b689267d0 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -22,6 +22,7 @@
#include "master.h"
#include "port.h"
#include "slave.h"
+#include "switch.h"
#include "tag.h"
static DEFINE_MUTEX(dsa2_mutex);
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
index eee2c9729e32..4f21228c6f52 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -155,10 +155,6 @@ bool dsa_schedule_work(struct work_struct *work);
/* netlink.c */
extern struct rtnl_link_ops dsa_link_ops __read_mostly;
-/* switch.c */
-int dsa_switch_register_notifier(struct dsa_switch *ds);
-void dsa_switch_unregister_notifier(struct dsa_switch *ds);
-
static inline bool dsa_switch_supports_uc_filtering(struct dsa_switch *ds)
{
return ds->ops->port_fdb_add && ds->ops->port_fdb_del &&
diff --git a/net/dsa/port.c b/net/dsa/port.c
index 56728242f079..bf2c98215021 100644
--- a/net/dsa/port.c
+++ b/net/dsa/port.c
@@ -15,6 +15,7 @@
#include "dsa_priv.h"
#include "port.h"
#include "slave.h"
+#include "switch.h"
/**
* dsa_port_notify - Notify the switching fabric of changes to a port
diff --git a/net/dsa/switch.c b/net/dsa/switch.c
index d0d5a1c7e6f6..6a1c84c5ec8b 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
@@ -15,6 +15,7 @@
#include "dsa_priv.h"
#include "port.h"
#include "slave.h"
+#include "switch.h"
static unsigned int dsa_switch_fastest_ageing_time(struct dsa_switch *ds,
unsigned int ageing_time)
diff --git a/net/dsa/switch.h b/net/dsa/switch.h
new file mode 100644
index 000000000000..b831b6fb45e9
--- /dev/null
+++ b/net/dsa/switch.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#ifndef __DSA_SWITCH_H
+#define __DSA_SWITCH_H
+
+struct dsa_switch;
+
+int dsa_switch_register_notifier(struct dsa_switch *ds);
+void dsa_switch_unregister_notifier(struct dsa_switch *ds);
+
+#endif
diff --git a/net/dsa/tag_8021q.c b/net/dsa/tag_8021q.c
index ee5dd1a54b51..abd994dc76d5 100644
--- a/net/dsa/tag_8021q.c
+++ b/net/dsa/tag_8021q.c
@@ -9,6 +9,7 @@
#include "dsa_priv.h"
#include "port.h"
+#include "switch.h"
#include "tag.h"
/* Binary structure of the fake 12-bit VID field (when the TPID is