diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-02-04 20:34:52 +0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-04-11 16:28:58 +0400 |
commit | 0079d2cef1514422668c7beedd61bfde5aa2c146 (patch) | |
tree | 64d118360835eb1abfa9546ce3cac99c8db9ce79 /net/batman-adv/routing.c | |
parent | c1faead3335608d9c9bb58e07bbf9663d53d4b26 (diff) | |
download | linux-0079d2cef1514422668c7beedd61bfde5aa2c146.tar.xz |
batman-adv: Replace bitarray operations with bitmap
bitarray.c consists mostly of functionality that is already available as part
of the standard kernel API. batman-adv could use architecture optimized code
and reduce the binary size by switching to the standard functions.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/routing.c')
-rw-r--r-- | net/batman-adv/routing.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index 7f8e15899417..b0370e3c59e8 100644 --- a/net/batman-adv/routing.c +++ b/net/batman-adv/routing.c @@ -52,7 +52,7 @@ void slide_own_bcast_window(struct hard_iface *hard_iface) bit_get_packet(bat_priv, word, 1, 0); orig_node->bcast_own_sum[hard_iface->if_num] = - bit_packet_count(word); + bitmap_weight(word, TQ_LOCAL_WINDOW_SIZE); spin_unlock_bh(&orig_node->ogm_cnt_lock); } rcu_read_unlock(); @@ -1047,8 +1047,8 @@ int recv_bcast_packet(struct sk_buff *skb, struct hard_iface *recv_if) spin_lock_bh(&orig_node->bcast_seqno_lock); /* check whether the packet is a duplicate */ - if (get_bit_status(orig_node->bcast_bits, orig_node->last_bcast_seqno, - ntohl(bcast_packet->seqno))) + if (bat_test_bit(orig_node->bcast_bits, orig_node->last_bcast_seqno, + ntohl(bcast_packet->seqno))) goto spin_unlock; seq_diff = ntohl(bcast_packet->seqno) - orig_node->last_bcast_seqno; |