2016-07-24 14:12:24

by Alexander Aring

[permalink] [raw]
Subject: [PATCH bluetooth-next 1/2] 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 <[email protected]>
---
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



2016-07-24 16:42:35

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH bluetooth-next 1/2] mac802154: set phy net namespace for new ifaces

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

patch has been applied to bluetooth-next tree.

Regards

Marcel


2016-07-24 16:42:33

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH bluetooth-next 2/2] 6lowpan: ndisc: no overreact if no short address is available

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 <[email protected]>
> ---
> net/6lowpan/ndisc.c | 2 --
> 1 file changed, 2 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


2016-07-24 14:12:25

by Alexander Aring

[permalink] [raw]
Subject: [PATCH bluetooth-next 2/2] 6lowpan: ndisc: no overreact if no short address is available

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 <[email protected]>
---
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