Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205763
b: refs/heads/master
c: b6be453
h: refs/heads/master
i:
  205761: 09c70eb
  205759: fabad6a
v: v3
  • Loading branch information
Simon Wunderlich authored and Greg Kroah-Hartman committed Jul 8, 2010
1 parent 5b3ff89 commit b2ed7eb
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b26b45845b29d83e7537dcd16827a478f6cee346
refs/heads/master: b6be4535e3e971181e19791e12c62f4938e6d2e9
4 changes: 2 additions & 2 deletions trunk/drivers/staging/batman-adv/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
#define JITTER 20
#define TTL 50 /* Time To Live of broadcast messages */

#define PURGE_TIMEOUT 200000 /* purge originators after time in ms if no
#define PURGE_TIMEOUT 200 /* purge originators after time in seconds if no
* valid packet comes in -> TODO: check
* influence on TQ_LOCAL_WINDOW_SIZE */
#define LOCAL_HNA_TIMEOUT 3600000
#define LOCAL_HNA_TIMEOUT 3600 /* in seconds */

#define TQ_LOCAL_WINDOW_SIZE 64 /* sliding packet range of received originator
* messages in squence numbers (should be a
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/staging/batman-adv/originator.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,7 @@ static bool purge_orig_neighbors(struct orig_node *orig_node,
neigh_node = list_entry(list_pos, struct neigh_node, list);

if ((time_after(jiffies,
(neigh_node->last_valid +
((PURGE_TIMEOUT * HZ) / 1000)))) ||
neigh_node->last_valid + PURGE_TIMEOUT * HZ)) ||
(neigh_node->if_incoming->if_status ==
IF_TO_BE_REMOVED)) {

Expand Down Expand Up @@ -231,8 +230,7 @@ static bool purge_orig_node(struct orig_node *orig_node)
struct neigh_node *best_neigh_node;

if (time_after(jiffies,
(orig_node->last_valid +
((2 * PURGE_TIMEOUT * HZ) / 1000)))) {
orig_node->last_valid + 2 * PURGE_TIMEOUT * HZ)) {

bat_dbg(DBG_BATMAN,
"Originator timeout: originator %pM, last_valid %lu\n",
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/staging/batman-adv/translation-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,7 @@ static void hna_local_purge(struct work_struct *work)
while (hash_iterate(hna_local_hash, &hashit)) {
hna_local_entry = hashit.bucket->data;

timeout = hna_local_entry->last_seen +
((LOCAL_HNA_TIMEOUT * HZ) / 1000);
timeout = hna_local_entry->last_seen + LOCAL_HNA_TIMEOUT * HZ;
if ((!hna_local_entry->never_purge) &&
time_after(jiffies, timeout))
hna_local_del(hna_local_entry, "address timed out");
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/batman-adv/vis.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ static void purge_vis_packets(void)
if (info == my_vis_info) /* never purge own data. */
continue;
if (time_after(jiffies,
info->first_seen + (VIS_TIMEOUT*HZ)/1000)) {
info->first_seen + VIS_TIMEOUT * HZ)) {
hash_remove_bucket(vis_hash, &hashit);
send_list_del(info);
kref_put(&info->refcount, free_info);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/batman-adv/vis.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
*/

#define VIS_TIMEOUT 200000
#define VIS_TIMEOUT 200 /* timeout of vis packets in seconds */

struct vis_info {
unsigned long first_seen;
Expand Down

0 comments on commit b2ed7eb

Please sign in to comment.