diff options
Diffstat (limited to 'net/batman-adv/main.c')
-rw-r--r-- | net/batman-adv/main.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index 709b33bbdf43..0a7cee0076f4 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c | |||
@@ -33,6 +33,9 @@ | |||
33 | #include "vis.h" | 33 | #include "vis.h" |
34 | #include "hash.h" | 34 | #include "hash.h" |
35 | 35 | ||
36 | |||
37 | /* List manipulations on hardif_list have to be rtnl_lock()'ed, | ||
38 | * list traversals just rcu-locked */ | ||
36 | struct list_head hardif_list; | 39 | struct list_head hardif_list; |
37 | 40 | ||
38 | unsigned char broadcast_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; | 41 | unsigned char broadcast_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; |
@@ -81,28 +84,29 @@ int mesh_init(struct net_device *soft_iface) | |||
81 | 84 | ||
82 | spin_lock_init(&bat_priv->forw_bat_list_lock); | 85 | spin_lock_init(&bat_priv->forw_bat_list_lock); |
83 | spin_lock_init(&bat_priv->forw_bcast_list_lock); | 86 | spin_lock_init(&bat_priv->forw_bcast_list_lock); |
84 | spin_lock_init(&bat_priv->hna_lhash_lock); | 87 | spin_lock_init(&bat_priv->tt_lhash_lock); |
85 | spin_lock_init(&bat_priv->hna_ghash_lock); | 88 | spin_lock_init(&bat_priv->tt_ghash_lock); |
86 | spin_lock_init(&bat_priv->gw_list_lock); | 89 | spin_lock_init(&bat_priv->gw_list_lock); |
87 | spin_lock_init(&bat_priv->vis_hash_lock); | 90 | spin_lock_init(&bat_priv->vis_hash_lock); |
88 | spin_lock_init(&bat_priv->vis_list_lock); | 91 | spin_lock_init(&bat_priv->vis_list_lock); |
89 | spin_lock_init(&bat_priv->softif_neigh_lock); | 92 | spin_lock_init(&bat_priv->softif_neigh_lock); |
93 | spin_lock_init(&bat_priv->softif_neigh_vid_lock); | ||
90 | 94 | ||
91 | INIT_HLIST_HEAD(&bat_priv->forw_bat_list); | 95 | INIT_HLIST_HEAD(&bat_priv->forw_bat_list); |
92 | INIT_HLIST_HEAD(&bat_priv->forw_bcast_list); | 96 | INIT_HLIST_HEAD(&bat_priv->forw_bcast_list); |
93 | INIT_HLIST_HEAD(&bat_priv->gw_list); | 97 | INIT_HLIST_HEAD(&bat_priv->gw_list); |
94 | INIT_HLIST_HEAD(&bat_priv->softif_neigh_list); | 98 | INIT_HLIST_HEAD(&bat_priv->softif_neigh_vids); |
95 | 99 | ||
96 | if (originator_init(bat_priv) < 1) | 100 | if (originator_init(bat_priv) < 1) |
97 | goto err; | 101 | goto err; |
98 | 102 | ||
99 | if (hna_local_init(bat_priv) < 1) | 103 | if (tt_local_init(bat_priv) < 1) |
100 | goto err; | 104 | goto err; |
101 | 105 | ||
102 | if (hna_global_init(bat_priv) < 1) | 106 | if (tt_global_init(bat_priv) < 1) |
103 | goto err; | 107 | goto err; |
104 | 108 | ||
105 | hna_local_add(soft_iface, soft_iface->dev_addr); | 109 | tt_local_add(soft_iface, soft_iface->dev_addr); |
106 | 110 | ||
107 | if (vis_init(bat_priv) < 1) | 111 | if (vis_init(bat_priv) < 1) |
108 | goto err; | 112 | goto err; |
@@ -133,8 +137,8 @@ void mesh_free(struct net_device *soft_iface) | |||
133 | gw_node_purge(bat_priv); | 137 | gw_node_purge(bat_priv); |
134 | originator_free(bat_priv); | 138 | originator_free(bat_priv); |
135 | 139 | ||
136 | hna_local_free(bat_priv); | 140 | tt_local_free(bat_priv); |
137 | hna_global_free(bat_priv); | 141 | tt_global_free(bat_priv); |
138 | 142 | ||
139 | softif_neigh_purge(bat_priv); | 143 | softif_neigh_purge(bat_priv); |
140 | 144 | ||