diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2017-03-30 17:37:14 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-01 15:22:57 -0400 |
commit | 40ef2c93395fcd25051643707d0956ce9120de41 (patch) | |
tree | 3e113df3919b44135380f31c46c35737496e10d3 /net/dsa/switch.c | |
parent | e96a6e027510279a5089b24e2f217693488327f3 (diff) |
net: dsa: add cross-chip bridging operations
Introduce crosschip_bridge_{join,leave} operations in the dsa_switch_ops
structure, which can be used by switches supporting interconnection.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/switch.c')
-rw-r--r-- | net/dsa/switch.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/dsa/switch.c b/net/dsa/switch.c index 7b6f38e5fef6..ca6e26e514f0 100644 --- a/net/dsa/switch.c +++ b/net/dsa/switch.c | |||
@@ -20,9 +20,9 @@ static int dsa_switch_bridge_join(struct dsa_switch *ds, | |||
20 | if (ds->index == info->sw_index && ds->ops->port_bridge_join) | 20 | if (ds->index == info->sw_index && ds->ops->port_bridge_join) |
21 | return ds->ops->port_bridge_join(ds, info->port, info->br); | 21 | return ds->ops->port_bridge_join(ds, info->port, info->br); |
22 | 22 | ||
23 | if (ds->index != info->sw_index) | 23 | if (ds->index != info->sw_index && ds->ops->crosschip_bridge_join) |
24 | dev_dbg(ds->dev, "crosschip DSA port %d.%d bridged to %s\n", | 24 | return ds->ops->crosschip_bridge_join(ds, info->sw_index, |
25 | info->sw_index, info->port, netdev_name(info->br)); | 25 | info->port, info->br); |
26 | 26 | ||
27 | return 0; | 27 | return 0; |
28 | } | 28 | } |
@@ -33,9 +33,9 @@ static int dsa_switch_bridge_leave(struct dsa_switch *ds, | |||
33 | if (ds->index == info->sw_index && ds->ops->port_bridge_leave) | 33 | if (ds->index == info->sw_index && ds->ops->port_bridge_leave) |
34 | ds->ops->port_bridge_leave(ds, info->port, info->br); | 34 | ds->ops->port_bridge_leave(ds, info->port, info->br); |
35 | 35 | ||
36 | if (ds->index != info->sw_index) | 36 | if (ds->index != info->sw_index && ds->ops->crosschip_bridge_leave) |
37 | dev_dbg(ds->dev, "crosschip DSA port %d.%d unbridged from %s\n", | 37 | ds->ops->crosschip_bridge_leave(ds, info->sw_index, info->port, |
38 | info->sw_index, info->port, netdev_name(info->br)); | 38 | info->br); |
39 | 39 | ||
40 | return 0; | 40 | return 0; |
41 | } | 41 | } |