Commit 863dd7a8 authored by Antonio Quartulli's avatar Antonio Quartulli Committed by Antonio Quartulli

batman-adv: drop useless argument seqno in neighbor creation

the sequence number is not stored in struct neigh_node,
therefore there is no need to pass such value to the
neigh_node creation procedure.

At the moment the value is only used by a debug message, but
given the fact that the seqno is not related to the neighbor
object, it is better to print it elsewhere.
Signed-off-by: default avatarAntonio Quartulli <antonio@open-mesh.com>
Signed-off-by: default avatarMarek Lindner <lindner_marek@yahoo.de>
parent 93178018
...@@ -33,12 +33,11 @@ static struct batadv_neigh_node * ...@@ -33,12 +33,11 @@ static struct batadv_neigh_node *
batadv_iv_ogm_neigh_new(struct batadv_hard_iface *hard_iface, batadv_iv_ogm_neigh_new(struct batadv_hard_iface *hard_iface,
const uint8_t *neigh_addr, const uint8_t *neigh_addr,
struct batadv_orig_node *orig_node, struct batadv_orig_node *orig_node,
struct batadv_orig_node *orig_neigh, __be32 seqno) struct batadv_orig_node *orig_neigh)
{ {
struct batadv_neigh_node *neigh_node; struct batadv_neigh_node *neigh_node;
neigh_node = batadv_neigh_node_new(hard_iface, neigh_addr, neigh_node = batadv_neigh_node_new(hard_iface, neigh_addr);
ntohl(seqno));
if (!neigh_node) if (!neigh_node)
goto out; goto out;
...@@ -696,8 +695,7 @@ batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv, ...@@ -696,8 +695,7 @@ batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv,
neigh_node = batadv_iv_ogm_neigh_new(if_incoming, neigh_node = batadv_iv_ogm_neigh_new(if_incoming,
ethhdr->h_source, ethhdr->h_source,
orig_node, orig_tmp, orig_node, orig_tmp);
batadv_ogm_packet->seqno);
batadv_orig_node_free_ref(orig_tmp); batadv_orig_node_free_ref(orig_tmp);
if (!neigh_node) if (!neigh_node)
...@@ -829,8 +827,7 @@ static int batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node, ...@@ -829,8 +827,7 @@ static int batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node,
neigh_node = batadv_iv_ogm_neigh_new(if_incoming, neigh_node = batadv_iv_ogm_neigh_new(if_incoming,
orig_neigh_node->orig, orig_neigh_node->orig,
orig_neigh_node, orig_neigh_node,
orig_neigh_node, orig_neigh_node);
batadv_ogm_packet->seqno);
if (!neigh_node) if (!neigh_node)
goto out; goto out;
......
...@@ -92,7 +92,7 @@ batadv_orig_node_get_router(struct batadv_orig_node *orig_node) ...@@ -92,7 +92,7 @@ batadv_orig_node_get_router(struct batadv_orig_node *orig_node)
struct batadv_neigh_node * struct batadv_neigh_node *
batadv_neigh_node_new(struct batadv_hard_iface *hard_iface, batadv_neigh_node_new(struct batadv_hard_iface *hard_iface,
const uint8_t *neigh_addr, uint32_t seqno) const uint8_t *neigh_addr)
{ {
struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
struct batadv_neigh_node *neigh_node; struct batadv_neigh_node *neigh_node;
...@@ -110,8 +110,7 @@ batadv_neigh_node_new(struct batadv_hard_iface *hard_iface, ...@@ -110,8 +110,7 @@ batadv_neigh_node_new(struct batadv_hard_iface *hard_iface,
atomic_set(&neigh_node->refcount, 2); atomic_set(&neigh_node->refcount, 2);
batadv_dbg(BATADV_DBG_BATMAN, bat_priv, batadv_dbg(BATADV_DBG_BATMAN, bat_priv,
"Creating new neighbor %pM, initial seqno %d\n", "Creating new neighbor %pM\n", neigh_addr);
neigh_addr, seqno);
out: out:
return neigh_node; return neigh_node;
......
...@@ -31,7 +31,7 @@ struct batadv_orig_node *batadv_get_orig_node(struct batadv_priv *bat_priv, ...@@ -31,7 +31,7 @@ struct batadv_orig_node *batadv_get_orig_node(struct batadv_priv *bat_priv,
const uint8_t *addr); const uint8_t *addr);
struct batadv_neigh_node * struct batadv_neigh_node *
batadv_neigh_node_new(struct batadv_hard_iface *hard_iface, batadv_neigh_node_new(struct batadv_hard_iface *hard_iface,
const uint8_t *neigh_addr, uint32_t seqno); const uint8_t *neigh_addr);
void batadv_neigh_node_free_ref(struct batadv_neigh_node *neigh_node); void batadv_neigh_node_free_ref(struct batadv_neigh_node *neigh_node);
struct batadv_neigh_node * struct batadv_neigh_node *
batadv_orig_node_get_router(struct batadv_orig_node *orig_node); batadv_orig_node_get_router(struct batadv_orig_node *orig_node);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment