diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-05-12 07:48:58 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-25 02:21:30 -0400 |
commit | 1eda58bfc56c43e73a0cf2bfb6e4d620ab866109 (patch) | |
tree | d71ba63d988193126831e49bdce03a1131d28ea4 /net/batman-adv/vis.c | |
parent | f0530ee5fb9e73465ac844ada2c96a2bea85a18f (diff) |
batman-adv: Prefix main static inline functions with batadv_
All non-static symbols of batman-adv were prefixed with batadv_ to avoid
collisions with other symbols of the kernel. Other symbols of batman-adv
should use the same prefix to keep the naming scheme consistent.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/vis.c')
-rw-r--r-- | net/batman-adv/vis.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c index bf72c524866..d45989e0bbd 100644 --- a/net/batman-adv/vis.c +++ b/net/batman-adv/vis.c | |||
@@ -59,7 +59,7 @@ static int vis_info_cmp(const struct hlist_node *node, const void *data2) | |||
59 | d2 = data2; | 59 | d2 = data2; |
60 | p1 = (struct vis_packet *)d1->skb_packet->data; | 60 | p1 = (struct vis_packet *)d1->skb_packet->data; |
61 | p2 = (struct vis_packet *)d2->skb_packet->data; | 61 | p2 = (struct vis_packet *)d2->skb_packet->data; |
62 | return compare_eth(p1->vis_orig, p2->vis_orig); | 62 | return batadv_compare_eth(p1->vis_orig, p2->vis_orig); |
63 | } | 63 | } |
64 | 64 | ||
65 | /* hash function to choose an entry in a hash table of given size | 65 | /* hash function to choose an entry in a hash table of given size |
@@ -127,7 +127,7 @@ static void vis_data_insert_interface(const uint8_t *interface, | |||
127 | struct hlist_node *pos; | 127 | struct hlist_node *pos; |
128 | 128 | ||
129 | hlist_for_each_entry(entry, pos, if_list, list) { | 129 | hlist_for_each_entry(entry, pos, if_list, list) { |
130 | if (compare_eth(entry->addr, interface)) | 130 | if (batadv_compare_eth(entry->addr, interface)) |
131 | return; | 131 | return; |
132 | } | 132 | } |
133 | 133 | ||
@@ -181,7 +181,7 @@ static ssize_t vis_data_read_entry(char *buff, | |||
181 | /* maximal length: max(4+17+2, 3+17+1+3+2) == 26 */ | 181 | /* maximal length: max(4+17+2, 3+17+1+3+2) == 26 */ |
182 | if (primary && entry->quality == 0) | 182 | if (primary && entry->quality == 0) |
183 | return sprintf(buff, "TT %pM, ", entry->dest); | 183 | return sprintf(buff, "TT %pM, ", entry->dest); |
184 | else if (compare_eth(entry->src, src)) | 184 | else if (batadv_compare_eth(entry->src, src)) |
185 | return sprintf(buff, "TQ %pM %d, ", entry->dest, | 185 | return sprintf(buff, "TQ %pM %d, ", entry->dest, |
186 | entry->quality); | 186 | entry->quality); |
187 | 187 | ||
@@ -233,8 +233,8 @@ int batadv_vis_seq_print_text(struct seq_file *seq, void *offset) | |||
233 | for (j = 0; j < packet->entries; j++) { | 233 | for (j = 0; j < packet->entries; j++) { |
234 | if (entries[j].quality == 0) | 234 | if (entries[j].quality == 0) |
235 | continue; | 235 | continue; |
236 | if (compare_eth(entries[j].src, | 236 | if (batadv_compare_eth(entries[j].src, |
237 | packet->vis_orig)) | 237 | packet->vis_orig)) |
238 | continue; | 238 | continue; |
239 | vis_data_insert_interface(entries[j].src, | 239 | vis_data_insert_interface(entries[j].src, |
240 | &vis_if_list, | 240 | &vis_if_list, |
@@ -245,7 +245,8 @@ int batadv_vis_seq_print_text(struct seq_file *seq, void *offset) | |||
245 | buf_size += 18 + 26 * packet->entries; | 245 | buf_size += 18 + 26 * packet->entries; |
246 | 246 | ||
247 | /* add primary/secondary records */ | 247 | /* add primary/secondary records */ |
248 | if (compare_eth(entry->addr, packet->vis_orig)) | 248 | if (batadv_compare_eth(entry->addr, |
249 | packet->vis_orig)) | ||
249 | buf_size += | 250 | buf_size += |
250 | vis_data_count_prim_sec(&vis_if_list); | 251 | vis_data_count_prim_sec(&vis_if_list); |
251 | 252 | ||
@@ -285,8 +286,8 @@ int batadv_vis_seq_print_text(struct seq_file *seq, void *offset) | |||
285 | for (j = 0; j < packet->entries; j++) { | 286 | for (j = 0; j < packet->entries; j++) { |
286 | if (entries[j].quality == 0) | 287 | if (entries[j].quality == 0) |
287 | continue; | 288 | continue; |
288 | if (compare_eth(entries[j].src, | 289 | if (batadv_compare_eth(entries[j].src, |
289 | packet->vis_orig)) | 290 | packet->vis_orig)) |
290 | continue; | 291 | continue; |
291 | vis_data_insert_interface(entries[j].src, | 292 | vis_data_insert_interface(entries[j].src, |
292 | &vis_if_list, | 293 | &vis_if_list, |
@@ -305,7 +306,8 @@ int batadv_vis_seq_print_text(struct seq_file *seq, void *offset) | |||
305 | entry->primary); | 306 | entry->primary); |
306 | 307 | ||
307 | /* add primary/secondary records */ | 308 | /* add primary/secondary records */ |
308 | if (compare_eth(entry->addr, packet->vis_orig)) | 309 | if (batadv_compare_eth(entry->addr, |
310 | packet->vis_orig)) | ||
309 | buff_pos += | 311 | buff_pos += |
310 | vis_data_read_prim_sec(buff + buff_pos, | 312 | vis_data_read_prim_sec(buff + buff_pos, |
311 | &vis_if_list); | 313 | &vis_if_list); |
@@ -379,7 +381,7 @@ static int recv_list_is_in(struct bat_priv *bat_priv, | |||
379 | 381 | ||
380 | spin_lock_bh(&bat_priv->vis_list_lock); | 382 | spin_lock_bh(&bat_priv->vis_list_lock); |
381 | list_for_each_entry(entry, recv_list, list) { | 383 | list_for_each_entry(entry, recv_list, list) { |
382 | if (compare_eth(entry->mac, mac)) { | 384 | if (batadv_compare_eth(entry->mac, mac)) { |
383 | spin_unlock_bh(&bat_priv->vis_list_lock); | 385 | spin_unlock_bh(&bat_priv->vis_list_lock); |
384 | return 1; | 386 | return 1; |
385 | } | 387 | } |
@@ -651,7 +653,7 @@ static int generate_vis_packet(struct bat_priv *bat_priv) | |||
651 | if (!router) | 653 | if (!router) |
652 | continue; | 654 | continue; |
653 | 655 | ||
654 | if (!compare_eth(router->addr, orig_node->orig)) | 656 | if (!batadv_compare_eth(router->addr, orig_node->orig)) |
655 | goto next; | 657 | goto next; |
656 | 658 | ||
657 | if (router->if_incoming->if_status != IF_ACTIVE) | 659 | if (router->if_incoming->if_status != IF_ACTIVE) |
@@ -728,7 +730,8 @@ static void purge_vis_packets(struct bat_priv *bat_priv) | |||
728 | if (info == bat_priv->my_vis_info) | 730 | if (info == bat_priv->my_vis_info) |
729 | continue; | 731 | continue; |
730 | 732 | ||
731 | if (has_timed_out(info->first_seen, VIS_TIMEOUT)) { | 733 | if (batadv_has_timed_out(info->first_seen, |
734 | VIS_TIMEOUT)) { | ||
732 | hlist_del(node); | 735 | hlist_del(node); |
733 | send_list_del(info); | 736 | send_list_del(info); |
734 | kref_put(&info->refcount, free_info); | 737 | kref_put(&info->refcount, free_info); |