Commit 0c603136 authored by Vladimir Oltean's avatar Vladimir Oltean Committed by Jakub Kicinski
Browse files

net: dsa: move headers exported by switch.c to switch.h



Reduce code bloat in dsa_priv.h by moving the prototypes exported by
switch.h into their own header file.

Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent bd954b82
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
#include "master.h"
#include "port.h"
#include "slave.h"
#include "switch.h"
#include "tag.h"

static DEFINE_MUTEX(dsa2_mutex);
+0 −4
Original line number Diff line number Diff line
@@ -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 &&
+1 −0
Original line number Diff line number Diff line
@@ -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
+1 −0
Original line number Diff line number Diff line
@@ -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)

net/dsa/switch.h

0 → 100644
+11 −0
Original line number Diff line number Diff line
/* 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
Loading