summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-10-16 07:15:31 -0700
committerDavid S. Miller <davem@davemloft.net>2015-10-16 07:15:31 -0700
commit4be3158abe1e02d24f82b34101e41d662fae2185 (patch)
tree38467400301d678df24d1e48a07646af18a7b47a /net
parent125ecf4b5994f17cb581af399933d0bd0b153080 (diff)
parent56ade8fe3fe1e134783f61d164305107ae01030f (diff)
Merge branch 'mlxsw-spectrum'
Jiri Pirko says: ==================== mlxsw: Driver update, add initial support for Spectrum ASIC Purpose of this patchset is to introduce initial support for Mellanox Spectrum ASIC, including L2 bridge forwarding offload. The only non-mlxsw patch in this patchset is the first one, introducing pre-change upper notifier. That is used in last patch to ensure ports of single ASIC are not bridged into multiple bridges, as that scenario is currently not supported by driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index a229bf0d649d..1225b4be8ed6 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5346,6 +5346,12 @@ static int __netdev_upper_dev_link(struct net_device *dev,
changeupper_info.master = master;
changeupper_info.linking = true;
+ ret = call_netdevice_notifiers_info(NETDEV_PRECHANGEUPPER, dev,
+ &changeupper_info.info);
+ ret = notifier_to_errno(ret);
+ if (ret)
+ return ret;
+
ret = __netdev_adjacent_dev_link_neighbour(dev, upper_dev, private,
master);
if (ret)
@@ -5488,6 +5494,9 @@ void netdev_upper_dev_unlink(struct net_device *dev,
changeupper_info.master = netdev_master_upper_dev_get(dev) == upper_dev;
changeupper_info.linking = false;
+ call_netdevice_notifiers_info(NETDEV_PRECHANGEUPPER, dev,
+ &changeupper_info.info);
+
__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
/* Here is the tricky part. We must remove all dev's lower