From patchwork Mon Aug 10 19:15:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Cardona X-Patchwork-Id: 40474 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 n7AJRapU025405 for ; Mon, 10 Aug 2009 19:27:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752220AbZHJT12 (ORCPT ); Mon, 10 Aug 2009 15:27:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752210AbZHJT12 (ORCPT ); Mon, 10 Aug 2009 15:27:28 -0400 Received: from rv-out-0506.google.com ([209.85.198.227]:33616 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752209AbZHJT11 (ORCPT ); Mon, 10 Aug 2009 15:27:27 -0400 Received: by rv-out-0506.google.com with SMTP id f6so1077455rvb.1 for ; Mon, 10 Aug 2009 12:27:29 -0700 (PDT) Received: by 10.141.52.15 with SMTP id e15mr1501410rvk.219.1249932449095; Mon, 10 Aug 2009 12:27:29 -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 f42sm26608889rvb.45.2009.08.10.12.27.27 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 10 Aug 2009 12:27:28 -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 2/7] mac80211: Use correct sign for mesh active path refresh. Date: Mon, 10 Aug 2009 12:15:47 -0700 Message-Id: <1249931752-18127-3-git-send-email-javier@cozybit.com> X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <1249931752-18127-2-git-send-email-javier@cozybit.com> References: <20090810175225.GF2733@tuxdriver.com> <1249931752-18127-1-git-send-email-javier@cozybit.com> <1249931752-18127-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)