diff options
Diffstat (limited to 'net/batman-adv/bat_iv_ogm.c')
-rw-r--r-- | net/batman-adv/bat_iv_ogm.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index 72fe1bbf7721..a0b253ecadaf 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c | |||
@@ -487,7 +487,6 @@ static void batadv_iv_ogm_queue_add(struct batadv_priv *bat_priv, | |||
487 | */ | 487 | */ |
488 | struct batadv_forw_packet *forw_packet_aggr = NULL; | 488 | struct batadv_forw_packet *forw_packet_aggr = NULL; |
489 | struct batadv_forw_packet *forw_packet_pos = NULL; | 489 | struct batadv_forw_packet *forw_packet_pos = NULL; |
490 | struct hlist_node *tmp_node; | ||
491 | struct batadv_ogm_packet *batadv_ogm_packet; | 490 | struct batadv_ogm_packet *batadv_ogm_packet; |
492 | bool direct_link; | 491 | bool direct_link; |
493 | unsigned long max_aggregation_jiffies; | 492 | unsigned long max_aggregation_jiffies; |
@@ -500,7 +499,7 @@ static void batadv_iv_ogm_queue_add(struct batadv_priv *bat_priv, | |||
500 | spin_lock_bh(&bat_priv->forw_bat_list_lock); | 499 | spin_lock_bh(&bat_priv->forw_bat_list_lock); |
501 | /* own packets are not to be aggregated */ | 500 | /* own packets are not to be aggregated */ |
502 | if ((atomic_read(&bat_priv->aggregated_ogms)) && (!own_packet)) { | 501 | if ((atomic_read(&bat_priv->aggregated_ogms)) && (!own_packet)) { |
503 | hlist_for_each_entry(forw_packet_pos, tmp_node, | 502 | hlist_for_each_entry(forw_packet_pos, |
504 | &bat_priv->forw_bat_list, list) { | 503 | &bat_priv->forw_bat_list, list) { |
505 | if (batadv_iv_ogm_can_aggregate(batadv_ogm_packet, | 504 | if (batadv_iv_ogm_can_aggregate(batadv_ogm_packet, |
506 | bat_priv, packet_len, | 505 | bat_priv, packet_len, |
@@ -655,7 +654,6 @@ batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv, | |||
655 | struct batadv_neigh_node *neigh_node = NULL, *tmp_neigh_node = NULL; | 654 | struct batadv_neigh_node *neigh_node = NULL, *tmp_neigh_node = NULL; |
656 | struct batadv_neigh_node *router = NULL; | 655 | struct batadv_neigh_node *router = NULL; |
657 | struct batadv_orig_node *orig_node_tmp; | 656 | struct batadv_orig_node *orig_node_tmp; |
658 | struct hlist_node *node; | ||
659 | int if_num; | 657 | int if_num; |
660 | uint8_t sum_orig, sum_neigh; | 658 | uint8_t sum_orig, sum_neigh; |
661 | uint8_t *neigh_addr; | 659 | uint8_t *neigh_addr; |
@@ -665,7 +663,7 @@ batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv, | |||
665 | "update_originator(): Searching and updating originator entry of received packet\n"); | 663 | "update_originator(): Searching and updating originator entry of received packet\n"); |
666 | 664 | ||
667 | rcu_read_lock(); | 665 | rcu_read_lock(); |
668 | hlist_for_each_entry_rcu(tmp_neigh_node, node, | 666 | hlist_for_each_entry_rcu(tmp_neigh_node, |
669 | &orig_node->neigh_list, list) { | 667 | &orig_node->neigh_list, list) { |
670 | neigh_addr = tmp_neigh_node->addr; | 668 | neigh_addr = tmp_neigh_node->addr; |
671 | if (batadv_compare_eth(neigh_addr, ethhdr->h_source) && | 669 | if (batadv_compare_eth(neigh_addr, ethhdr->h_source) && |
@@ -801,7 +799,6 @@ static int batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node, | |||
801 | { | 799 | { |
802 | struct batadv_priv *bat_priv = netdev_priv(if_incoming->soft_iface); | 800 | struct batadv_priv *bat_priv = netdev_priv(if_incoming->soft_iface); |
803 | struct batadv_neigh_node *neigh_node = NULL, *tmp_neigh_node; | 801 | struct batadv_neigh_node *neigh_node = NULL, *tmp_neigh_node; |
804 | struct hlist_node *node; | ||
805 | uint8_t total_count; | 802 | uint8_t total_count; |
806 | uint8_t orig_eq_count, neigh_rq_count, neigh_rq_inv, tq_own; | 803 | uint8_t orig_eq_count, neigh_rq_count, neigh_rq_inv, tq_own; |
807 | unsigned int neigh_rq_inv_cube, neigh_rq_max_cube; | 804 | unsigned int neigh_rq_inv_cube, neigh_rq_max_cube; |
@@ -810,7 +807,7 @@ static int batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node, | |||
810 | 807 | ||
811 | /* find corresponding one hop neighbor */ | 808 | /* find corresponding one hop neighbor */ |
812 | rcu_read_lock(); | 809 | rcu_read_lock(); |
813 | hlist_for_each_entry_rcu(tmp_neigh_node, node, | 810 | hlist_for_each_entry_rcu(tmp_neigh_node, |
814 | &orig_neigh_node->neigh_list, list) { | 811 | &orig_neigh_node->neigh_list, list) { |
815 | if (!batadv_compare_eth(tmp_neigh_node->addr, | 812 | if (!batadv_compare_eth(tmp_neigh_node->addr, |
816 | orig_neigh_node->orig)) | 813 | orig_neigh_node->orig)) |
@@ -920,7 +917,6 @@ batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr, | |||
920 | struct batadv_priv *bat_priv = netdev_priv(if_incoming->soft_iface); | 917 | struct batadv_priv *bat_priv = netdev_priv(if_incoming->soft_iface); |
921 | struct batadv_orig_node *orig_node; | 918 | struct batadv_orig_node *orig_node; |
922 | struct batadv_neigh_node *tmp_neigh_node; | 919 | struct batadv_neigh_node *tmp_neigh_node; |
923 | struct hlist_node *node; | ||
924 | int is_duplicate = 0; | 920 | int is_duplicate = 0; |
925 | int32_t seq_diff; | 921 | int32_t seq_diff; |
926 | int need_update = 0; | 922 | int need_update = 0; |
@@ -943,7 +939,7 @@ batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr, | |||
943 | goto out; | 939 | goto out; |
944 | 940 | ||
945 | rcu_read_lock(); | 941 | rcu_read_lock(); |
946 | hlist_for_each_entry_rcu(tmp_neigh_node, node, | 942 | hlist_for_each_entry_rcu(tmp_neigh_node, |
947 | &orig_node->neigh_list, list) { | 943 | &orig_node->neigh_list, list) { |
948 | is_duplicate |= batadv_test_bit(tmp_neigh_node->real_bits, | 944 | is_duplicate |= batadv_test_bit(tmp_neigh_node->real_bits, |
949 | orig_node->last_real_seqno, | 945 | orig_node->last_real_seqno, |