diff options
Diffstat (limited to 'net/batman-adv/main.c')
-rw-r--r-- | net/batman-adv/main.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index b827f6a158cb..709b33bbdf43 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2007-2010 B.A.T.M.A.N. contributors: | 2 | * Copyright (C) 2007-2011 B.A.T.M.A.N. contributors: |
3 | * | 3 | * |
4 | * Marek Lindner, Simon Wunderlich | 4 | * Marek Lindner, Simon Wunderlich |
5 | * | 5 | * |
@@ -30,11 +30,10 @@ | |||
30 | #include "translation-table.h" | 30 | #include "translation-table.h" |
31 | #include "hard-interface.h" | 31 | #include "hard-interface.h" |
32 | #include "gateway_client.h" | 32 | #include "gateway_client.h" |
33 | #include "types.h" | ||
34 | #include "vis.h" | 33 | #include "vis.h" |
35 | #include "hash.h" | 34 | #include "hash.h" |
36 | 35 | ||
37 | struct list_head if_list; | 36 | struct list_head hardif_list; |
38 | 37 | ||
39 | unsigned char broadcast_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; | 38 | unsigned char broadcast_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; |
40 | 39 | ||
@@ -42,7 +41,7 @@ struct workqueue_struct *bat_event_workqueue; | |||
42 | 41 | ||
43 | static int __init batman_init(void) | 42 | static int __init batman_init(void) |
44 | { | 43 | { |
45 | INIT_LIST_HEAD(&if_list); | 44 | INIT_LIST_HEAD(&hardif_list); |
46 | 45 | ||
47 | /* the name should not be longer than 10 chars - see | 46 | /* the name should not be longer than 10 chars - see |
48 | * http://lwn.net/Articles/23634/ */ | 47 | * http://lwn.net/Articles/23634/ */ |
@@ -80,7 +79,6 @@ int mesh_init(struct net_device *soft_iface) | |||
80 | { | 79 | { |
81 | struct bat_priv *bat_priv = netdev_priv(soft_iface); | 80 | struct bat_priv *bat_priv = netdev_priv(soft_iface); |
82 | 81 | ||
83 | spin_lock_init(&bat_priv->orig_hash_lock); | ||
84 | spin_lock_init(&bat_priv->forw_bat_list_lock); | 82 | spin_lock_init(&bat_priv->forw_bat_list_lock); |
85 | spin_lock_init(&bat_priv->forw_bcast_list_lock); | 83 | spin_lock_init(&bat_priv->forw_bcast_list_lock); |
86 | spin_lock_init(&bat_priv->hna_lhash_lock); | 84 | spin_lock_init(&bat_priv->hna_lhash_lock); |
@@ -155,14 +153,14 @@ void dec_module_count(void) | |||
155 | 153 | ||
156 | int is_my_mac(uint8_t *addr) | 154 | int is_my_mac(uint8_t *addr) |
157 | { | 155 | { |
158 | struct batman_if *batman_if; | 156 | struct hard_iface *hard_iface; |
159 | 157 | ||
160 | rcu_read_lock(); | 158 | rcu_read_lock(); |
161 | list_for_each_entry_rcu(batman_if, &if_list, list) { | 159 | list_for_each_entry_rcu(hard_iface, &hardif_list, list) { |
162 | if (batman_if->if_status != IF_ACTIVE) | 160 | if (hard_iface->if_status != IF_ACTIVE) |
163 | continue; | 161 | continue; |
164 | 162 | ||
165 | if (compare_orig(batman_if->net_dev->dev_addr, addr)) { | 163 | if (compare_eth(hard_iface->net_dev->dev_addr, addr)) { |
166 | rcu_read_unlock(); | 164 | rcu_read_unlock(); |
167 | return 1; | 165 | return 1; |
168 | } | 166 | } |