aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJavier Cardona <javier@cozybit.com>2009-12-09 18:43:01 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-18 14:04:23 -0800
commitc04c99abc6754fa92d428915ac4215994fe95609 (patch)
treeb5b4c3df0bd2d74d050a5ea97f7ef0ee22da556a /net
parentdde24b6c58b10e27c296f2d343e9512ec0dce874 (diff)
mac80211: Revert 'Use correct sign for mesh active path refresh'
commit 7b324d28a94dac5a451e8cba66e8d324601e5b9a upstream. The patch ("mac80211: Use correct sign for mesh active path refresh.") was actually a bug. Reverted it and improved the explanation of how mesh path refresh works. Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: Andrey Yurovsky <andrey@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/mesh.h5
-rw-r--r--net/mac80211/mesh_hwmp.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
index dd1c19319f0..010ff2fc47f 100644
--- a/net/mac80211/mesh.h
+++ b/net/mac80211/mesh.h
@@ -186,8 +186,9 @@ struct mesh_rmc {
*/
#define MESH_PREQ_MIN_INT 10
#define MESH_DIAM_TRAVERSAL_TIME 50
-/* Paths will be refreshed if they are closer than PATH_REFRESH_TIME to their
- * expiration
+/* A path will be refreshed if it is used PATH_REFRESH_TIME milliseconds before
+ * timing out. This way it will remain ACTIVE and no data frames will be
+ * unnecesarily held in the pending queue.
*/
#define MESH_PATH_REFRESH_TIME 1000
#define MESH_MIN_DISCOVERY_TIMEOUT (2 * MESH_DIAM_TRAVERSAL_TIME)
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index 29b82e98eff..93c49fc8913 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -813,7 +813,7 @@ int mesh_nexthop_lookup(struct sk_buff *skb,
}
if (mpath->flags & MESH_PATH_ACTIVE) {
- if (time_after(jiffies, mpath->exp_time +
+ if (time_after(jiffies, mpath->exp_time -
msecs_to_jiffies(sdata->u.mesh.mshcfg.path_refresh_time))
&& !memcmp(sdata->dev->dev_addr, hdr->addr4,
ETH_ALEN)