diff options
author | Veaceslav Falico <vfalico@redhat.com> | 2013-09-25 09:20:23 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-09-26 16:02:06 -0400 |
commit | b6ccba4c681fdaf0070e580bf951badf7edc860b (patch) | |
tree | 69182002ffd5eba43619b6f7a1b8fe1273f59296 /net/core/dev.c | |
parent | 70039aa7c6c182c488ec23a9669d9f6b21aebe16 (diff) |
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/core/dev.c')
-rw-r--r-- | net/core/dev.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 0aa844aae40b..acc11810805f 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 |