Reduce code bloat in dsa_priv.h by moving the prototypes exported by
switch.h into their own header file.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
#include "master.h"
#include "port.h"
#include "slave.h"
+#include "switch.h"
#include "tag.h"
static DEFINE_MUTEX(dsa2_mutex);
/* 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 &&
#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
#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)
--- /dev/null
+/* 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
#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