Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314546
b: refs/heads/master
c: 7d211ef
h: refs/heads/master
v: v3
  • Loading branch information
Sven Eckelmann authored and Antonio Quartulli committed Jun 20, 2012
1 parent 4f75054 commit 9b031dc
Show file tree
Hide file tree
Showing 14 changed files with 135 additions and 132 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: 9039dc7e8a42864744665bf0905f48c2724f6e3e
refs/heads/master: 7d211efc5087bc8870fa3374da88b4bf8159e79b
2 changes: 1 addition & 1 deletion trunk/net/batman-adv/bat_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ static int bat_algorithms_open(struct inode *inode, struct file *file)
static int originators_open(struct inode *inode, struct file *file)
{
struct net_device *net_dev = (struct net_device *)inode->i_private;
return single_open(file, orig_seq_print_text, net_dev);
return single_open(file, batadv_orig_seq_print_text, net_dev);
}

static int gateways_open(struct inode *inode, struct file *file)
Expand Down
43 changes: 22 additions & 21 deletions trunk/net/batman-adv/bat_iv_ogm.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ static void bat_iv_ogm_orig_update(struct bat_priv *bat_priv,
(tmp_neigh_node->if_incoming == if_incoming) &&
atomic_inc_not_zero(&tmp_neigh_node->refcount)) {
if (neigh_node)
neigh_node_free_ref(neigh_node);
batadv_neigh_node_free_ref(neigh_node);
neigh_node = tmp_neigh_node;
continue;
}
Expand All @@ -652,15 +652,15 @@ static void bat_iv_ogm_orig_update(struct bat_priv *bat_priv,
if (!neigh_node) {
struct orig_node *orig_tmp;

orig_tmp = get_orig_node(bat_priv, ethhdr->h_source);
orig_tmp = batadv_get_orig_node(bat_priv, ethhdr->h_source);
if (!orig_tmp)
goto unlock;

neigh_node = bat_iv_ogm_neigh_new(if_incoming, ethhdr->h_source,
orig_node, orig_tmp,
batman_ogm_packet->seqno);

orig_node_free_ref(orig_tmp);
batadv_orig_node_free_ref(orig_tmp);
if (!neigh_node)
goto unlock;
} else
Expand Down Expand Up @@ -688,7 +688,7 @@ static void bat_iv_ogm_orig_update(struct bat_priv *bat_priv,

/* if this neighbor already is our next hop there is nothing
* to change */
router = orig_node_get_router(orig_node);
router = batadv_orig_node_get_router(orig_node);
if (router == neigh_node)
goto update_tt;

Expand Down Expand Up @@ -746,9 +746,9 @@ static void bat_iv_ogm_orig_update(struct bat_priv *bat_priv,
rcu_read_unlock();
out:
if (neigh_node)
neigh_node_free_ref(neigh_node);
batadv_neigh_node_free_ref(neigh_node);
if (router)
neigh_node_free_ref(router);
batadv_neigh_node_free_ref(router);
}

static int bat_iv_ogm_calc_tq(struct orig_node *orig_node,
Expand Down Expand Up @@ -848,7 +848,7 @@ static int bat_iv_ogm_calc_tq(struct orig_node *orig_node,

out:
if (neigh_node)
neigh_node_free_ref(neigh_node);
batadv_neigh_node_free_ref(neigh_node);
return ret;
}

Expand All @@ -875,7 +875,7 @@ static int bat_iv_ogm_update_seqnos(const struct ethhdr *ethhdr,
int set_mark, ret = -1;
uint32_t seqno = ntohl(batman_ogm_packet->seqno);

orig_node = get_orig_node(bat_priv, batman_ogm_packet->orig);
orig_node = batadv_get_orig_node(bat_priv, batman_ogm_packet->orig);
if (!orig_node)
return 0;

Expand Down Expand Up @@ -924,7 +924,7 @@ static int bat_iv_ogm_update_seqnos(const struct ethhdr *ethhdr,

out:
spin_unlock_bh(&orig_node->ogm_cnt_lock);
orig_node_free_ref(orig_node);
batadv_orig_node_free_ref(orig_node);
return ret;
}

Expand Down Expand Up @@ -1029,7 +1029,8 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr,
unsigned long *word;
int offset;

orig_neigh_node = get_orig_node(bat_priv, ethhdr->h_source);
orig_neigh_node = batadv_get_orig_node(bat_priv,
ethhdr->h_source);
if (!orig_neigh_node)
return;

Expand All @@ -1053,7 +1054,7 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr,

bat_dbg(DBG_BATMAN, bat_priv,
"Drop packet: originator packet from myself (via neighbor)\n");
orig_node_free_ref(orig_neigh_node);
batadv_orig_node_free_ref(orig_neigh_node);
return;
}

Expand All @@ -1071,7 +1072,7 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr,
return;
}

orig_node = get_orig_node(bat_priv, batman_ogm_packet->orig);
orig_node = batadv_get_orig_node(bat_priv, batman_ogm_packet->orig);
if (!orig_node)
return;

Expand All @@ -1091,9 +1092,9 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr,
goto out;
}

router = orig_node_get_router(orig_node);
router = batadv_orig_node_get_router(orig_node);
if (router)
router_router = orig_node_get_router(router->orig_node);
router_router = batadv_orig_node_get_router(router->orig_node);

if ((router && router->tq_avg != 0) &&
(compare_eth(router->addr, ethhdr->h_source)))
Expand All @@ -1115,11 +1116,11 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr,
* originator mac */
orig_neigh_node = (is_single_hop_neigh ?
orig_node :
get_orig_node(bat_priv, ethhdr->h_source));
batadv_get_orig_node(bat_priv, ethhdr->h_source));
if (!orig_neigh_node)
goto out;

orig_neigh_router = orig_node_get_router(orig_neigh_node);
orig_neigh_router = batadv_orig_node_get_router(orig_neigh_node);

/* drop packet if sender is not a direct neighbor and if we
* don't route towards it */
Expand Down Expand Up @@ -1178,16 +1179,16 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr,

out_neigh:
if ((orig_neigh_node) && (!is_single_hop_neigh))
orig_node_free_ref(orig_neigh_node);
batadv_orig_node_free_ref(orig_neigh_node);
out:
if (router)
neigh_node_free_ref(router);
batadv_neigh_node_free_ref(router);
if (router_router)
neigh_node_free_ref(router_router);
batadv_neigh_node_free_ref(router_router);
if (orig_neigh_router)
neigh_node_free_ref(orig_neigh_router);
batadv_neigh_node_free_ref(orig_neigh_router);

orig_node_free_ref(orig_node);
batadv_orig_node_free_ref(orig_node);
}

static int bat_iv_ogm_receive(struct sk_buff *skb,
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/batman-adv/bridge_loop_avoidance.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ static struct backbone_gw *bla_get_backbone_gw(struct bat_priv *bat_priv,
if (orig_node) {
tt_global_del_orig(bat_priv, orig_node,
"became a backbone gateway");
orig_node_free_ref(orig_node);
batadv_orig_node_free_ref(orig_node);
}
return entry;
}
Expand Down Expand Up @@ -804,7 +804,7 @@ static int check_claim_group(struct bat_priv *bat_priv,
bla_dst_own->group = bla_dst->group;
}

orig_node_free_ref(orig_node);
batadv_orig_node_free_ref(orig_node);

return 2;
}
Expand Down
28 changes: 14 additions & 14 deletions trunk/net/batman-adv/gateway_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ static struct gw_node *gw_get_best_gw_node(struct bat_priv *bat_priv)
continue;

orig_node = gw_node->orig_node;
router = orig_node_get_router(orig_node);
router = batadv_orig_node_get_router(orig_node);
if (!router)
continue;

Expand Down Expand Up @@ -177,7 +177,7 @@ static struct gw_node *gw_get_best_gw_node(struct bat_priv *bat_priv)
gw_node_free_ref(gw_node);

next:
neigh_node_free_ref(router);
batadv_neigh_node_free_ref(router);
}
rcu_read_unlock();

Expand Down Expand Up @@ -212,7 +212,7 @@ void batadv_gw_election(struct bat_priv *bat_priv)
if (next_gw) {
sprintf(gw_addr, "%pM", next_gw->orig_node->orig);

router = orig_node_get_router(next_gw->orig_node);
router = batadv_orig_node_get_router(next_gw->orig_node);
if (!router) {
batadv_gw_deselect(bat_priv);
goto out;
Expand Down Expand Up @@ -245,7 +245,7 @@ void batadv_gw_election(struct bat_priv *bat_priv)
if (next_gw)
gw_node_free_ref(next_gw);
if (router)
neigh_node_free_ref(router);
batadv_neigh_node_free_ref(router);
}

void batadv_gw_check_election(struct bat_priv *bat_priv,
Expand All @@ -259,15 +259,15 @@ void batadv_gw_check_election(struct bat_priv *bat_priv,
if (!curr_gw_orig)
goto deselect;

router_gw = orig_node_get_router(curr_gw_orig);
router_gw = batadv_orig_node_get_router(curr_gw_orig);
if (!router_gw)
goto deselect;

/* this node already is the gateway */
if (curr_gw_orig == orig_node)
goto out;

router_orig = orig_node_get_router(orig_node);
router_orig = batadv_orig_node_get_router(orig_node);
if (!router_orig)
goto out;

Expand All @@ -294,11 +294,11 @@ void batadv_gw_check_election(struct bat_priv *bat_priv,
batadv_gw_deselect(bat_priv);
out:
if (curr_gw_orig)
orig_node_free_ref(curr_gw_orig);
batadv_orig_node_free_ref(curr_gw_orig);
if (router_gw)
neigh_node_free_ref(router_gw);
batadv_neigh_node_free_ref(router_gw);
if (router_orig)
neigh_node_free_ref(router_orig);
batadv_neigh_node_free_ref(router_orig);

return;
}
Expand Down Expand Up @@ -438,7 +438,7 @@ static int _write_buffer_text(struct bat_priv *bat_priv, struct seq_file *seq,

batadv_gw_bandwidth_to_kbit(gw_node->orig_node->gw_flags, &down, &up);

router = orig_node_get_router(gw_node->orig_node);
router = batadv_orig_node_get_router(gw_node->orig_node);
if (!router)
goto out;

Expand All @@ -455,7 +455,7 @@ static int _write_buffer_text(struct bat_priv *bat_priv, struct seq_file *seq,
(up > 2048 ? up / 1024 : up),
(up > 2048 ? "MBit" : "KBit"));

neigh_node_free_ref(router);
batadv_neigh_node_free_ref(router);
if (curr_gw)
gw_node_free_ref(curr_gw);
out:
Expand Down Expand Up @@ -702,12 +702,12 @@ bool batadv_gw_out_of_range(struct bat_priv *bat_priv,

out:
if (orig_dst_node)
orig_node_free_ref(orig_dst_node);
batadv_orig_node_free_ref(orig_dst_node);
if (curr_gw)
gw_node_free_ref(curr_gw);
if (neigh_old)
neigh_node_free_ref(neigh_old);
batadv_neigh_node_free_ref(neigh_old);
if (neigh_curr)
neigh_node_free_ref(neigh_curr);
batadv_neigh_node_free_ref(neigh_curr);
return out_of_range;
}
6 changes: 3 additions & 3 deletions trunk/net/batman-adv/hard-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ int batadv_hardif_enable_interface(struct hard_iface *hard_iface,
hard_iface->if_num = bat_priv->num_ifaces;
bat_priv->num_ifaces++;
hard_iface->if_status = IF_INACTIVE;
orig_hash_add_if(hard_iface, bat_priv->num_ifaces);
batadv_orig_hash_add_if(hard_iface, bat_priv->num_ifaces);

hard_iface->batman_adv_ptype.type = __constant_htons(ETH_P_BATMAN);
hard_iface->batman_adv_ptype.func = batman_skb_recv;
Expand Down Expand Up @@ -373,7 +373,7 @@ void batadv_hardif_disable_interface(struct hard_iface *hard_iface)
dev_remove_pack(&hard_iface->batman_adv_ptype);

bat_priv->num_ifaces--;
orig_hash_del_if(hard_iface, bat_priv->num_ifaces);
batadv_orig_hash_del_if(hard_iface, bat_priv->num_ifaces);

primary_if = primary_if_get_selected(bat_priv);
if (hard_iface == primary_if) {
Expand All @@ -390,7 +390,7 @@ void batadv_hardif_disable_interface(struct hard_iface *hard_iface)
hard_iface->if_status = IF_NOT_IN_USE;

/* delete all references to this hard_iface */
purge_orig_ref(bat_priv);
batadv_purge_orig_ref(bat_priv);
purge_outstanding_packets(bat_priv, hard_iface);
dev_put(hard_iface->soft_iface);

Expand Down
6 changes: 3 additions & 3 deletions trunk/net/batman-adv/icmp_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff,
if (!orig_node)
goto dst_unreach;

neigh_node = orig_node_get_router(orig_node);
neigh_node = batadv_orig_node_get_router(orig_node);
if (!neigh_node)
goto dst_unreach;

Expand Down Expand Up @@ -248,9 +248,9 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff,
if (primary_if)
hardif_free_ref(primary_if);
if (neigh_node)
neigh_node_free_ref(neigh_node);
batadv_neigh_node_free_ref(neigh_node);
if (orig_node)
orig_node_free_ref(orig_node);
batadv_orig_node_free_ref(orig_node);
return len;
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/net/batman-adv/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ int mesh_init(struct net_device *soft_iface)
INIT_LIST_HEAD(&bat_priv->tt_req_list);
INIT_LIST_HEAD(&bat_priv->tt_roam_list);

ret = originator_init(bat_priv);
ret = batadv_originator_init(bat_priv);
if (ret < 0)
goto err;

Expand Down Expand Up @@ -150,7 +150,7 @@ void mesh_free(struct net_device *soft_iface)
vis_quit(bat_priv);

batadv_gw_node_purge(bat_priv);
originator_free(bat_priv);
batadv_originator_free(bat_priv);

tt_free(bat_priv);

Expand Down
Loading

0 comments on commit 9b031dc

Please sign in to comment.