mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net: dsa: eliminate dsa_switch_ops :: port_bridge_tx_fwd_{,un}offload
We don't really need new switch API for these, and with new switches which intend to add support for this feature, it will become cumbersome to maintain. The change consists in restructuring the two drivers that implement this offload (sja1105 and mv88e6xxx) such that the offload is enabled and disabled from the ->port_bridge_{join,leave} methods instead of the old ->port_bridge_tx_fwd_{,un}offload. The only non-trivial change is that mv88e6xxx_map_virtual_bridge_to_pvt() has been moved to avoid a forward declaration, and the mv88e6xxx_reg_lock() calls from inside it have been removed, since locking is now done from mv88e6xxx_port_bridge_{join,leave}. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
b079922ba2
commit
857fdd74fb
4 changed files with 45 additions and 83 deletions
|
@ -222,6 +222,7 @@ struct dsa_mall_tc_entry {
|
|||
struct dsa_bridge {
|
||||
struct net_device *dev;
|
||||
unsigned int num;
|
||||
bool tx_fwd_offload;
|
||||
refcount_t refcount;
|
||||
};
|
||||
|
||||
|
@ -826,12 +827,6 @@ struct dsa_switch_ops {
|
|||
bool *tx_fwd_offload);
|
||||
void (*port_bridge_leave)(struct dsa_switch *ds, int port,
|
||||
struct dsa_bridge bridge);
|
||||
/* Called right after .port_bridge_join() */
|
||||
int (*port_bridge_tx_fwd_offload)(struct dsa_switch *ds, int port,
|
||||
struct dsa_bridge bridge);
|
||||
/* Called right before .port_bridge_leave() */
|
||||
void (*port_bridge_tx_fwd_unoffload)(struct dsa_switch *ds, int port,
|
||||
struct dsa_bridge bridge);
|
||||
void (*port_stp_state_set)(struct dsa_switch *ds, int port,
|
||||
u8 state);
|
||||
void (*port_fast_age)(struct dsa_switch *ds, int port);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue