diff options
author | Veaceslav Falico <vfalico@redhat.com> | 2013-09-25 07:20:23 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-09-26 20:02:06 (GMT) |
commit | b6ccba4c681fdaf0070e580bf951badf7edc860b (patch) | |
tree | 69182002ffd5eba43619b6f7a1b8fe1273f59296 /net/core | |
parent | 70039aa7c6c182c488ec23a9669d9f6b21aebe16 (diff) | |
download | linux-fsl-qoriq-b6ccba4c681fdaf0070e580bf951badf7edc860b.tar.xz |
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')
-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 0aa844a..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 |