aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/hard-interface.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2012-05-11 20:09:42 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-06-20 16:15:32 -0400
commit3193e8fdfa355289892661d206d1954114a7be95 (patch)
tree4fce7c85cd572389433a128db0ed180a3928e968 /net/batman-adv/hard-interface.c
parentd0f714f472967577067853acc8dabe0abc75ae8f (diff)
batman-adv: Prefix main non-static functions with batadv_
batman-adv can be compiled as part of the kernel instead of an module. In that case the linker will see all non-static symbols of batman-adv and all other non-static symbols of the kernel. This could lead to symbol collisions. A prefix for the batman-adv symbols that defines their private namespace avoids such a problem. Reported-by: David Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/hard-interface.c')
-rw-r--r--net/batman-adv/hard-interface.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index 93acf2be7759..ab2fcfaf297e 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -46,7 +46,7 @@ struct hard_iface *batadv_hardif_get_by_netdev(const struct net_device *net_dev)
46 struct hard_iface *hard_iface; 46 struct hard_iface *hard_iface;
47 47
48 rcu_read_lock(); 48 rcu_read_lock();
49 list_for_each_entry_rcu(hard_iface, &hardif_list, list) { 49 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) {
50 if (hard_iface->net_dev == net_dev && 50 if (hard_iface->net_dev == net_dev &&
51 atomic_inc_not_zero(&hard_iface->refcount)) 51 atomic_inc_not_zero(&hard_iface->refcount))
52 goto out; 52 goto out;
@@ -86,7 +86,7 @@ static struct hard_iface *hardif_get_active(const struct net_device *soft_iface)
86 struct hard_iface *hard_iface; 86 struct hard_iface *hard_iface;
87 87
88 rcu_read_lock(); 88 rcu_read_lock();
89 list_for_each_entry_rcu(hard_iface, &hardif_list, list) { 89 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) {
90 if (hard_iface->soft_iface != soft_iface) 90 if (hard_iface->soft_iface != soft_iface)
91 continue; 91 continue;
92 92
@@ -161,7 +161,7 @@ static void check_known_mac_addr(const struct net_device *net_dev)
161 const struct hard_iface *hard_iface; 161 const struct hard_iface *hard_iface;
162 162
163 rcu_read_lock(); 163 rcu_read_lock();
164 list_for_each_entry_rcu(hard_iface, &hardif_list, list) { 164 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) {
165 if ((hard_iface->if_status != IF_ACTIVE) && 165 if ((hard_iface->if_status != IF_ACTIVE) &&
166 (hard_iface->if_status != IF_TO_BE_ACTIVATED)) 166 (hard_iface->if_status != IF_TO_BE_ACTIVATED))
167 continue; 167 continue;
@@ -192,7 +192,7 @@ int batadv_hardif_min_mtu(struct net_device *soft_iface)
192 goto out; 192 goto out;
193 193
194 rcu_read_lock(); 194 rcu_read_lock();
195 list_for_each_entry_rcu(hard_iface, &hardif_list, list) { 195 list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) {
196 if ((hard_iface->if_status != IF_ACTIVE) && 196 if ((hard_iface->if_status != IF_ACTIVE) &&
197 (hard_iface->if_status != IF_TO_BE_ACTIVATED)) 197 (hard_iface->if_status != IF_TO_BE_ACTIVATED))
198 continue; 198 continue;
@@ -315,7 +315,7 @@ int batadv_hardif_enable_interface(struct hard_iface *hard_iface,
315 batadv_orig_hash_add_if(hard_iface, bat_priv->num_ifaces); 315 batadv_orig_hash_add_if(hard_iface, bat_priv->num_ifaces);
316 316
317 hard_iface->batman_adv_ptype.type = __constant_htons(ETH_P_BATMAN); 317 hard_iface->batman_adv_ptype.type = __constant_htons(ETH_P_BATMAN);
318 hard_iface->batman_adv_ptype.func = batman_skb_recv; 318 hard_iface->batman_adv_ptype.func = batadv_batman_skb_recv;
319 hard_iface->batman_adv_ptype.dev = hard_iface->net_dev; 319 hard_iface->batman_adv_ptype.dev = hard_iface->net_dev;
320 dev_add_pack(&hard_iface->batman_adv_ptype); 320 dev_add_pack(&hard_iface->batman_adv_ptype);
321 321
@@ -436,7 +436,7 @@ static struct hard_iface *hardif_add_interface(struct net_device *net_dev)
436 atomic_set(&hard_iface->refcount, 2); 436 atomic_set(&hard_iface->refcount, 2);
437 437
438 check_known_mac_addr(hard_iface->net_dev); 438 check_known_mac_addr(hard_iface->net_dev);
439 list_add_tail_rcu(&hard_iface->list, &hardif_list); 439 list_add_tail_rcu(&hard_iface->list, &batadv_hardif_list);
440 440
441 /** 441 /**
442 * This can't be called via a bat_priv callback because 442 * This can't be called via a bat_priv callback because
@@ -477,7 +477,7 @@ void batadv_hardif_remove_interfaces(void)
477 477
478 rtnl_lock(); 478 rtnl_lock();
479 list_for_each_entry_safe(hard_iface, hard_iface_tmp, 479 list_for_each_entry_safe(hard_iface, hard_iface_tmp,
480 &hardif_list, list) { 480 &batadv_hardif_list, list) {
481 list_del_rcu(&hard_iface->list); 481 list_del_rcu(&hard_iface->list);
482 hardif_remove_interface(hard_iface); 482 hardif_remove_interface(hard_iface);
483 } 483 }