aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/vis.c
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2011-05-05 02:42:45 -0400
committerSven Eckelmann <sven@narfation.org>2011-05-08 10:10:42 -0400
commit2dafb49d84a9195193b28ac5047df1bbab6053b9 (patch)
treecb3a9a77496257c54ce9fb61c4ff08743a98dc31 /net/batman-adv/vis.c
parent01df2b65e97735547ce37844f4134b5ea99b4037 (diff)
batman-adv: rename everything from *hna* into *tt* (translation table)
To be coherent, all the functions/variables/constants have been renamed to the TranslationTable style Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/vis.c')
-rw-r--r--net/batman-adv/vis.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c
index c8f571d3b5d4..c39f20cc1ba6 100644
--- a/net/batman-adv/vis.c
+++ b/net/batman-adv/vis.c
@@ -194,7 +194,7 @@ static ssize_t vis_data_read_entry(char *buff, struct vis_info_entry *entry,
194{ 194{
195 /* maximal length: max(4+17+2, 3+17+1+3+2) == 26 */ 195 /* maximal length: max(4+17+2, 3+17+1+3+2) == 26 */
196 if (primary && entry->quality == 0) 196 if (primary && entry->quality == 0)
197 return sprintf(buff, "HNA %pM, ", entry->dest); 197 return sprintf(buff, "TT %pM, ", entry->dest);
198 else if (compare_eth(entry->src, src)) 198 else if (compare_eth(entry->src, src))
199 return sprintf(buff, "TQ %pM %d, ", entry->dest, 199 return sprintf(buff, "TQ %pM %d, ", entry->dest,
200 entry->quality); 200 entry->quality);
@@ -622,7 +622,7 @@ static int generate_vis_packet(struct bat_priv *bat_priv)
622 struct vis_info *info = (struct vis_info *)bat_priv->my_vis_info; 622 struct vis_info *info = (struct vis_info *)bat_priv->my_vis_info;
623 struct vis_packet *packet = (struct vis_packet *)info->skb_packet->data; 623 struct vis_packet *packet = (struct vis_packet *)info->skb_packet->data;
624 struct vis_info_entry *entry; 624 struct vis_info_entry *entry;
625 struct hna_local_entry *hna_local_entry; 625 struct tt_local_entry *tt_local_entry;
626 int best_tq = -1, i; 626 int best_tq = -1, i;
627 627
628 info->first_seen = jiffies; 628 info->first_seen = jiffies;
@@ -678,29 +678,29 @@ next:
678 rcu_read_unlock(); 678 rcu_read_unlock();
679 } 679 }
680 680
681 hash = bat_priv->hna_local_hash; 681 hash = bat_priv->tt_local_hash;
682 682
683 spin_lock_bh(&bat_priv->hna_lhash_lock); 683 spin_lock_bh(&bat_priv->tt_lhash_lock);
684 for (i = 0; i < hash->size; i++) { 684 for (i = 0; i < hash->size; i++) {
685 head = &hash->table[i]; 685 head = &hash->table[i];
686 686
687 hlist_for_each_entry(hna_local_entry, node, head, hash_entry) { 687 hlist_for_each_entry(tt_local_entry, node, head, hash_entry) {
688 entry = (struct vis_info_entry *) 688 entry = (struct vis_info_entry *)
689 skb_put(info->skb_packet, 689 skb_put(info->skb_packet,
690 sizeof(*entry)); 690 sizeof(*entry));
691 memset(entry->src, 0, ETH_ALEN); 691 memset(entry->src, 0, ETH_ALEN);
692 memcpy(entry->dest, hna_local_entry->addr, ETH_ALEN); 692 memcpy(entry->dest, tt_local_entry->addr, ETH_ALEN);
693 entry->quality = 0; /* 0 means HNA */ 693 entry->quality = 0; /* 0 means TT */
694 packet->entries++; 694 packet->entries++;
695 695
696 if (vis_packet_full(info)) { 696 if (vis_packet_full(info)) {
697 spin_unlock_bh(&bat_priv->hna_lhash_lock); 697 spin_unlock_bh(&bat_priv->tt_lhash_lock);
698 return 0; 698 return 0;
699 } 699 }
700 } 700 }
701 } 701 }
702 702
703 spin_unlock_bh(&bat_priv->hna_lhash_lock); 703 spin_unlock_bh(&bat_priv->tt_lhash_lock);
704 return 0; 704 return 0;
705 705
706unlock: 706unlock: