aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/routing.c
diff options
context:
space:
mode:
authorMarek Lindner <lindner_marek@yahoo.de>2011-02-18 07:33:20 -0500
committerMarek Lindner <lindner_marek@yahoo.de>2011-03-05 06:52:06 -0500
commite6c10f433af9c98994c94a10ae862c152fcfb2a9 (patch)
tree56b4a82b83da44f7c3657a283c92c5cc8e248b9f /net/batman-adv/routing.c
parent4389e47af856635eb17d03b2572a50576c12db24 (diff)
batman-adv: rename batman_if struct to hard_iface
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/routing.c')
-rw-r--r--net/batman-adv/routing.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index 21e93b39b2a4..42cb6e2e44f5 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -35,9 +35,9 @@
35#include "gateway_client.h" 35#include "gateway_client.h"
36#include "unicast.h" 36#include "unicast.h"
37 37
38void slide_own_bcast_window(struct batman_if *batman_if) 38void slide_own_bcast_window(struct hard_iface *hard_iface)
39{ 39{
40 struct bat_priv *bat_priv = netdev_priv(batman_if->soft_iface); 40 struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
41 struct hashtable_t *hash = bat_priv->orig_hash; 41 struct hashtable_t *hash = bat_priv->orig_hash;
42 struct hlist_node *node; 42 struct hlist_node *node;
43 struct hlist_head *head; 43 struct hlist_head *head;
@@ -52,11 +52,11 @@ void slide_own_bcast_window(struct batman_if *batman_if)
52 rcu_read_lock(); 52 rcu_read_lock();
53 hlist_for_each_entry_rcu(orig_node, node, head, hash_entry) { 53 hlist_for_each_entry_rcu(orig_node, node, head, hash_entry) {
54 spin_lock_bh(&orig_node->ogm_cnt_lock); 54 spin_lock_bh(&orig_node->ogm_cnt_lock);
55 word_index = batman_if->if_num * NUM_WORDS; 55 word_index = hard_iface->if_num * NUM_WORDS;
56 word = &(orig_node->bcast_own[word_index]); 56 word = &(orig_node->bcast_own[word_index]);
57 57
58 bit_get_packet(bat_priv, word, 1, 0); 58 bit_get_packet(bat_priv, word, 1, 0);
59 orig_node->bcast_own_sum[batman_if->if_num] = 59 orig_node->bcast_own_sum[hard_iface->if_num] =
60 bit_packet_count(word); 60 bit_packet_count(word);
61 spin_unlock_bh(&orig_node->ogm_cnt_lock); 61 spin_unlock_bh(&orig_node->ogm_cnt_lock);
62 } 62 }
@@ -143,7 +143,7 @@ void update_routes(struct bat_priv *bat_priv, struct orig_node *orig_node,
143static int is_bidirectional_neigh(struct orig_node *orig_node, 143static int is_bidirectional_neigh(struct orig_node *orig_node,
144 struct orig_node *orig_neigh_node, 144 struct orig_node *orig_neigh_node,
145 struct batman_packet *batman_packet, 145 struct batman_packet *batman_packet,
146 struct batman_if *if_incoming) 146 struct hard_iface *if_incoming)
147{ 147{
148 struct bat_priv *bat_priv = netdev_priv(if_incoming->soft_iface); 148 struct bat_priv *bat_priv = netdev_priv(if_incoming->soft_iface);
149 struct neigh_node *neigh_node = NULL, *tmp_neigh_node; 149 struct neigh_node *neigh_node = NULL, *tmp_neigh_node;
@@ -368,7 +368,7 @@ static void update_orig(struct bat_priv *bat_priv,
368 struct orig_node *orig_node, 368 struct orig_node *orig_node,
369 struct ethhdr *ethhdr, 369 struct ethhdr *ethhdr,
370 struct batman_packet *batman_packet, 370 struct batman_packet *batman_packet,
371 struct batman_if *if_incoming, 371 struct hard_iface *if_incoming,
372 unsigned char *hna_buff, int hna_buff_len, 372 unsigned char *hna_buff, int hna_buff_len,
373 char is_duplicate) 373 char is_duplicate)
374{ 374{
@@ -533,7 +533,7 @@ static int window_protected(struct bat_priv *bat_priv,
533 */ 533 */
534static char count_real_packets(struct ethhdr *ethhdr, 534static char count_real_packets(struct ethhdr *ethhdr,
535 struct batman_packet *batman_packet, 535 struct batman_packet *batman_packet,
536 struct batman_if *if_incoming) 536 struct hard_iface *if_incoming)
537{ 537{
538 struct bat_priv *bat_priv = netdev_priv(if_incoming->soft_iface); 538 struct bat_priv *bat_priv = netdev_priv(if_incoming->soft_iface);
539 struct orig_node *orig_node; 539 struct orig_node *orig_node;
@@ -598,10 +598,10 @@ out:
598void receive_bat_packet(struct ethhdr *ethhdr, 598void receive_bat_packet(struct ethhdr *ethhdr,
599 struct batman_packet *batman_packet, 599 struct batman_packet *batman_packet,
600 unsigned char *hna_buff, int hna_buff_len, 600 unsigned char *hna_buff, int hna_buff_len,
601 struct batman_if *if_incoming) 601 struct hard_iface *if_incoming)
602{ 602{
603 struct bat_priv *bat_priv = netdev_priv(if_incoming->soft_iface); 603 struct bat_priv *bat_priv = netdev_priv(if_incoming->soft_iface);
604 struct batman_if *batman_if; 604 struct hard_iface *hard_iface;
605 struct orig_node *orig_neigh_node, *orig_node; 605 struct orig_node *orig_neigh_node, *orig_node;
606 char has_directlink_flag; 606 char has_directlink_flag;
607 char is_my_addr = 0, is_my_orig = 0, is_my_oldorig = 0; 607 char is_my_addr = 0, is_my_orig = 0, is_my_oldorig = 0;
@@ -643,23 +643,23 @@ void receive_bat_packet(struct ethhdr *ethhdr,
643 has_directlink_flag); 643 has_directlink_flag);
644 644
645 rcu_read_lock(); 645 rcu_read_lock();
646 list_for_each_entry_rcu(batman_if, &hardif_list, list) { 646 list_for_each_entry_rcu(hard_iface, &hardif_list, list) {
647 if (batman_if->if_status != IF_ACTIVE) 647 if (hard_iface->if_status != IF_ACTIVE)
648 continue; 648 continue;
649 649
650 if (batman_if->soft_iface != if_incoming->soft_iface) 650 if (hard_iface->soft_iface != if_incoming->soft_iface)
651 continue; 651 continue;
652 652
653 if (compare_eth(ethhdr->h_source, 653 if (compare_eth(ethhdr->h_source,
654 batman_if->net_dev->dev_addr)) 654 hard_iface->net_dev->dev_addr))
655 is_my_addr = 1; 655 is_my_addr = 1;
656 656
657 if (compare_eth(batman_packet->orig, 657 if (compare_eth(batman_packet->orig,
658 batman_if->net_dev->dev_addr)) 658 hard_iface->net_dev->dev_addr))
659 is_my_orig = 1; 659 is_my_orig = 1;
660 660
661 if (compare_eth(batman_packet->prev_sender, 661 if (compare_eth(batman_packet->prev_sender,
662 batman_if->net_dev->dev_addr)) 662 hard_iface->net_dev->dev_addr))
663 is_my_oldorig = 1; 663 is_my_oldorig = 1;
664 664
665 if (compare_eth(ethhdr->h_source, broadcast_addr)) 665 if (compare_eth(ethhdr->h_source, broadcast_addr))
@@ -828,7 +828,7 @@ out:
828 orig_node_free_ref(orig_node); 828 orig_node_free_ref(orig_node);
829} 829}
830 830
831int recv_bat_packet(struct sk_buff *skb, struct batman_if *batman_if) 831int recv_bat_packet(struct sk_buff *skb, struct hard_iface *hard_iface)
832{ 832{
833 struct ethhdr *ethhdr; 833 struct ethhdr *ethhdr;
834 834
@@ -859,7 +859,7 @@ int recv_bat_packet(struct sk_buff *skb, struct batman_if *batman_if)
859 receive_aggr_bat_packet(ethhdr, 859 receive_aggr_bat_packet(ethhdr,
860 skb->data, 860 skb->data,
861 skb_headlen(skb), 861 skb_headlen(skb),
862 batman_if); 862 hard_iface);
863 863
864 kfree_skb(skb); 864 kfree_skb(skb);
865 return NET_RX_SUCCESS; 865 return NET_RX_SUCCESS;
@@ -997,7 +997,7 @@ out:
997} 997}
998 998
999 999
1000int recv_icmp_packet(struct sk_buff *skb, struct batman_if *recv_if) 1000int recv_icmp_packet(struct sk_buff *skb, struct hard_iface *recv_if)
1001{ 1001{
1002 struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface); 1002 struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface);
1003 struct icmp_packet_rr *icmp_packet; 1003 struct icmp_packet_rr *icmp_packet;
@@ -1097,7 +1097,7 @@ out:
1097 * refcount.*/ 1097 * refcount.*/
1098struct neigh_node *find_router(struct bat_priv *bat_priv, 1098struct neigh_node *find_router(struct bat_priv *bat_priv,
1099 struct orig_node *orig_node, 1099 struct orig_node *orig_node,
1100 struct batman_if *recv_if) 1100 struct hard_iface *recv_if)
1101{ 1101{
1102 struct orig_node *primary_orig_node; 1102 struct orig_node *primary_orig_node;
1103 struct orig_node *router_orig; 1103 struct orig_node *router_orig;
@@ -1263,7 +1263,7 @@ static int check_unicast_packet(struct sk_buff *skb, int hdr_size)
1263 return 0; 1263 return 0;
1264} 1264}
1265 1265
1266int route_unicast_packet(struct sk_buff *skb, struct batman_if *recv_if, 1266int route_unicast_packet(struct sk_buff *skb, struct hard_iface *recv_if,
1267 int hdr_size) 1267 int hdr_size)
1268{ 1268{
1269 struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface); 1269 struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface);
@@ -1349,7 +1349,7 @@ out:
1349 return ret; 1349 return ret;
1350} 1350}
1351 1351
1352int recv_unicast_packet(struct sk_buff *skb, struct batman_if *recv_if) 1352int recv_unicast_packet(struct sk_buff *skb, struct hard_iface *recv_if)
1353{ 1353{
1354 struct unicast_packet *unicast_packet; 1354 struct unicast_packet *unicast_packet;
1355 int hdr_size = sizeof(struct unicast_packet); 1355 int hdr_size = sizeof(struct unicast_packet);
@@ -1368,7 +1368,7 @@ int recv_unicast_packet(struct sk_buff *skb, struct batman_if *recv_if)
1368 return route_unicast_packet(skb, recv_if, hdr_size); 1368 return route_unicast_packet(skb, recv_if, hdr_size);
1369} 1369}
1370 1370
1371int recv_ucast_frag_packet(struct sk_buff *skb, struct batman_if *recv_if) 1371int recv_ucast_frag_packet(struct sk_buff *skb, struct hard_iface *recv_if)
1372{ 1372{
1373 struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface); 1373 struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface);
1374 struct unicast_frag_packet *unicast_packet; 1374 struct unicast_frag_packet *unicast_packet;
@@ -1402,7 +1402,7 @@ int recv_ucast_frag_packet(struct sk_buff *skb, struct batman_if *recv_if)
1402} 1402}
1403 1403
1404 1404
1405int recv_bcast_packet(struct sk_buff *skb, struct batman_if *recv_if) 1405int recv_bcast_packet(struct sk_buff *skb, struct hard_iface *recv_if)
1406{ 1406{
1407 struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface); 1407 struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface);
1408 struct orig_node *orig_node = NULL; 1408 struct orig_node *orig_node = NULL;
@@ -1487,7 +1487,7 @@ out:
1487 return ret; 1487 return ret;
1488} 1488}
1489 1489
1490int recv_vis_packet(struct sk_buff *skb, struct batman_if *recv_if) 1490int recv_vis_packet(struct sk_buff *skb, struct hard_iface *recv_if)
1491{ 1491{
1492 struct vis_packet *vis_packet; 1492 struct vis_packet *vis_packet;
1493 struct ethhdr *ethhdr; 1493 struct ethhdr *ethhdr;