aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/originator.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/batman-adv/originator.c')
-rw-r--r--net/batman-adv/originator.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index 84ef9ae6c770..0b9133022d2d 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -73,7 +73,7 @@ void neigh_node_free_ref(struct neigh_node *neigh_node)
73struct neigh_node *create_neighbor(struct orig_node *orig_node, 73struct neigh_node *create_neighbor(struct orig_node *orig_node,
74 struct orig_node *orig_neigh_node, 74 struct orig_node *orig_neigh_node,
75 uint8_t *neigh, 75 uint8_t *neigh,
76 struct batman_if *if_incoming) 76 struct hard_iface *if_incoming)
77{ 77{
78 struct bat_priv *bat_priv = netdev_priv(if_incoming->soft_iface); 78 struct bat_priv *bat_priv = netdev_priv(if_incoming->soft_iface);
79 struct neigh_node *neigh_node; 79 struct neigh_node *neigh_node;
@@ -487,9 +487,9 @@ static int orig_node_add_if(struct orig_node *orig_node, int max_if_num)
487 return 0; 487 return 0;
488} 488}
489 489
490int orig_hash_add_if(struct batman_if *batman_if, int max_if_num) 490int orig_hash_add_if(struct hard_iface *hard_iface, int max_if_num)
491{ 491{
492 struct bat_priv *bat_priv = netdev_priv(batman_if->soft_iface); 492 struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
493 struct hashtable_t *hash = bat_priv->orig_hash; 493 struct hashtable_t *hash = bat_priv->orig_hash;
494 struct hlist_node *node; 494 struct hlist_node *node;
495 struct hlist_head *head; 495 struct hlist_head *head;
@@ -572,13 +572,13 @@ free_own_sum:
572 return 0; 572 return 0;
573} 573}
574 574
575int orig_hash_del_if(struct batman_if *batman_if, int max_if_num) 575int orig_hash_del_if(struct hard_iface *hard_iface, int max_if_num)
576{ 576{
577 struct bat_priv *bat_priv = netdev_priv(batman_if->soft_iface); 577 struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
578 struct hashtable_t *hash = bat_priv->orig_hash; 578 struct hashtable_t *hash = bat_priv->orig_hash;
579 struct hlist_node *node; 579 struct hlist_node *node;
580 struct hlist_head *head; 580 struct hlist_head *head;
581 struct batman_if *batman_if_tmp; 581 struct hard_iface *hard_iface_tmp;
582 struct orig_node *orig_node; 582 struct orig_node *orig_node;
583 int i, ret; 583 int i, ret;
584 584
@@ -591,7 +591,7 @@ int orig_hash_del_if(struct batman_if *batman_if, int max_if_num)
591 hlist_for_each_entry_rcu(orig_node, node, head, hash_entry) { 591 hlist_for_each_entry_rcu(orig_node, node, head, hash_entry) {
592 spin_lock_bh(&orig_node->ogm_cnt_lock); 592 spin_lock_bh(&orig_node->ogm_cnt_lock);
593 ret = orig_node_del_if(orig_node, max_if_num, 593 ret = orig_node_del_if(orig_node, max_if_num,
594 batman_if->if_num); 594 hard_iface->if_num);
595 spin_unlock_bh(&orig_node->ogm_cnt_lock); 595 spin_unlock_bh(&orig_node->ogm_cnt_lock);
596 596
597 if (ret == -1) 597 if (ret == -1)
@@ -602,22 +602,22 @@ int orig_hash_del_if(struct batman_if *batman_if, int max_if_num)
602 602
603 /* renumber remaining batman interfaces _inside_ of orig_hash_lock */ 603 /* renumber remaining batman interfaces _inside_ of orig_hash_lock */
604 rcu_read_lock(); 604 rcu_read_lock();
605 list_for_each_entry_rcu(batman_if_tmp, &hardif_list, list) { 605 list_for_each_entry_rcu(hard_iface_tmp, &hardif_list, list) {
606 if (batman_if_tmp->if_status == IF_NOT_IN_USE) 606 if (hard_iface_tmp->if_status == IF_NOT_IN_USE)
607 continue; 607 continue;
608 608
609 if (batman_if == batman_if_tmp) 609 if (hard_iface == hard_iface_tmp)
610 continue; 610 continue;
611 611
612 if (batman_if->soft_iface != batman_if_tmp->soft_iface) 612 if (hard_iface->soft_iface != hard_iface_tmp->soft_iface)
613 continue; 613 continue;
614 614
615 if (batman_if_tmp->if_num > batman_if->if_num) 615 if (hard_iface_tmp->if_num > hard_iface->if_num)
616 batman_if_tmp->if_num--; 616 hard_iface_tmp->if_num--;
617 } 617 }
618 rcu_read_unlock(); 618 rcu_read_unlock();
619 619
620 batman_if->if_num = -1; 620 hard_iface->if_num = -1;
621 return 0; 621 return 0;
622 622
623err: 623err: