summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorVeaceslav Falico <vfalico@redhat.com>2013-09-25 09:20:23 +0200
committerDavid S. Miller <davem@davemloft.net>2013-09-26 16:02:06 -0400
commitb6ccba4c681fdaf0070e580bf951badf7edc860b (patch)
tree69182002ffd5eba43619b6f7a1b8fe1273f59296 /net
parent70039aa7c6c182c488ec23a9669d9f6b21aebe16 (diff)
downloadop-kernel-dev-b6ccba4c681fdaf0070e580bf951badf7edc860b.zip
op-kernel-dev-b6ccba4c681fdaf0070e580bf951badf7edc860b.tar.gz
net: add a possibility to get private from netdev_adjacent->list
It will be useful to get first/last element. CC: "David S. Miller" <davem@davemloft.net> CC: Eric Dumazet <edumazet@google.com> CC: Jiri Pirko <jiri@resnulli.us> CC: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 0aa844aa..acc1181 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4466,6 +4466,16 @@ struct net_device *netdev_master_upper_dev_get(struct net_device *dev)
}
EXPORT_SYMBOL(netdev_master_upper_dev_get);
+void *netdev_adjacent_get_private(struct list_head *adj_list)
+{
+ struct netdev_adjacent *adj;
+
+ adj = list_entry(adj_list, struct netdev_adjacent, list);
+
+ return adj->private;
+}
+EXPORT_SYMBOL(netdev_adjacent_get_private);
+
/**
* netdev_all_upper_get_next_dev_rcu - Get the next dev from upper list
* @dev: device
OpenPOWER on IntegriCloud