diff options
author | Alexander Aring <aar@pengutronix.de> | 2016-07-24 14:12:24 (GMT) |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2016-09-19 18:19:34 (GMT) |
commit | abbcc341adb16f68915cae7ef9a10e0d7b57e3c0 (patch) | |
tree | d33a23e8cefeb70752c45abfcfaf69b857dd7334 /net/mac802154 | |
parent | e64c97b53bc6727aa4385535166aaa047281e02d (diff) | |
download | linux-abbcc341adb16f68915cae7ef9a10e0d7b57e3c0.tar.xz |
mac802154: set phy net namespace for new ifaces
This patch sets the net namespace when creating SoftMAC interfaces. This
is important if the namespace at phy layer was switched before.
Currently we losing interfaces in some namespace and it's not possible
to recover that.
Signed-off-by: Alexander Aring <aar@pengutronix.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/mac802154')
-rw-r--r-- | net/mac802154/iface.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c index 7079cd3..06019db 100644 --- a/net/mac802154/iface.c +++ b/net/mac802154/iface.c @@ -663,6 +663,7 @@ ieee802154_if_add(struct ieee802154_local *local, const char *name, /* TODO check this */ SET_NETDEV_DEV(ndev, &local->phy->dev); + dev_net_set(ndev, wpan_phy_net(local->hw.phy)); sdata = netdev_priv(ndev); ndev->ieee802154_ptr = &sdata->wpan_dev; memcpy(sdata->name, ndev->name, IFNAMSIZ); |