Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8740fa3f authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'dsa-headers-cleanup'



Vivien Didelot says:

====================
net: dsa: headers cleanup

The DSA core files share a common private header file. Include the DSA
public header there instead of independently in each core source file.

DSA core and its drivers use switchdev, thus include switchdev.h in the
public DSA header. This allows us to get rid of the forward declaration
and use typedef defined by switchdev.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents de321ed3 438ff537
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@
#include <linux/etherdevice.h>
#include <linux/if_bridge.h>
#include <net/dsa.h>
#include <net/switchdev.h>

#include "b53_regs.h"
#include "b53_priv.h"
@@ -1056,7 +1055,7 @@ EXPORT_SYMBOL(b53_vlan_del);

int b53_vlan_dump(struct dsa_switch *ds, int port,
		  struct switchdev_obj_port_vlan *vlan,
		  int (*cb)(struct switchdev_obj *obj))
		  switchdev_obj_dump_cb_t *cb)
{
	struct b53_device *dev = ds->priv;
	u16 vid, vid_start = 0, pvid;
@@ -1285,7 +1284,7 @@ static void b53_arl_search_rd(struct b53_device *dev, u8 idx,
static int b53_fdb_copy(struct net_device *dev, int port,
			const struct b53_arl_entry *ent,
			struct switchdev_obj_port_fdb *fdb,
			int (*cb)(struct switchdev_obj *obj))
			switchdev_obj_dump_cb_t *cb)
{
	if (!ent->is_valid)
		return 0;
@@ -1302,7 +1301,7 @@ static int b53_fdb_copy(struct net_device *dev, int port,

int b53_fdb_dump(struct dsa_switch *ds, int port,
		 struct switchdev_obj_port_fdb *fdb,
		 int (*cb)(struct switchdev_obj *obj))
		 switchdev_obj_dump_cb_t *cb)
{
	struct b53_device *priv = ds->priv;
	struct net_device *dev = ds->ports[port].netdev;
+2 −2
Original line number Diff line number Diff line
@@ -395,7 +395,7 @@ int b53_vlan_del(struct dsa_switch *ds, int port,
		 const struct switchdev_obj_port_vlan *vlan);
int b53_vlan_dump(struct dsa_switch *ds, int port,
		  struct switchdev_obj_port_vlan *vlan,
		  int (*cb)(struct switchdev_obj *obj));
		  switchdev_obj_dump_cb_t *cb);
int b53_fdb_prepare(struct dsa_switch *ds, int port,
		    const struct switchdev_obj_port_fdb *fdb,
		    struct switchdev_trans *trans);
@@ -406,7 +406,7 @@ int b53_fdb_del(struct dsa_switch *ds, int port,
		const struct switchdev_obj_port_fdb *fdb);
int b53_fdb_dump(struct dsa_switch *ds, int port,
		 struct switchdev_obj_port_fdb *fdb,
		 int (*cb)(struct switchdev_obj *obj));
		 switchdev_obj_dump_cb_t *cb);
int b53_mirror_add(struct dsa_switch *ds, int port,
		   struct dsa_mall_mirror_tc_entry *mirror, bool ingress);
void b53_mirror_del(struct dsa_switch *ds, int port,
+0 −1
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@
#include <linux/if_bridge.h>
#include <linux/brcmphy.h>
#include <linux/etherdevice.h>
#include <net/switchdev.h>
#include <linux/platform_data/b53.h>

#include "bcm_sf2.h"
+1 −2
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
#include <linux/workqueue.h>
#include <linux/module.h>
#include <linux/if_bridge.h>
#include <net/switchdev.h>
#include <net/dsa.h>

#include "dsa_loop.h"
@@ -188,7 +187,7 @@ static int dsa_loop_port_vlan_del(struct dsa_switch *ds, int port,

static int dsa_loop_port_vlan_dump(struct dsa_switch *ds, int port,
				   struct switchdev_obj_port_vlan *vlan,
				   int (*cb)(struct switchdev_obj *obj))
				   switchdev_obj_dump_cb_t *cb)
{
	struct dsa_loop_priv *ps = ds->priv;
	struct mii_bus *bus = ps->bus;
+1 −2
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@
#include <linux/reset.h>
#include <linux/gpio/consumer.h>
#include <net/dsa.h>
#include <net/switchdev.h>

#include "mt7530.h"

@@ -854,7 +853,7 @@ mt7530_port_fdb_del(struct dsa_switch *ds, int port,
static int
mt7530_port_fdb_dump(struct dsa_switch *ds, int port,
		     struct switchdev_obj_port_fdb *fdb,
		     int (*cb)(struct switchdev_obj *obj))
		     switchdev_obj_dump_cb_t *cb)
{
	struct mt7530_priv *priv = ds->priv;
	struct mt7530_fdb _fdb = { 0 };
Loading