summaryrefslogtreecommitdiffstats
path: root/net/batman-adv
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2015-04-02 17:07:00 +0200
committerDavid S. Miller <davem@davemloft.net>2015-04-02 14:04:59 -0400
commita54acb3a6f853e8394c4cb7b6a4d93c88f13eefd (patch)
treeb1e887d2bc8c205d4fe3b331e40fddba5de6ee01 /net/batman-adv
parent033f46b3c13d4072d8ee6b26dd1e90fdd06895d0 (diff)
downloadlinux-a54acb3a6f853e8394c4cb7b6a4d93c88f13eefd.tar.bz2
dev: introduce dev_get_iflink()
The goal of this patch is to prepare the removal of the iflink field. It introduces a new ndo function, which will be implemented by virtual interfaces. There is no functional change into this patch. All readers of iflink field now call dev_get_iflink(). Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/batman-adv')
-rw-r--r--net/batman-adv/hard-interface.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index fbda6b54baff..baf1f9843f2c 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -83,11 +83,12 @@ static bool batadv_is_on_batman_iface(const struct net_device *net_dev)
return true;
/* no more parents..stop recursion */
- if (net_dev->iflink == 0 || net_dev->iflink == net_dev->ifindex)
+ if (dev_get_iflink(net_dev) == 0 ||
+ dev_get_iflink(net_dev) == net_dev->ifindex)
return false;
/* recurse over the parent device */
- parent_dev = __dev_get_by_index(&init_net, net_dev->iflink);
+ parent_dev = __dev_get_by_index(&init_net, dev_get_iflink(net_dev));
/* if we got a NULL parent_dev there is something broken.. */
if (WARN(!parent_dev, "Cannot find parent device"))
return false;