summaryrefslogtreecommitdiff
path: root/net/batman-adv/routing.c
diff options
context:
space:
mode:
authorMarek Lindner <lindner_marek@yahoo.de>2011-12-20 15:30:40 +0400
committerMarek Lindner <lindner_marek@yahoo.de>2012-02-16 22:50:20 +0400
commit032b7969f8874d5ddc65691cd3d008beffd2a09e (patch)
tree73a0e8bdd4dcf0f1dc3407b17df0424106027f9d /net/batman-adv/routing.c
parentea3d2fd1b11fb3ef8706a48ece0a49a61bcd08bc (diff)
downloadlinux-032b7969f8874d5ddc65691cd3d008beffd2a09e.tar.xz
batman-adv: convert time_after instances to has_timed_out
To increase readability the has_timed_out() functions has been introduced. This patch converts existing time_after() calls to use this wrapper function (if applicable). This patch also converts all timeouts to miliseconds to be consistent. Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Diffstat (limited to 'net/batman-adv/routing.c')
-rw-r--r--net/batman-adv/routing.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index b72d7f3b3c6a..c1e45c0bb186 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -231,8 +231,7 @@ int window_protected(struct bat_priv *bat_priv, int32_t seq_num_diff,
{
if ((seq_num_diff <= -TQ_LOCAL_WINDOW_SIZE)
|| (seq_num_diff >= EXPECTED_SEQNO_RANGE)) {
- if (time_after(jiffies, *last_reset +
- msecs_to_jiffies(RESET_PROTECTION_MS))) {
+ if (has_timed_out(*last_reset, RESET_PROTECTION_MS)) {
*last_reset = jiffies;
bat_dbg(DBG_BATMAN, bat_priv,