mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
e96a6e0275
commit
40ef2c9339
2 changed files with 14 additions and 6 deletions
|
|
@ -20,9 +20,9 @@ static int dsa_switch_bridge_join(struct dsa_switch *ds,
|
|||
if (ds->index == info->sw_index && ds->ops->port_bridge_join)
|
||||
return ds->ops->port_bridge_join(ds, info->port, info->br);
|
||||
|
||||
if (ds->index != info->sw_index)
|
||||
dev_dbg(ds->dev, "crosschip DSA port %d.%d bridged to %s\n",
|
||||
info->sw_index, info->port, netdev_name(info->br));
|
||||
if (ds->index != info->sw_index && ds->ops->crosschip_bridge_join)
|
||||
return ds->ops->crosschip_bridge_join(ds, info->sw_index,
|
||||
info->port, info->br);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -33,9 +33,9 @@ static int dsa_switch_bridge_leave(struct dsa_switch *ds,
|
|||
if (ds->index == info->sw_index && ds->ops->port_bridge_leave)
|
||||
ds->ops->port_bridge_leave(ds, info->port, info->br);
|
||||
|
||||
if (ds->index != info->sw_index)
|
||||
dev_dbg(ds->dev, "crosschip DSA port %d.%d unbridged from %s\n",
|
||||
info->sw_index, info->port, netdev_name(info->br));
|
||||
if (ds->index != info->sw_index && ds->ops->crosschip_bridge_leave)
|
||||
ds->ops->crosschip_bridge_leave(ds, info->sw_index, info->port,
|
||||
info->br);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue