]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: Move is_out_of_time() to main.h for general use
authorMartin Hundebøll <martin@hundeboll.net>
Thu, 8 Dec 2011 12:32:41 +0000 (13:32 +0100)
committerMarek Lindner <lindner_marek@yahoo.de>
Thu, 16 Feb 2012 18:50:19 +0000 (02:50 +0800)
commitb2f6d8509bd0cf8c299168ec8ff4e61cb099a563
treea57eaf54189eea3f63a30ee89a9be4e19513342e
parent3756e52f65c16ea7518582cad5c13a3ad34693cc
batman-adv: Move is_out_of_time() to main.h for general use

Both translation tables and network coding use timeouts to do house
keeping, so we might as well share the function used to compare a
timestamp+timeout with current time.

For readability and simplicity, the function is renamed to
has_timed_out() and uses time_is_before_jiffies() instead of
time_after().

Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
net/batman-adv/main.h
net/batman-adv/translation-table.c