From patchwork Sat Aug 8 03:38:25 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Cardona X-Patchwork-Id: 40082 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 n783o1vY031110 for ; Sat, 8 Aug 2009 03:50:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933310AbZHHDt7 (ORCPT ); Fri, 7 Aug 2009 23:49:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933244AbZHHDt6 (ORCPT ); Fri, 7 Aug 2009 23:49:58 -0400 Received: from mail-pz0-f196.google.com ([209.85.222.196]:57264 "EHLO mail-pz0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933189AbZHHDt6 (ORCPT ); Fri, 7 Aug 2009 23:49:58 -0400 Received: by mail-pz0-f196.google.com with SMTP id 34so1943403pzk.4 for ; Fri, 07 Aug 2009 20:49:59 -0700 (PDT) Received: by 10.114.159.9 with SMTP id h9mr2630558wae.73.1249703399529; Fri, 07 Aug 2009 20:49:59 -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 m28sm2842713waf.37.2009.08.07.20.49.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 07 Aug 2009 20:49:58 -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/8] mac80211: Use correct sign for mesh active path refresh. Date: Fri, 7 Aug 2009 20:38:25 -0700 Message-Id: <1249702711-32737-3-git-send-email-javier@cozybit.com> X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <1249702711-32737-2-git-send-email-javier@cozybit.com> References: <> <1249702711-32737-1-git-send-email-javier@cozybit.com> <1249702711-32737-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: 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)