diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-06-03 16:19:21 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-07-01 16:47:19 -0400 |
commit | acd34afa89772f6379b642bb979d0a112328c769 (patch) | |
tree | dc72002fdefbd521253f651a53bbed762d3af899 /net/batman-adv/vis.c | |
parent | d69909d2fc9e00bd8149cc8df9b18c35008e3e62 (diff) |
batman-adv: Prefix packet enum with BATADV_
Reported-by: Martin Hundebøll <martin@hundeboll.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 | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c index c920b4b8516..f5692eef613 100644 --- a/net/batman-adv/vis.c +++ b/net/batman-adv/vis.c | |||
@@ -256,7 +256,7 @@ int batadv_vis_seq_print_text(struct seq_file *seq, void *offset) | |||
256 | if (!primary_if) | 256 | if (!primary_if) |
257 | goto out; | 257 | goto out; |
258 | 258 | ||
259 | if (vis_server == VIS_TYPE_CLIENT_UPDATE) | 259 | if (vis_server == BATADV_VIS_TYPE_CLIENT_UPDATE) |
260 | goto out; | 260 | goto out; |
261 | 261 | ||
262 | spin_lock_bh(&bat_priv->vis_hash_lock); | 262 | spin_lock_bh(&bat_priv->vis_hash_lock); |
@@ -437,7 +437,7 @@ void batadv_receive_server_sync_packet(struct bat_priv *bat_priv, | |||
437 | int is_new, make_broadcast; | 437 | int is_new, make_broadcast; |
438 | int vis_server = atomic_read(&bat_priv->vis_mode); | 438 | int vis_server = atomic_read(&bat_priv->vis_mode); |
439 | 439 | ||
440 | make_broadcast = (vis_server == VIS_TYPE_SERVER_SYNC); | 440 | make_broadcast = (vis_server == BATADV_VIS_TYPE_SERVER_SYNC); |
441 | 441 | ||
442 | spin_lock_bh(&bat_priv->vis_hash_lock); | 442 | spin_lock_bh(&bat_priv->vis_hash_lock); |
443 | info = batadv_add_packet(bat_priv, vis_packet, vis_info_len, | 443 | info = batadv_add_packet(bat_priv, vis_packet, vis_info_len, |
@@ -448,7 +448,7 @@ void batadv_receive_server_sync_packet(struct bat_priv *bat_priv, | |||
448 | /* only if we are server ourselves and packet is newer than the one in | 448 | /* only if we are server ourselves and packet is newer than the one in |
449 | * hash. | 449 | * hash. |
450 | */ | 450 | */ |
451 | if (vis_server == VIS_TYPE_SERVER_SYNC && is_new) | 451 | if (vis_server == BATADV_VIS_TYPE_SERVER_SYNC && is_new) |
452 | batadv_send_list_add(bat_priv, info); | 452 | batadv_send_list_add(bat_priv, info); |
453 | end: | 453 | end: |
454 | spin_unlock_bh(&bat_priv->vis_hash_lock); | 454 | spin_unlock_bh(&bat_priv->vis_hash_lock); |
@@ -470,7 +470,7 @@ void batadv_receive_client_update_packet(struct bat_priv *bat_priv, | |||
470 | return; | 470 | return; |
471 | 471 | ||
472 | /* Are we the target for this VIS packet? */ | 472 | /* Are we the target for this VIS packet? */ |
473 | if (vis_server == VIS_TYPE_SERVER_SYNC && | 473 | if (vis_server == BATADV_VIS_TYPE_SERVER_SYNC && |
474 | batadv_is_my_mac(vis_packet->target_orig)) | 474 | batadv_is_my_mac(vis_packet->target_orig)) |
475 | are_target = 1; | 475 | are_target = 1; |
476 | 476 | ||
@@ -486,7 +486,7 @@ void batadv_receive_client_update_packet(struct bat_priv *bat_priv, | |||
486 | 486 | ||
487 | /* send only if we're the target server or ... */ | 487 | /* send only if we're the target server or ... */ |
488 | if (are_target && is_new) { | 488 | if (are_target && is_new) { |
489 | packet->vis_type = VIS_TYPE_SERVER_SYNC; /* upgrade! */ | 489 | packet->vis_type = BATADV_VIS_TYPE_SERVER_SYNC; /* upgrade! */ |
490 | batadv_send_list_add(bat_priv, info); | 490 | batadv_send_list_add(bat_priv, info); |
491 | 491 | ||
492 | /* ... we're not the recipient (and thus need to forward). */ | 492 | /* ... we're not the recipient (and thus need to forward). */ |
@@ -526,7 +526,7 @@ static int batadv_find_best_vis_server(struct bat_priv *bat_priv, | |||
526 | if (!router) | 526 | if (!router) |
527 | continue; | 527 | continue; |
528 | 528 | ||
529 | if ((orig_node->flags & VIS_SERVER) && | 529 | if ((orig_node->flags & BATADV_VIS_SERVER) && |
530 | (router->tq_avg > best_tq)) { | 530 | (router->tq_avg > best_tq)) { |
531 | best_tq = router->tq_avg; | 531 | best_tq = router->tq_avg; |
532 | memcpy(packet->target_orig, orig_node->orig, | 532 | memcpy(packet->target_orig, orig_node->orig, |
@@ -580,7 +580,7 @@ static int batadv_generate_vis_packet(struct bat_priv *bat_priv) | |||
580 | packet->entries = 0; | 580 | packet->entries = 0; |
581 | skb_trim(info->skb_packet, sizeof(*packet)); | 581 | skb_trim(info->skb_packet, sizeof(*packet)); |
582 | 582 | ||
583 | if (packet->vis_type == VIS_TYPE_CLIENT_UPDATE) { | 583 | if (packet->vis_type == BATADV_VIS_TYPE_CLIENT_UPDATE) { |
584 | best_tq = batadv_find_best_vis_server(bat_priv, info); | 584 | best_tq = batadv_find_best_vis_server(bat_priv, info); |
585 | 585 | ||
586 | if (best_tq < 0) | 586 | if (best_tq < 0) |
@@ -707,7 +707,7 @@ static void batadv_broadcast_vis_packet(struct bat_priv *bat_priv, | |||
707 | rcu_read_lock(); | 707 | rcu_read_lock(); |
708 | hlist_for_each_entry_rcu(orig_node, node, head, hash_entry) { | 708 | hlist_for_each_entry_rcu(orig_node, node, head, hash_entry) { |
709 | /* if it's a vis server and reachable, send it. */ | 709 | /* if it's a vis server and reachable, send it. */ |
710 | if (!(orig_node->flags & VIS_SERVER)) | 710 | if (!(orig_node->flags & BATADV_VIS_SERVER)) |
711 | continue; | 711 | continue; |
712 | 712 | ||
713 | router = batadv_orig_node_get_router(orig_node); | 713 | router = batadv_orig_node_get_router(orig_node); |
@@ -875,7 +875,7 @@ int batadv_vis_init(struct bat_priv *bat_priv) | |||
875 | kref_init(&bat_priv->my_vis_info->refcount); | 875 | kref_init(&bat_priv->my_vis_info->refcount); |
876 | bat_priv->my_vis_info->bat_priv = bat_priv; | 876 | bat_priv->my_vis_info->bat_priv = bat_priv; |
877 | packet->header.version = BATADV_COMPAT_VERSION; | 877 | packet->header.version = BATADV_COMPAT_VERSION; |
878 | packet->header.packet_type = BAT_VIS; | 878 | packet->header.packet_type = BATADV_VIS; |
879 | packet->header.ttl = BATADV_TTL; | 879 | packet->header.ttl = BATADV_TTL; |
880 | packet->seqno = 0; | 880 | packet->seqno = 0; |
881 | packet->entries = 0; | 881 | packet->entries = 0; |