diff options
| author | David S. Miller <davem@davemloft.net> | 2017-05-18 17:40:20 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-05-18 17:40:20 +0300 |
| commit | 8740fa3ffb3521be5833f98f16582d3f44b1a0cf (patch) | |
| tree | eaf95281e38691f1a14dcdab49c50cf4d73ab339 /include | |
| parent | de321ed38471257ee45eac145bfd539254d13954 (diff) | |
| parent | 438ff53739ee523de3755a98ae3a290e69752620 (diff) | |
| download | linux-8740fa3ffb3521be5833f98f16582d3f44b1a0cf.tar.xz | |
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: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/dsa.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index ed767beca9c6..791fed62fb16 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -20,6 +20,7 @@ #include <linux/of.h> #include <linux/ethtool.h> #include <net/devlink.h> +#include <net/switchdev.h> struct tc_action; struct phy_device; @@ -284,12 +285,6 @@ static inline u8 dsa_upstream_port(struct dsa_switch *ds) return ds->rtable[dst->cpu_dp->ds->index]; } -struct switchdev_trans; -struct switchdev_obj; -struct switchdev_obj_port_fdb; -struct switchdev_obj_port_mdb; -struct switchdev_obj_port_vlan; - #define DSA_NOTIFIER_BRIDGE_JOIN 1 #define DSA_NOTIFIER_BRIDGE_LEAVE 2 @@ -409,7 +404,7 @@ struct dsa_switch_ops { const struct switchdev_obj_port_vlan *vlan); int (*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); /* * Forwarding database @@ -424,7 +419,7 @@ struct dsa_switch_ops { const struct switchdev_obj_port_fdb *fdb); int (*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); /* * Multicast database @@ -439,7 +434,7 @@ struct dsa_switch_ops { const struct switchdev_obj_port_mdb *mdb); int (*port_mdb_dump)(struct dsa_switch *ds, int port, struct switchdev_obj_port_mdb *mdb, - int (*cb)(struct switchdev_obj *obj)); + switchdev_obj_dump_cb_t *cb); /* * RXNFC |
