Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH bluetooth-next 1/2] mac802154: set phy net namespace for new ifaces
@ 2016-07-24 14:12 Alexander Aring
  2016-07-24 14:12 ` [PATCH bluetooth-next 2/2] 6lowpan: ndisc: no overreact if no short address is available Alexander Aring
  2016-07-24 16:42 ` [PATCH bluetooth-next 1/2] mac802154: set phy net namespace for new ifaces Marcel Holtmann
  0 siblings, 2 replies; 4+ messages in thread
From: Alexander Aring @ 2016-07-24 14:12 UTC (permalink / raw)
  To: linux-wpan; +Cc: kernel, linux-bluetooth, Alexander Aring

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>
---
 net/mac802154/iface.c | 1 +
 1 file changed, 1 insertion(+)

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);
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-24 16:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-24 14:12 [PATCH bluetooth-next 1/2] mac802154: set phy net namespace for new ifaces Alexander Aring
2016-07-24 14:12 ` [PATCH bluetooth-next 2/2] 6lowpan: ndisc: no overreact if no short address is available Alexander Aring
2016-07-24 16:42   ` Marcel Holtmann
2016-07-24 16:42 ` [PATCH bluetooth-next 1/2] mac802154: set phy net namespace for new ifaces Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox