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

* [PATCH bluetooth-next 2/2] 6lowpan: ndisc: no overreact if no short address is available
  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 ` 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
  1 sibling, 1 reply; 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 removes handling to remove short address for a neigbour entry
if RS/RA/NS/NA doesn't contain a short address. If these messages
doesn't has any short address option, the existing short address from
ndisc cache will be used. The current behaviour will set that the
neigbour doesn't has a short address anymore.

Signed-off-by: Alexander Aring <aar@pengutronix.de>
---
 net/6lowpan/ndisc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/net/6lowpan/ndisc.c b/net/6lowpan/ndisc.c
index 86450b7..941df2f 100644
--- a/net/6lowpan/ndisc.c
+++ b/net/6lowpan/ndisc.c
@@ -101,8 +101,6 @@ static void lowpan_ndisc_802154_update(struct neighbour *n, u32 flags,
 		ieee802154_be16_to_le16(&neigh->short_addr, lladdr_short);
 		if (!lowpan_802154_is_valid_src_short_addr(neigh->short_addr))
 			neigh->short_addr = cpu_to_le16(IEEE802154_ADDR_SHORT_UNSPEC);
-	} else {
-		neigh->short_addr = cpu_to_le16(IEEE802154_ADDR_SHORT_UNSPEC);
 	}
 	write_unlock_bh(&n->lock);
 }
-- 
2.9.0


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

* Re: [PATCH bluetooth-next 2/2] 6lowpan: ndisc: no overreact if no short address is available
  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
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2016-07-24 16:42 UTC (permalink / raw)
  To: Alexander Aring; +Cc: linux-wpan, kernel, linux-bluetooth

Hi Alex,

> This patch removes handling to remove short address for a neigbour entry
> if RS/RA/NS/NA doesn't contain a short address. If these messages
> doesn't has any short address option, the existing short address from
> ndisc cache will be used. The current behaviour will set that the
> neigbour doesn't has a short address anymore.
> 
> Signed-off-by: Alexander Aring <aar@pengutronix.de>
> ---
> net/6lowpan/ndisc.c | 2 --
> 1 file changed, 2 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


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

* Re: [PATCH bluetooth-next 1/2] mac802154: set phy net namespace for new ifaces
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2016-07-24 16:42 UTC (permalink / raw)
  To: Alexander Aring; +Cc: linux-wpan, kernel, linux-bluetooth

Hi Alex,

> 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(+)

patch has been applied to bluetooth-next tree.

Regards

Marcel


^ permalink raw reply	[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