Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314598
b: refs/heads/master
c: 03fc7f8
h: refs/heads/master
v: v3
  • Loading branch information
Sven Eckelmann authored and Antonio Quartulli committed Jun 25, 2012
1 parent fd95e23 commit 564c39c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: af4447f62927accb68d5a074fabc539ef57b2729
refs/heads/master: 03fc7f863dc53516ca9764b324f54d10c4a137f6
54 changes: 27 additions & 27 deletions trunk/net/batman-adv/originator.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@
#include "soft-interface.h"
#include "bridge_loop_avoidance.h"

static void purge_orig(struct work_struct *work);
static void batadv_purge_orig(struct work_struct *work);

static void start_purge_timer(struct bat_priv *bat_priv)
static void batadv_start_purge_timer(struct bat_priv *bat_priv)
{
INIT_DELAYED_WORK(&bat_priv->orig_work, purge_orig);
INIT_DELAYED_WORK(&bat_priv->orig_work, batadv_purge_orig);
queue_delayed_work(batadv_event_workqueue,
&bat_priv->orig_work, msecs_to_jiffies(1000));
}

/* returns 1 if they are the same originator */
static int compare_orig(const struct hlist_node *node, const void *data2)
static int batadv_compare_orig(const struct hlist_node *node, const void *data2)
{
const void *data1 = container_of(node, struct orig_node, hash_entry);

Expand All @@ -55,7 +55,7 @@ int batadv_originator_init(struct bat_priv *bat_priv)
if (!bat_priv->orig_hash)
goto err;

start_purge_timer(bat_priv);
batadv_start_purge_timer(bat_priv);
return 0;

err:
Expand Down Expand Up @@ -110,7 +110,7 @@ struct neigh_node *batadv_neigh_node_new(struct hard_iface *hard_iface,
return neigh_node;
}

static void orig_node_free_rcu(struct rcu_head *rcu)
static void batadv_orig_node_free_rcu(struct rcu_head *rcu)
{
struct hlist_node *node, *node_tmp;
struct neigh_node *neigh_node, *tmp_neigh_node;
Expand Down Expand Up @@ -149,7 +149,7 @@ static void orig_node_free_rcu(struct rcu_head *rcu)
void batadv_orig_node_free_ref(struct orig_node *orig_node)
{
if (atomic_dec_and_test(&orig_node->refcount))
call_rcu(&orig_node->rcu, orig_node_free_rcu);
call_rcu(&orig_node->rcu, batadv_orig_node_free_rcu);
}

void batadv_originator_free(struct bat_priv *bat_priv)
Expand Down Expand Up @@ -248,7 +248,7 @@ struct orig_node *batadv_get_orig_node(struct bat_priv *bat_priv,
if (!orig_node->bcast_own_sum)
goto free_bcast_own;

hash_added = batadv_hash_add(bat_priv->orig_hash, compare_orig,
hash_added = batadv_hash_add(bat_priv->orig_hash, batadv_compare_orig,
batadv_choose_orig, orig_node,
&orig_node->hash_entry);
if (hash_added != 0)
Expand All @@ -264,9 +264,9 @@ struct orig_node *batadv_get_orig_node(struct bat_priv *bat_priv,
return NULL;
}

static bool purge_orig_neighbors(struct bat_priv *bat_priv,
struct orig_node *orig_node,
struct neigh_node **best_neigh_node)
static bool batadv_purge_orig_neighbors(struct bat_priv *bat_priv,
struct orig_node *orig_node,
struct neigh_node **best_neigh_node)
{
struct hlist_node *node, *node_tmp;
struct neigh_node *neigh_node;
Expand Down Expand Up @@ -319,8 +319,8 @@ static bool purge_orig_neighbors(struct bat_priv *bat_priv,
return neigh_purged;
}

static bool purge_orig_node(struct bat_priv *bat_priv,
struct orig_node *orig_node)
static bool batadv_purge_orig_node(struct bat_priv *bat_priv,
struct orig_node *orig_node)
{
struct neigh_node *best_neigh_node;

Expand All @@ -331,16 +331,16 @@ static bool purge_orig_node(struct bat_priv *bat_priv,
jiffies_to_msecs(orig_node->last_seen));
return true;
} else {
if (purge_orig_neighbors(bat_priv, orig_node,
&best_neigh_node))
if (batadv_purge_orig_neighbors(bat_priv, orig_node,
&best_neigh_node))
batadv_update_route(bat_priv, orig_node,
best_neigh_node);
}

return false;
}

static void _purge_orig(struct bat_priv *bat_priv)
static void _batadv_purge_orig(struct bat_priv *bat_priv)
{
struct hashtable_t *hash = bat_priv->orig_hash;
struct hlist_node *node, *node_tmp;
Expand All @@ -360,7 +360,7 @@ static void _purge_orig(struct bat_priv *bat_priv)
spin_lock_bh(list_lock);
hlist_for_each_entry_safe(orig_node, node, node_tmp,
head, hash_entry) {
if (purge_orig_node(bat_priv, orig_node)) {
if (batadv_purge_orig_node(bat_priv, orig_node)) {
if (orig_node->gw_flags)
batadv_gw_node_delete(bat_priv,
orig_node);
Expand All @@ -380,20 +380,20 @@ static void _purge_orig(struct bat_priv *bat_priv)
batadv_gw_election(bat_priv);
}

static void purge_orig(struct work_struct *work)
static void batadv_purge_orig(struct work_struct *work)
{
struct delayed_work *delayed_work =
container_of(work, struct delayed_work, work);
struct bat_priv *bat_priv =
container_of(delayed_work, struct bat_priv, orig_work);

_purge_orig(bat_priv);
start_purge_timer(bat_priv);
_batadv_purge_orig(bat_priv);
batadv_start_purge_timer(bat_priv);
}

void batadv_purge_orig_ref(struct bat_priv *bat_priv)
{
_purge_orig(bat_priv);
_batadv_purge_orig(bat_priv);
}

int batadv_orig_seq_print_text(struct seq_file *seq, void *offset)
Expand Down Expand Up @@ -483,7 +483,7 @@ int batadv_orig_seq_print_text(struct seq_file *seq, void *offset)
return ret;
}

static int orig_node_add_if(struct orig_node *orig_node, int max_if_num)
static int batadv_orig_node_add_if(struct orig_node *orig_node, int max_if_num)
{
void *data_ptr;

Expand Down Expand Up @@ -528,7 +528,7 @@ int batadv_orig_hash_add_if(struct hard_iface *hard_iface, int max_if_num)
rcu_read_lock();
hlist_for_each_entry_rcu(orig_node, node, head, hash_entry) {
spin_lock_bh(&orig_node->ogm_cnt_lock);
ret = orig_node_add_if(orig_node, max_if_num);
ret = batadv_orig_node_add_if(orig_node, max_if_num);
spin_unlock_bh(&orig_node->ogm_cnt_lock);

if (ret == -ENOMEM)
Expand All @@ -544,8 +544,8 @@ int batadv_orig_hash_add_if(struct hard_iface *hard_iface, int max_if_num)
return -ENOMEM;
}

static int orig_node_del_if(struct orig_node *orig_node,
int max_if_num, int del_if_num)
static int batadv_orig_node_del_if(struct orig_node *orig_node,
int max_if_num, int del_if_num)
{
void *data_ptr = NULL;
int chunk_size;
Expand Down Expand Up @@ -612,8 +612,8 @@ int batadv_orig_hash_del_if(struct hard_iface *hard_iface, int max_if_num)
rcu_read_lock();
hlist_for_each_entry_rcu(orig_node, node, head, hash_entry) {
spin_lock_bh(&orig_node->ogm_cnt_lock);
ret = orig_node_del_if(orig_node, max_if_num,
hard_iface->if_num);
ret = batadv_orig_node_del_if(orig_node, max_if_num,
hard_iface->if_num);
spin_unlock_bh(&orig_node->ogm_cnt_lock);

if (ret == -ENOMEM)
Expand Down

0 comments on commit 564c39c

Please sign in to comment.