From patchwork Sat Aug 8 03:31:48 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Cardona X-Patchwork-Id: 40074 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n783hRWP030439 for ; Sat, 8 Aug 2009 03:43:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933215AbZHHDnY (ORCPT ); Fri, 7 Aug 2009 23:43:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933209AbZHHDnY (ORCPT ); Fri, 7 Aug 2009 23:43:24 -0400 Received: from mail-pz0-f196.google.com ([209.85.222.196]:38644 "EHLO mail-pz0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933186AbZHHDnY (ORCPT ); Fri, 7 Aug 2009 23:43:24 -0400 Received: by pzk34 with SMTP id 34so1941429pzk.4 for ; Fri, 07 Aug 2009 20:43:23 -0700 (PDT) Received: by 10.114.53.10 with SMTP id b10mr2577455waa.171.1249703003801; Fri, 07 Aug 2009 20:43:23 -0700 (PDT) Received: from localhost (adsl-71-156-104-53.dsl.pltn13.sbcglobal.net [71.156.104.53]) by mx.google.com with ESMTPS id l37sm2839116waf.5.2009.08.07.20.43.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 07 Aug 2009 20:43:22 -0700 (PDT) From: Javier Cardona To: linux-wireless@vger.kernel.org Cc: Andrey Yurovsky , Javier Cardona , johannes@sipsolutions.net, linville@tuxdriver.com, devel@lists.open80211s.org Subject: [PATCH] mac80211: Use correct sign for mesh active path refresh. Date: Fri, 7 Aug 2009 20:31:48 -0700 Message-Id: <1249702314-32504-3-git-send-email-javier@cozybit.com> X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <1249702314-32504-2-git-send-email-javier@cozybit.com> References: <> <1249702314-32504-1-git-send-email-javier@cozybit.com> <1249702314-32504-2-git-send-email-javier@cozybit.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Andrey Yurovsky On locally originated traffic, we refresh active paths after a timeout. The decision to do this was using the wrong sign and therefore the refresh timer was triggered for every frame. Signed-off-by: Andrey Yurovsky Signed-off-by: Javier Cardona --- net/mac80211/mesh_hwmp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index b54c21c..1cd1e72 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c @@ -791,7 +791,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)