diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-05-11 20:09:42 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-20 16:15:32 -0400 |
commit | 3193e8fdfa355289892661d206d1954114a7be95 (patch) | |
tree | 4fce7c85cd572389433a128db0ed180a3928e968 /net/batman-adv/vis.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/vis.c')
-rw-r--r-- | net/batman-adv/vis.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c index 24040c30063..83c931fa5c2 100644 --- a/net/batman-adv/vis.c +++ b/net/batman-adv/vis.c | |||
@@ -462,7 +462,7 @@ static struct vis_info *add_packet(struct bat_priv *bat_priv, | |||
462 | 462 | ||
463 | /* Make it a broadcast packet, if required */ | 463 | /* Make it a broadcast packet, if required */ |
464 | if (make_broadcast) | 464 | if (make_broadcast) |
465 | memcpy(packet->target_orig, broadcast_addr, ETH_ALEN); | 465 | memcpy(packet->target_orig, batadv_broadcast_addr, ETH_ALEN); |
466 | 466 | ||
467 | /* repair if entries is longer than packet. */ | 467 | /* repair if entries is longer than packet. */ |
468 | if (packet->entries * sizeof(struct vis_info_entry) > vis_info_len) | 468 | if (packet->entries * sizeof(struct vis_info_entry) > vis_info_len) |
@@ -524,7 +524,7 @@ void batadv_receive_client_update_packet(struct bat_priv *bat_priv, | |||
524 | 524 | ||
525 | /* Are we the target for this VIS packet? */ | 525 | /* Are we the target for this VIS packet? */ |
526 | if (vis_server == VIS_TYPE_SERVER_SYNC && | 526 | if (vis_server == VIS_TYPE_SERVER_SYNC && |
527 | is_my_mac(vis_packet->target_orig)) | 527 | batadv_is_my_mac(vis_packet->target_orig)) |
528 | are_target = 1; | 528 | are_target = 1; |
529 | 529 | ||
530 | spin_lock_bh(&bat_priv->vis_hash_lock); | 530 | spin_lock_bh(&bat_priv->vis_hash_lock); |
@@ -543,7 +543,7 @@ void batadv_receive_client_update_packet(struct bat_priv *bat_priv, | |||
543 | send_list_add(bat_priv, info); | 543 | send_list_add(bat_priv, info); |
544 | 544 | ||
545 | /* ... we're not the recipient (and thus need to forward). */ | 545 | /* ... we're not the recipient (and thus need to forward). */ |
546 | } else if (!is_my_mac(packet->target_orig)) { | 546 | } else if (!batadv_is_my_mac(packet->target_orig)) { |
547 | send_list_add(bat_priv, info); | 547 | send_list_add(bat_priv, info); |
548 | } | 548 | } |
549 | 549 | ||
@@ -623,7 +623,7 @@ static int generate_vis_packet(struct bat_priv *bat_priv) | |||
623 | info->first_seen = jiffies; | 623 | info->first_seen = jiffies; |
624 | packet->vis_type = atomic_read(&bat_priv->vis_mode); | 624 | packet->vis_type = atomic_read(&bat_priv->vis_mode); |
625 | 625 | ||
626 | memcpy(packet->target_orig, broadcast_addr, ETH_ALEN); | 626 | memcpy(packet->target_orig, batadv_broadcast_addr, ETH_ALEN); |
627 | packet->header.ttl = TTL; | 627 | packet->header.ttl = TTL; |
628 | packet->seqno = htonl(ntohl(packet->seqno) + 1); | 628 | packet->seqno = htonl(ntohl(packet->seqno) + 1); |
629 | packet->entries = 0; | 629 | packet->entries = 0; |
@@ -978,6 +978,6 @@ void batadv_vis_quit(struct bat_priv *bat_priv) | |||
978 | static void start_vis_timer(struct bat_priv *bat_priv) | 978 | static void start_vis_timer(struct bat_priv *bat_priv) |
979 | { | 979 | { |
980 | INIT_DELAYED_WORK(&bat_priv->vis_work, send_vis_packets); | 980 | INIT_DELAYED_WORK(&bat_priv->vis_work, send_vis_packets); |
981 | queue_delayed_work(bat_event_workqueue, &bat_priv->vis_work, | 981 | queue_delayed_work(batadv_event_workqueue, &bat_priv->vis_work, |
982 | msecs_to_jiffies(VIS_INTERVAL)); | 982 | msecs_to_jiffies(VIS_INTERVAL)); |
983 | } | 983 | } |