Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: dsa: move definitions from dsa_priv.h to slave.c

There are some definitions in dsa_priv.h which are only used from
slave.c. So move them to slave.c.

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>

authored by

Vladimir Oltean and committed by
Jakub Kicinski
8e396fec 47d2ce03

+42 -42
-42
net/dsa/dsa_priv.h
··· 15 15 16 16 struct dsa_notifier_tag_8021q_vlan_info; 17 17 18 - struct dsa_switchdev_event_work { 19 - struct net_device *dev; 20 - struct net_device *orig_dev; 21 - struct work_struct work; 22 - unsigned long event; 23 - /* Specific for SWITCHDEV_FDB_ADD_TO_DEVICE and 24 - * SWITCHDEV_FDB_DEL_TO_DEVICE 25 - */ 26 - unsigned char addr[ETH_ALEN]; 27 - u16 vid; 28 - bool host_addr; 29 - }; 30 - 31 - enum dsa_standalone_event { 32 - DSA_UC_ADD, 33 - DSA_UC_DEL, 34 - DSA_MC_ADD, 35 - DSA_MC_DEL, 36 - }; 37 - 38 - struct dsa_standalone_event_work { 39 - struct work_struct work; 40 - struct net_device *dev; 41 - enum dsa_standalone_event event; 42 - unsigned char addr[ETH_ALEN]; 43 - u16 vid; 44 - }; 45 - 46 18 /* netlink.c */ 47 19 extern struct rtnl_link_ops dsa_link_ops __read_mostly; 48 - 49 - static inline bool dsa_switch_supports_uc_filtering(struct dsa_switch *ds) 50 - { 51 - return ds->ops->port_fdb_add && ds->ops->port_fdb_del && 52 - ds->fdb_isolation && !ds->vlan_filtering_is_global && 53 - !ds->needs_standalone_vlan_filtering; 54 - } 55 - 56 - static inline bool dsa_switch_supports_mc_filtering(struct dsa_switch *ds) 57 - { 58 - return ds->ops->port_mdb_add && ds->ops->port_mdb_del && 59 - ds->fdb_isolation && !ds->vlan_filtering_is_global && 60 - !ds->needs_standalone_vlan_filtering; 61 - } 62 20 63 21 /* tag_8021q.c */ 64 22 int dsa_switch_tag_8021q_vlan_add(struct dsa_switch *ds,
+42
net/dsa/slave.c
··· 29 29 #include "slave.h" 30 30 #include "tag.h" 31 31 32 + struct dsa_switchdev_event_work { 33 + struct net_device *dev; 34 + struct net_device *orig_dev; 35 + struct work_struct work; 36 + unsigned long event; 37 + /* Specific for SWITCHDEV_FDB_ADD_TO_DEVICE and 38 + * SWITCHDEV_FDB_DEL_TO_DEVICE 39 + */ 40 + unsigned char addr[ETH_ALEN]; 41 + u16 vid; 42 + bool host_addr; 43 + }; 44 + 45 + enum dsa_standalone_event { 46 + DSA_UC_ADD, 47 + DSA_UC_DEL, 48 + DSA_MC_ADD, 49 + DSA_MC_DEL, 50 + }; 51 + 52 + struct dsa_standalone_event_work { 53 + struct work_struct work; 54 + struct net_device *dev; 55 + enum dsa_standalone_event event; 56 + unsigned char addr[ETH_ALEN]; 57 + u16 vid; 58 + }; 59 + 60 + static bool dsa_switch_supports_uc_filtering(struct dsa_switch *ds) 61 + { 62 + return ds->ops->port_fdb_add && ds->ops->port_fdb_del && 63 + ds->fdb_isolation && !ds->vlan_filtering_is_global && 64 + !ds->needs_standalone_vlan_filtering; 65 + } 66 + 67 + static bool dsa_switch_supports_mc_filtering(struct dsa_switch *ds) 68 + { 69 + return ds->ops->port_mdb_add && ds->ops->port_mdb_del && 70 + ds->fdb_isolation && !ds->vlan_filtering_is_global && 71 + !ds->needs_standalone_vlan_filtering; 72 + } 73 + 32 74 static void dsa_slave_standalone_event_work(struct work_struct *work) 33 75 { 34 76 struct dsa_standalone_event_work *standalone_work =