diff options
author | Marek Lindner <mareklindner@neomailbox.ch> | 2015-08-04 21:09:55 +0800 |
---|---|---|
committer | Antonio Quartulli <a@unstable.cc> | 2015-12-16 00:21:41 +0800 |
commit | cef63419f7dbd52e535d1932a88904b3facb1546 (patch) | |
tree | 166cd7f6ab64dd82b1be76e24a3c14c23a6cb496 /net/batman-adv/hard-interface.c | |
parent | 030ee5f648e2c4e04bfa870b622a359e1040e591 (diff) | |
download | linux-cef63419f7dbd52e535d1932a88904b3facb1546.tar.gz linux-cef63419f7dbd52e535d1932a88904b3facb1546.tar.bz2 linux-cef63419f7dbd52e535d1932a88904b3facb1546.zip |
batman-adv: add list of unique single hop neighbors per hard-interface
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Diffstat (limited to 'net/batman-adv/hard-interface.c')
-rw-r--r-- | net/batman-adv/hard-interface.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c index a58184fdf5fd..01acccc4d218 100644 --- a/net/batman-adv/hard-interface.c +++ b/net/batman-adv/hard-interface.c @@ -32,6 +32,7 @@ #include <linux/rculist.h> #include <linux/rtnetlink.h> #include <linux/slab.h> +#include <linux/spinlock.h> #include <linux/workqueue.h> #include <net/net_namespace.h> @@ -639,9 +640,12 @@ batadv_hardif_add_interface(struct net_device *net_dev) goto free_sysfs; INIT_LIST_HEAD(&hard_iface->list); + INIT_HLIST_HEAD(&hard_iface->neigh_list); INIT_WORK(&hard_iface->cleanup_work, batadv_hardif_remove_interface_finish); + spin_lock_init(&hard_iface->neigh_list_lock); + hard_iface->num_bcasts = BATADV_NUM_BCASTS_DEFAULT; if (batadv_is_wifi_netdev(net_dev)) hard_iface->num_bcasts = BATADV_NUM_BCASTS_WIRELESS; |