batman-adv: Prefix bitarray static inline functions with batadv_
[deliverable/linux.git] / net / batman-adv / bat_iv_ogm.c
index 94859d45ed6efedad97e0ef37c9e10223b2de29b..ad641e8d3c0f0654a144db73e84557b22c784d54 100644 (file)
@@ -901,9 +901,9 @@ static int bat_iv_ogm_update_seqnos(const struct ethhdr *ethhdr,
        hlist_for_each_entry_rcu(tmp_neigh_node, node,
                                 &orig_node->neigh_list, list) {
 
-               is_duplicate |= bat_test_bit(tmp_neigh_node->real_bits,
-                                            orig_node->last_real_seqno,
-                                            seqno);
+               is_duplicate |= batadv_test_bit(tmp_neigh_node->real_bits,
+                                               orig_node->last_real_seqno,
+                                               seqno);
 
                if (compare_eth(tmp_neigh_node->addr, ethhdr->h_source) &&
                    (tmp_neigh_node->if_incoming == if_incoming))
@@ -1037,6 +1037,7 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr,
        if (is_my_orig) {
                unsigned long *word;
                int offset;
+               int32_t bit_pos;
 
                orig_neigh_node = batadv_get_orig_node(bat_priv,
                                                       ethhdr->h_source);
@@ -1054,9 +1055,9 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr,
 
                        spin_lock_bh(&orig_neigh_node->ogm_cnt_lock);
                        word = &(orig_neigh_node->bcast_own[offset]);
-                       bat_set_bit(word,
-                                   if_incoming_seqno -
-                                       ntohl(batman_ogm_packet->seqno) - 2);
+                       bit_pos = if_incoming_seqno - 2;
+                       bit_pos -= ntohl(batman_ogm_packet->seqno);
+                       batadv_set_bit(word, bit_pos);
                        orig_neigh_node->bcast_own_sum[if_incoming->if_num] =
                                bitmap_weight(word, TQ_LOCAL_WINDOW_SIZE);
                        spin_unlock_bh(&orig_neigh_node->ogm_cnt_lock);
This page took 0.031003 seconds and 5 git commands to generate.