diff options
author | Jiri Pirko <jiri@mellanox.com> | 2019-10-03 11:49:33 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-04 11:10:56 -0700 |
commit | 6b2a880f9dd1c8632f1afc5e3f77759ce3ff815f (patch) | |
tree | 1e5d57bd09d3a99a0389db4e9fc2e50606a4a3b6 /drivers/net/ethernet/mellanox/mlxsw/minimal.c | |
parent | 053e92aa3c20d37ab40692a851d63b4a40d1ff79 (diff) | |
download | linux-stable-6b2a880f9dd1c8632f1afc5e3f77759ce3ff815f.tar.gz linux-stable-6b2a880f9dd1c8632f1afc5e3f77759ce3ff815f.tar.bz2 linux-stable-6b2a880f9dd1c8632f1afc5e3f77759ce3ff815f.zip |
mlxsw: Register port netdevices into net of core
When creating netdevices for ports, put them under network namespace
that the core/parent devlink belongs to.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/minimal.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/minimal.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/minimal.c b/drivers/net/ethernet/mellanox/mlxsw/minimal.c index 471b0ca6d69a..cee16ad58307 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/minimal.c +++ b/drivers/net/ethernet/mellanox/mlxsw/minimal.c @@ -172,6 +172,7 @@ mlxsw_m_port_create(struct mlxsw_m *mlxsw_m, u8 local_port, u8 module) } SET_NETDEV_DEV(dev, mlxsw_m->bus_info->dev); + dev_net_set(dev, mlxsw_core_net(mlxsw_m->core)); mlxsw_m_port = netdev_priv(dev); mlxsw_m_port->dev = dev; mlxsw_m_port->mlxsw_m = mlxsw_m; |