Commit 7b324d28a94dac5a451e8cba66e8d324601e5b9a

Authored by Javier Cardona
Committed by John W. Linville
1 parent 5d618cb81a

mac80211: Revert 'Use correct sign for mesh active path refresh'

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>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>

Showing 2 changed files with 4 additions and 3 deletions Side-by-side Diff

... ... @@ -188,8 +188,9 @@
188 188 */
189 189 #define MESH_PREQ_MIN_INT 10
190 190 #define MESH_DIAM_TRAVERSAL_TIME 50
191   -/* Paths will be refreshed if they are closer than PATH_REFRESH_TIME to their
192   - * expiration
  191 +/* A path will be refreshed if it is used PATH_REFRESH_TIME milliseconds before
  192 + * timing out. This way it will remain ACTIVE and no data frames will be
  193 + * unnecesarily held in the pending queue.
193 194 */
194 195 #define MESH_PATH_REFRESH_TIME 1000
195 196 #define MESH_MIN_DISCOVERY_TIMEOUT (2 * MESH_DIAM_TRAVERSAL_TIME)
net/mac80211/mesh_hwmp.c
... ... @@ -937,7 +937,7 @@
937 937  
938 938 if (mpath->flags & MESH_PATH_ACTIVE) {
939 939 if (time_after(jiffies,
940   - mpath->exp_time +
  940 + mpath->exp_time -
941 941 msecs_to_jiffies(sdata->u.mesh.mshcfg.path_refresh_time)) &&
942 942 !memcmp(sdata->dev->dev_addr, hdr->addr4, ETH_ALEN) &&
943 943 !(mpath->flags & MESH_PATH_RESOLVING) &&