summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Aring <aar@pengutronix.de>2016-07-24 16:12:24 +0200
committerMarcel Holtmann <marcel@holtmann.org>2016-09-19 20:19:34 +0200
commitabbcc341adb16f68915cae7ef9a10e0d7b57e3c0 (patch)
treed33a23e8cefeb70752c45abfcfaf69b857dd7334
parente64c97b53bc6727aa4385535166aaa047281e02d (diff)
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>
-rw-r--r--net/mac802154/iface.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
index 7079cd32a7ad..06019dba4b10 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);