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: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Vladimir Oltean 2022-11-21 15:55:48 +02:00 committed by Jakub Kicinski
parent bd954b8260
commit 0c603136e1
6 changed files with 15 additions and 4 deletions

View File

@ -22,6 +22,7 @@
#include "master.h"
#include "port.h"
#include "slave.h"
#include "switch.h"
#include "tag.h"
static DEFINE_MUTEX(dsa2_mutex);

View File

@ -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 &&

View File

@ -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

View File

@ -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)

11
net/dsa/switch.h Normal file
View File

@ -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

View File

@ -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