diff options
Diffstat (limited to 'net/batman-adv/translation-table.c')
-rw-r--r-- | net/batman-adv/translation-table.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index a84e80409f9b..ff9a1b33c136 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c | |||
@@ -413,7 +413,7 @@ static void tt_local_purge(struct bat_priv *bat_priv) | |||
413 | continue; | 413 | continue; |
414 | 414 | ||
415 | if (!has_timed_out(tt_local_entry->last_seen, | 415 | if (!has_timed_out(tt_local_entry->last_seen, |
416 | TT_LOCAL_TIMEOUT * 1000)) | 416 | TT_LOCAL_TIMEOUT)) |
417 | continue; | 417 | continue; |
418 | 418 | ||
419 | tt_local_set_pending(bat_priv, tt_local_entry, | 419 | tt_local_set_pending(bat_priv, tt_local_entry, |
@@ -751,7 +751,7 @@ static void tt_global_roam_purge(struct bat_priv *bat_priv) | |||
751 | if (!(tt_global_entry->common.flags & TT_CLIENT_ROAM)) | 751 | if (!(tt_global_entry->common.flags & TT_CLIENT_ROAM)) |
752 | continue; | 752 | continue; |
753 | if (!has_timed_out(tt_global_entry->roam_at, | 753 | if (!has_timed_out(tt_global_entry->roam_at, |
754 | TT_CLIENT_ROAM_TIMEOUT * 1000)) | 754 | TT_CLIENT_ROAM_TIMEOUT)) |
755 | continue; | 755 | continue; |
756 | 756 | ||
757 | bat_dbg(DBG_TT, bat_priv, "Deleting global " | 757 | bat_dbg(DBG_TT, bat_priv, "Deleting global " |
@@ -970,8 +970,7 @@ static void tt_req_purge(struct bat_priv *bat_priv) | |||
970 | 970 | ||
971 | spin_lock_bh(&bat_priv->tt_req_list_lock); | 971 | spin_lock_bh(&bat_priv->tt_req_list_lock); |
972 | list_for_each_entry_safe(node, safe, &bat_priv->tt_req_list, list) { | 972 | list_for_each_entry_safe(node, safe, &bat_priv->tt_req_list, list) { |
973 | if (has_timed_out(node->issued_at, | 973 | if (has_timed_out(node->issued_at, TT_REQUEST_TIMEOUT)) { |
974 | TT_REQUEST_TIMEOUT * 1000)) { | ||
975 | list_del(&node->list); | 974 | list_del(&node->list); |
976 | kfree(node); | 975 | kfree(node); |
977 | } | 976 | } |
@@ -990,7 +989,7 @@ static struct tt_req_node *new_tt_req_node(struct bat_priv *bat_priv, | |||
990 | list_for_each_entry(tt_req_node_tmp, &bat_priv->tt_req_list, list) { | 989 | list_for_each_entry(tt_req_node_tmp, &bat_priv->tt_req_list, list) { |
991 | if (compare_eth(tt_req_node_tmp, orig_node) && | 990 | if (compare_eth(tt_req_node_tmp, orig_node) && |
992 | !has_timed_out(tt_req_node_tmp->issued_at, | 991 | !has_timed_out(tt_req_node_tmp->issued_at, |
993 | TT_REQUEST_TIMEOUT * 1000)) | 992 | TT_REQUEST_TIMEOUT)) |
994 | goto unlock; | 993 | goto unlock; |
995 | } | 994 | } |
996 | 995 | ||
@@ -1583,8 +1582,7 @@ static void tt_roam_purge(struct bat_priv *bat_priv) | |||
1583 | 1582 | ||
1584 | spin_lock_bh(&bat_priv->tt_roam_list_lock); | 1583 | spin_lock_bh(&bat_priv->tt_roam_list_lock); |
1585 | list_for_each_entry_safe(node, safe, &bat_priv->tt_roam_list, list) { | 1584 | list_for_each_entry_safe(node, safe, &bat_priv->tt_roam_list, list) { |
1586 | if (!has_timed_out(node->first_time, | 1585 | if (!has_timed_out(node->first_time, ROAMING_MAX_TIME)) |
1587 | ROAMING_MAX_TIME * 1000)) | ||
1588 | continue; | 1586 | continue; |
1589 | 1587 | ||
1590 | list_del(&node->list); | 1588 | list_del(&node->list); |
@@ -1611,8 +1609,7 @@ static bool tt_check_roam_count(struct bat_priv *bat_priv, | |||
1611 | if (!compare_eth(tt_roam_node->addr, client)) | 1609 | if (!compare_eth(tt_roam_node->addr, client)) |
1612 | continue; | 1610 | continue; |
1613 | 1611 | ||
1614 | if (has_timed_out(tt_roam_node->first_time, | 1612 | if (has_timed_out(tt_roam_node->first_time, ROAMING_MAX_TIME)) |
1615 | ROAMING_MAX_TIME * 1000)) | ||
1616 | continue; | 1613 | continue; |
1617 | 1614 | ||
1618 | if (!atomic_dec_not_zero(&tt_roam_node->counter)) | 1615 | if (!atomic_dec_not_zero(&tt_roam_node->counter)) |