diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-05-12 02:09:42 +0200 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-20 22:15:32 +0200 |
commit | 3193e8fdfa355289892661d206d1954114a7be95 (patch) | |
tree | 4fce7c85cd572389433a128db0ed180a3928e968 /net/batman-adv/hard-interface.c | |
parent | d0f714f472967577067853acc8dabe0abc75ae8f (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.c | 14 |
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) struct hard_iface *hard_iface; rcu_read_lock(); - list_for_each_entry_rcu(hard_iface, &hardif_list, list) { + list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { if (hard_iface->net_dev == net_dev && atomic_inc_not_zero(&hard_iface->refcount)) goto out; @@ -86,7 +86,7 @@ static struct hard_iface *hardif_get_active(const struct net_device *soft_iface) struct hard_iface *hard_iface; rcu_read_lock(); - list_for_each_entry_rcu(hard_iface, &hardif_list, list) { + list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { if (hard_iface->soft_iface != soft_iface) continue; @@ -161,7 +161,7 @@ static void check_known_mac_addr(const struct net_device *net_dev) const struct hard_iface *hard_iface; rcu_read_lock(); - list_for_each_entry_rcu(hard_iface, &hardif_list, list) { + list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { if ((hard_iface->if_status != IF_ACTIVE) && (hard_iface->if_status != IF_TO_BE_ACTIVATED)) continue; @@ -192,7 +192,7 @@ int batadv_hardif_min_mtu(struct net_device *soft_iface) goto out; rcu_read_lock(); - list_for_each_entry_rcu(hard_iface, &hardif_list, list) { + list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { if ((hard_iface->if_status != IF_ACTIVE) && (hard_iface->if_status != IF_TO_BE_ACTIVATED)) continue; @@ -315,7 +315,7 @@ int batadv_hardif_enable_interface(struct hard_iface *hard_iface, batadv_orig_hash_add_if(hard_iface, bat_priv->num_ifaces); hard_iface->batman_adv_ptype.type = __constant_htons(ETH_P_BATMAN); - hard_iface->batman_adv_ptype.func = batman_skb_recv; + hard_iface->batman_adv_ptype.func = batadv_batman_skb_recv; hard_iface->batman_adv_ptype.dev = hard_iface->net_dev; dev_add_pack(&hard_iface->batman_adv_ptype); @@ -436,7 +436,7 @@ static struct hard_iface *hardif_add_interface(struct net_device *net_dev) atomic_set(&hard_iface->refcount, 2); check_known_mac_addr(hard_iface->net_dev); - list_add_tail_rcu(&hard_iface->list, &hardif_list); + list_add_tail_rcu(&hard_iface->list, &batadv_hardif_list); /** * This can't be called via a bat_priv callback because @@ -477,7 +477,7 @@ void batadv_hardif_remove_interfaces(void) rtnl_lock(); list_for_each_entry_safe(hard_iface, hard_iface_tmp, - &hardif_list, list) { + &batadv_hardif_list, list) { list_del_rcu(&hard_iface->list); hardif_remove_interface(hard_iface); } |