diff options
author | Antonio Quartulli <antonio@open-mesh.com> | 2013-03-25 08:49:46 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2013-05-28 20:44:53 -0400 |
commit | 863dd7a82a2fba3e1a094c3d10a9cc8d1afd10d6 (patch) | |
tree | fc98b3f0d7a44efe954146e9420cc0e14f3b6be0 /net/batman-adv | |
parent | 93178018eb35aaa6ebcb5a136dce7eb3add011ab (diff) |
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: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/bat_iv_ogm.c | 11 | ||||
-rw-r--r-- | net/batman-adv/originator.c | 5 | ||||
-rw-r--r-- | net/batman-adv/originator.h | 2 |
3 files changed, 7 insertions, 11 deletions
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index 071f288b77a8..da239c5424b8 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c | |||
@@ -33,12 +33,11 @@ static struct batadv_neigh_node * | |||
33 | batadv_iv_ogm_neigh_new(struct batadv_hard_iface *hard_iface, | 33 | batadv_iv_ogm_neigh_new(struct batadv_hard_iface *hard_iface, |
34 | const uint8_t *neigh_addr, | 34 | const uint8_t *neigh_addr, |
35 | struct batadv_orig_node *orig_node, | 35 | struct batadv_orig_node *orig_node, |
36 | struct batadv_orig_node *orig_neigh, __be32 seqno) | 36 | struct batadv_orig_node *orig_neigh) |
37 | { | 37 | { |
38 | struct batadv_neigh_node *neigh_node; | 38 | struct batadv_neigh_node *neigh_node; |
39 | 39 | ||
40 | neigh_node = batadv_neigh_node_new(hard_iface, neigh_addr, | 40 | neigh_node = batadv_neigh_node_new(hard_iface, neigh_addr); |
41 | ntohl(seqno)); | ||
42 | if (!neigh_node) | 41 | if (!neigh_node) |
43 | goto out; | 42 | goto out; |
44 | 43 | ||
@@ -696,8 +695,7 @@ batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv, | |||
696 | 695 | ||
697 | neigh_node = batadv_iv_ogm_neigh_new(if_incoming, | 696 | neigh_node = batadv_iv_ogm_neigh_new(if_incoming, |
698 | ethhdr->h_source, | 697 | ethhdr->h_source, |
699 | orig_node, orig_tmp, | 698 | orig_node, orig_tmp); |
700 | batadv_ogm_packet->seqno); | ||
701 | 699 | ||
702 | batadv_orig_node_free_ref(orig_tmp); | 700 | batadv_orig_node_free_ref(orig_tmp); |
703 | if (!neigh_node) | 701 | if (!neigh_node) |
@@ -829,8 +827,7 @@ static int batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node, | |||
829 | neigh_node = batadv_iv_ogm_neigh_new(if_incoming, | 827 | neigh_node = batadv_iv_ogm_neigh_new(if_incoming, |
830 | orig_neigh_node->orig, | 828 | orig_neigh_node->orig, |
831 | orig_neigh_node, | 829 | orig_neigh_node, |
832 | orig_neigh_node, | 830 | orig_neigh_node); |
833 | batadv_ogm_packet->seqno); | ||
834 | 831 | ||
835 | if (!neigh_node) | 832 | if (!neigh_node) |
836 | goto out; | 833 | goto out; |
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c index fad1a2093e15..ddf563484798 100644 --- a/net/batman-adv/originator.c +++ b/net/batman-adv/originator.c | |||
@@ -92,7 +92,7 @@ batadv_orig_node_get_router(struct batadv_orig_node *orig_node) | |||
92 | 92 | ||
93 | struct batadv_neigh_node * | 93 | struct batadv_neigh_node * |
94 | batadv_neigh_node_new(struct batadv_hard_iface *hard_iface, | 94 | batadv_neigh_node_new(struct batadv_hard_iface *hard_iface, |
95 | const uint8_t *neigh_addr, uint32_t seqno) | 95 | const uint8_t *neigh_addr) |
96 | { | 96 | { |
97 | struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); | 97 | struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); |
98 | struct batadv_neigh_node *neigh_node; | 98 | struct batadv_neigh_node *neigh_node; |
@@ -110,8 +110,7 @@ batadv_neigh_node_new(struct batadv_hard_iface *hard_iface, | |||
110 | atomic_set(&neigh_node->refcount, 2); | 110 | atomic_set(&neigh_node->refcount, 2); |
111 | 111 | ||
112 | batadv_dbg(BATADV_DBG_BATMAN, bat_priv, | 112 | batadv_dbg(BATADV_DBG_BATMAN, bat_priv, |
113 | "Creating new neighbor %pM, initial seqno %d\n", | 113 | "Creating new neighbor %pM\n", neigh_addr); |
114 | neigh_addr, seqno); | ||
115 | 114 | ||
116 | out: | 115 | out: |
117 | return neigh_node; | 116 | return neigh_node; |
diff --git a/net/batman-adv/originator.h b/net/batman-adv/originator.h index 734e5a3d8a5b..7887b84a9af4 100644 --- a/net/batman-adv/originator.h +++ b/net/batman-adv/originator.h | |||
@@ -31,7 +31,7 @@ struct batadv_orig_node *batadv_get_orig_node(struct batadv_priv *bat_priv, | |||
31 | const uint8_t *addr); | 31 | const uint8_t *addr); |
32 | struct batadv_neigh_node * | 32 | struct batadv_neigh_node * |
33 | batadv_neigh_node_new(struct batadv_hard_iface *hard_iface, | 33 | batadv_neigh_node_new(struct batadv_hard_iface *hard_iface, |
34 | const uint8_t *neigh_addr, uint32_t seqno); | 34 | const uint8_t *neigh_addr); |
35 | void batadv_neigh_node_free_ref(struct batadv_neigh_node *neigh_node); | 35 | void batadv_neigh_node_free_ref(struct batadv_neigh_node *neigh_node); |
36 | struct batadv_neigh_node * | 36 | struct batadv_neigh_node * |
37 | batadv_orig_node_get_router(struct batadv_orig_node *orig_node); | 37 | batadv_orig_node_get_router(struct batadv_orig_node *orig_node); |