summaryrefslogtreecommitdiffstats
path: root/net/ieee802154
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2018-07-02 11:21:47 +0200
committerStefan Schmidt <stefan@datenfreihafen.org>2018-07-05 11:13:17 +0200
commitb30c122c0bbb0a1dc413085e177ea09467e65fdb (patch)
treebe1921b12d40df6e258c21f3befcee6b571a968b /net/ieee802154
parentieee802154: mcr20a: add missing includes (diff)
downloadlinux-b30c122c0bbb0a1dc413085e177ea09467e65fdb.tar.xz
linux-b30c122c0bbb0a1dc413085e177ea09467e65fdb.zip
ieee802154: 6lowpan: set IFLA_LINK
Otherwise NetworkManager (and iproute alike) is not able to identify the parent IEEE 802.15.4 interface of a 6LoWPAN link. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Acked-by: Alexander Aring <aring@mojatatu.com> Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Diffstat (limited to 'net/ieee802154')
-rw-r--r--net/ieee802154/6lowpan/core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ieee802154/6lowpan/core.c b/net/ieee802154/6lowpan/core.c
index 275449b0d633..3297e7fa9945 100644
--- a/net/ieee802154/6lowpan/core.c
+++ b/net/ieee802154/6lowpan/core.c
@@ -90,12 +90,18 @@ static int lowpan_neigh_construct(struct net_device *dev, struct neighbour *n)
return 0;
}
+static int lowpan_get_iflink(const struct net_device *dev)
+{
+ return lowpan_802154_dev(dev)->wdev->ifindex;
+}
+
static const struct net_device_ops lowpan_netdev_ops = {
.ndo_init = lowpan_dev_init,
.ndo_start_xmit = lowpan_xmit,
.ndo_open = lowpan_open,
.ndo_stop = lowpan_stop,
.ndo_neigh_construct = lowpan_neigh_construct,
+ .ndo_get_iflink = lowpan_get_iflink,
};
static void lowpan_setup(struct net_device *ldev)