aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv
diff options
context:
space:
mode:
Diffstat (limited to 'net/batman-adv')
-rw-r--r--net/batman-adv/bat_iv_ogm.c8
-rw-r--r--net/batman-adv/originator.c16
-rw-r--r--net/batman-adv/types.h8
3 files changed, 16 insertions, 16 deletions
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index e0aaf8c87d6..8652a7536b1 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -651,7 +651,7 @@ static void bat_iv_ogm_orig_update(struct bat_priv *bat_priv,
651 rcu_read_unlock(); 651 rcu_read_unlock();
652 652
653 orig_node->flags = batman_ogm_packet->flags; 653 orig_node->flags = batman_ogm_packet->flags;
654 neigh_node->last_valid = jiffies; 654 neigh_node->last_seen = jiffies;
655 655
656 spin_lock_bh(&neigh_node->tq_lock); 656 spin_lock_bh(&neigh_node->tq_lock);
657 ring_buffer_set(neigh_node->tq_recv, 657 ring_buffer_set(neigh_node->tq_recv,
@@ -772,11 +772,11 @@ static int bat_iv_ogm_calc_tq(struct orig_node *orig_node,
772 if (!neigh_node) 772 if (!neigh_node)
773 goto out; 773 goto out;
774 774
775 /* if orig_node is direct neighbor update neigh_node last_valid */ 775 /* if orig_node is direct neighbor update neigh_node last_seen */
776 if (orig_node == orig_neigh_node) 776 if (orig_node == orig_neigh_node)
777 neigh_node->last_valid = jiffies; 777 neigh_node->last_seen = jiffies;
778 778
779 orig_node->last_valid = jiffies; 779 orig_node->last_seen = jiffies;
780 780
781 /* find packet count of corresponding one hop neighbor */ 781 /* find packet count of corresponding one hop neighbor */
782 spin_lock_bh(&orig_node->ogm_cnt_lock); 782 spin_lock_bh(&orig_node->ogm_cnt_lock);
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index ce496988589..21c1f83a2af 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -283,7 +283,7 @@ static bool purge_orig_neighbors(struct bat_priv *bat_priv,
283 hlist_for_each_entry_safe(neigh_node, node, node_tmp, 283 hlist_for_each_entry_safe(neigh_node, node, node_tmp,
284 &orig_node->neigh_list, list) { 284 &orig_node->neigh_list, list) {
285 285
286 if ((has_timed_out(neigh_node->last_valid, PURGE_TIMEOUT)) || 286 if ((has_timed_out(neigh_node->last_seen, PURGE_TIMEOUT)) ||
287 (neigh_node->if_incoming->if_status == IF_INACTIVE) || 287 (neigh_node->if_incoming->if_status == IF_INACTIVE) ||
288 (neigh_node->if_incoming->if_status == IF_NOT_IN_USE) || 288 (neigh_node->if_incoming->if_status == IF_NOT_IN_USE) ||
289 (neigh_node->if_incoming->if_status == IF_TO_BE_REMOVED)) { 289 (neigh_node->if_incoming->if_status == IF_TO_BE_REMOVED)) {
@@ -300,9 +300,9 @@ static bool purge_orig_neighbors(struct bat_priv *bat_priv,
300 neigh_node->if_incoming->net_dev->name); 300 neigh_node->if_incoming->net_dev->name);
301 else 301 else
302 bat_dbg(DBG_BATMAN, bat_priv, 302 bat_dbg(DBG_BATMAN, bat_priv,
303 "neighbor timeout: originator %pM, neighbor: %pM, last_valid: %lu\n", 303 "neighbor timeout: originator %pM, neighbor: %pM, last_seen: %lu\n",
304 orig_node->orig, neigh_node->addr, 304 orig_node->orig, neigh_node->addr,
305 (neigh_node->last_valid / HZ)); 305 (neigh_node->last_seen / HZ));
306 306
307 neigh_purged = true; 307 neigh_purged = true;
308 308
@@ -325,10 +325,10 @@ static bool purge_orig_node(struct bat_priv *bat_priv,
325{ 325{
326 struct neigh_node *best_neigh_node; 326 struct neigh_node *best_neigh_node;
327 327
328 if (has_timed_out(orig_node->last_valid, 2 * PURGE_TIMEOUT)) { 328 if (has_timed_out(orig_node->last_seen, 2 * PURGE_TIMEOUT)) {
329 bat_dbg(DBG_BATMAN, bat_priv, 329 bat_dbg(DBG_BATMAN, bat_priv,
330 "Originator timeout: originator %pM, last_valid %lu\n", 330 "Originator timeout: originator %pM, last_seen %lu\n",
331 orig_node->orig, (orig_node->last_valid / HZ)); 331 orig_node->orig, (orig_node->last_seen / HZ));
332 return true; 332 return true;
333 } else { 333 } else {
334 if (purge_orig_neighbors(bat_priv, orig_node, 334 if (purge_orig_neighbors(bat_priv, orig_node,
@@ -446,9 +446,9 @@ int orig_seq_print_text(struct seq_file *seq, void *offset)
446 goto next; 446 goto next;
447 447
448 last_seen_secs = jiffies_to_msecs(jiffies - 448 last_seen_secs = jiffies_to_msecs(jiffies -
449 orig_node->last_valid) / 1000; 449 orig_node->last_seen) / 1000;
450 last_seen_msecs = jiffies_to_msecs(jiffies - 450 last_seen_msecs = jiffies_to_msecs(jiffies -
451 orig_node->last_valid) % 1000; 451 orig_node->last_seen) % 1000;
452 452
453 seq_printf(seq, "%pM %4i.%03is (%3i) %pM [%10s]:", 453 seq_printf(seq, "%pM %4i.%03is (%3i) %pM [%10s]:",
454 orig_node->orig, last_seen_secs, 454 orig_node->orig, last_seen_secs,
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
index 50e1895a25c..9fa8b73387e 100644
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -52,7 +52,7 @@ struct hard_iface {
52/** 52/**
53 * orig_node - structure for orig_list maintaining nodes of mesh 53 * orig_node - structure for orig_list maintaining nodes of mesh
54 * @primary_addr: hosts primary interface address 54 * @primary_addr: hosts primary interface address
55 * @last_valid: when last packet from this node was received 55 * @last_seen: when last packet from this node was received
56 * @bcast_seqno_reset: time when the broadcast seqno window was reset 56 * @bcast_seqno_reset: time when the broadcast seqno window was reset
57 * @batman_seqno_reset: time when the batman seqno window was reset 57 * @batman_seqno_reset: time when the batman seqno window was reset
58 * @gw_flags: flags related to gateway class 58 * @gw_flags: flags related to gateway class
@@ -70,7 +70,7 @@ struct orig_node {
70 struct neigh_node __rcu *router; /* rcu protected pointer */ 70 struct neigh_node __rcu *router; /* rcu protected pointer */
71 unsigned long *bcast_own; 71 unsigned long *bcast_own;
72 uint8_t *bcast_own_sum; 72 uint8_t *bcast_own_sum;
73 unsigned long last_valid; 73 unsigned long last_seen;
74 unsigned long bcast_seqno_reset; 74 unsigned long bcast_seqno_reset;
75 unsigned long batman_seqno_reset; 75 unsigned long batman_seqno_reset;
76 uint8_t gw_flags; 76 uint8_t gw_flags;
@@ -120,7 +120,7 @@ struct gw_node {
120 120
121/** 121/**
122 * neigh_node 122 * neigh_node
123 * @last_valid: when last packet via this neighbor was received 123 * @last_seen: when last packet via this neighbor was received
124 */ 124 */
125struct neigh_node { 125struct neigh_node {
126 struct hlist_node list; 126 struct hlist_node list;
@@ -131,7 +131,7 @@ struct neigh_node {
131 uint8_t tq_avg; 131 uint8_t tq_avg;
132 uint8_t last_ttl; 132 uint8_t last_ttl;
133 struct list_head bonding_list; 133 struct list_head bonding_list;
134 unsigned long last_valid; 134 unsigned long last_seen;
135 DECLARE_BITMAP(real_bits, TQ_LOCAL_WINDOW_SIZE); 135 DECLARE_BITMAP(real_bits, TQ_LOCAL_WINDOW_SIZE);
136 atomic_t refcount; 136 atomic_t refcount;
137 struct rcu_head rcu; 137 struct rcu_head rcu;