diff options
author | Antonio Quartulli <antonio@open-mesh.com> | 2013-04-17 17:44:43 +0200 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2013-05-29 02:44:54 +0200 |
commit | d98966173213704873864c4e5057d823996ae95d (patch) | |
tree | edd4383ff16238b0a19d2df4bb98ae9e7d3ab2bd /net/batman-adv/routing.c | |
parent | 24a5deeb8a198f0a26ae04485d9976c5e414f723 (diff) | |
download | linux-d98966173213704873864c4e5057d823996ae95d.tar.bz2 |
batman-adv: move batadv_slide_own_bcast_window to bat_iv_ogm.c
batadv_slide_own_bcast_window() is used only in bat_iv_ogm.c
and it is currently touching only batman_iv specific
attributes.
Move it into bat_iv_ogm.c and make it static.
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/routing.c')
-rw-r--r-- | net/batman-adv/routing.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index beeab2e8cd66..fad08469767d 100644 --- a/net/batman-adv/routing.c +++ b/net/batman-adv/routing.c @@ -34,35 +34,6 @@ static int batadv_route_unicast_packet(struct sk_buff *skb, struct batadv_hard_iface *recv_if); -void batadv_slide_own_bcast_window(struct batadv_hard_iface *hard_iface) -{ - struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); - struct batadv_hashtable *hash = bat_priv->orig_hash; - struct hlist_head *head; - struct batadv_orig_node *orig_node; - unsigned long *word; - uint32_t i; - size_t word_index; - uint8_t *w; - - for (i = 0; i < hash->size; i++) { - head = &hash->table[i]; - - rcu_read_lock(); - hlist_for_each_entry_rcu(orig_node, head, hash_entry) { - spin_lock_bh(&orig_node->ogm_cnt_lock); - word_index = hard_iface->if_num * BATADV_NUM_WORDS; - word = &(orig_node->bcast_own[word_index]); - - batadv_bit_get_packet(bat_priv, word, 1, 0); - w = &orig_node->bcast_own_sum[hard_iface->if_num]; - *w = bitmap_weight(word, BATADV_TQ_LOCAL_WINDOW_SIZE); - spin_unlock_bh(&orig_node->ogm_cnt_lock); - } - rcu_read_unlock(); - } -} - static void _batadv_update_route(struct batadv_priv *bat_priv, struct batadv_orig_node *orig_node, struct batadv_neigh_node *neigh_node) |